/* Copyright (c) Microsoft Corporation.
   Licensed under the MIT License. */

:root {
  --heading-background: #262679;
  --main-background: #ececf0;
  --main-color: #202020;
  --nav-background: #bed1f4;
  --nav-hover-background: #b3bede;
  --nav-current-background: #b5c5f2;
  --border-color: #768f9c;
  --menu-box-fill: #e9f2fc;
  --error-background-color: #ffe3e3;
  --bar-selected-outline: #587ddd;
}

html {
  box-sizing: border-box;
  font-size: 16px;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: system-ui, "Segoe UI", "SegoeUI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--main-color);
  background-color: var(--main-background);
  display: grid;
  grid-template-areas:
    "header header header"
    "nav editor results";
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(180px, auto) 8fr 8fr;
  column-gap: 16px;
}

#popup {
  position: absolute;
  display: none;
  background-color: white;
  border: 1px solid black;
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 16px;
}

.page-header {
  grid-area: header;
  background: var(--heading-background);
  color: var(--main-background);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  padding-top: 4px;
  padding-bottom: 8px;
}

.nav-column {
  grid-area: nav;
  background-color: var(--nav-background);
}

.editor-column {
  grid-area: editor;
  margin: 16px;
  margin-top: 32px;
}

.results-column {
  grid-area: results;
  margin-left: 0px;
  margin-top: 32px;
  margin-right: 120px;
}

.nav-1 {
  font-size: 1.2rem;
  font-weight: 200;
  color: var(--main-color);
  border-top: 1px solid var(--border-color);
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 8px;
}

.nav-2 {
  font-size: 1rem;
  font-weight: 200;
  padding: 4px;
  padding-left: 16px;
}

.nav-selectable:hover {
  background-color: var(--nav-hover-background);
  cursor: pointer;
}

.nav-current {
  font-weight: 700;
  background-color: var(--nav-current-background);
}

.file-name {
  border: 1px solid var(--border-color);
  border-bottom: 0px;
  width: 100px;
  text-align: center;
  height: 32px;
  line-height: 32px;
  background-color: white;
}

.error-list {
  margin-top: 24px;
  margin-bottom: 24px;
  min-height: 48px;
}

.error-row {
  border: 1px solid var(--border-color);
  background-color: var(--error-background-color);
  padding: 4px;
  border-bottom: 0.5px solid gray;
  font-size: 0.9rem;
  margin-bottom: -1px;
}

.error-row > span {
  font-weight: 200;
}

.error-help {
  font-weight: 200;
  font-style: italic;
}

.results-labels {
  display: flex;
  height: 32px;
}

.results-labels > div {
  margin-right: 40px;
  text-align: left;
  vertical-align: middle;
  cursor: pointer;
}

.active-tab {
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: underline;
}

.output-header {
  font-size: 1.1rem;
  font-weight: 400;
  margin-top: 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}

.prev-next {
  font-weight: 200;
  cursor: pointer;
}

.state-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  width: 100%;
  min-width: 400px;
  margin-bottom: 16px;
}

.state-table thead tr {
  background: var(--nav-background);
}

.state-table tbody tr {
  border-top: 1px solid gray;
}

.state-table td,
.state-table th {
  text-align: center;
  padding: 6px;
  white-space: nowrap;
}

.state-table progress {
  margin-right: 2px;
}

.code-editor {
  height: 40vh;
  min-height: 400px;
  border: 1px solid var(--border-color);
}

.button-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
}

.button-row > * {
  margin-left: 10px;
  font-size: 1rem;
}

.icon-row > * {
  margin-left: 4px;
  font-size: 1.4rem;
  cursor: pointer;
}

.main-button {
  background-color: var(--nav-background);
  font-size: 1rem;
  color: var(--main-color);
  width: 72px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.main-button:disabled {
  background-color: gray;
  cursor: default;
}

.histogram {
  width: 500px;
  height: 300px;
  border: 1px solid var(--border-color);
  background-color: white;
}

.result-label {
  margin-bottom: 24px;
  font-style: italic;
  font-weight: 300;
}

.bar {
  fill: var(--nav-background);
}

.bar:hover {
  fill: var(--nav-hover-background);
}

.bar-selected {
  stroke: var(--bar-selected-outline);
  fill: var(--nav-current-background);
}

.bar-label {
  font-size: 3pt;
  fill: var(--main-color);
  text-anchor: end;
  pointer-events: none;
}

.histo-label {
  font-size: 3.5pt;
  fill: gray;
}

.hover-text {
  font-size: 3.5pt;
  fill: gray;
  text-anchor: middle;
}

.menu-box {
  fill: var(--menu-box-fill);
  stroke: black;
  stroke-width: 0.1;
}

.menu-item {
  width: 32px;
  height: 10px;
  fill: var(--main-background);
  stroke: gray;
  stroke-width: 0.2;
}

.menu-item:hover {
  stroke-width: 0.6;
}

.menu-selected {
  stroke: #0800ff;
  fill: var(--nav-background);
}

.menu-text {
  font-size: 4.5px;
  pointer-events: none;
}

.menu-separator {
  stroke: gray;
  stroke-width: 0.25;
}

.help-info {
  fill: var(--menu-box-fill);
  stroke: gray;
  stroke-width: 0.5;
}

.help-info-text {
  font-size: 4.5px;
  pointer-events: none;
}

.err-span {
  background: transparent !important;
  border-bottom: 4px double #e47777;
}

.message-output {
  font-weight: 300;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.hir-output {
  height: 40vh;
  min-height: 400px;
  width: 100%;
  resize: none;
  white-space: pre;
}

.kata-override {
  background-color: var(--main-background);
}
