@import url("light.css") (prefers-color-scheme: light);
@import url("dark.css") (prefers-color-scheme: dark);

@media (prefers-color-scheme: dark) {
  body, textarea, select, input, select > option:hover {
    background-color: #0f1419;
    color: #e6e1cf;
  }

  select {
    color: #e6e1cf;
  }

  header {
    border-bottom: 1px solid #163855;
  }
}

@media (prefers-color-scheme: light) {
  body, textarea, select, input, select > option:hover {
    background-color: #fafafa;
    color: #333;
  }

  select {
    color: #0f1419;
  }

  header {
    border-bottom: 1px solid #d9d7d7;
  }

  h1 {
    color: #555;
  }
}

@media screen and (max-width: 720px) {
  main {
    padding: 0 !important;
  }

  header {
    padding: 0 !important;
  }
}

html {
  font-size: 16px;
}

body {
  font-family: "JetBrains Mono", monospace;
  padding: 0;
  margin: 0;
  height: 100vh;
}

svg {
  display: block;
}

#main-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

main {
  flex-grow: 1;
  padding: 1em 2em 1em 2em;
  user-select: none;
  overflow: auto;
  min-height: 0;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 1em 0 1em;
  user-select: none;
}

header .nav-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
}

header #nav-group-actions {
  min-width: fit-content;
}

header .nav-item {
  display: flex;
}

header .nav-title {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  white-space: nowrap;
  user-select: text;
}

header .nav-button {
  display: flex;
  color: #39bae6;
  border: none;
  padding: 1rem;
  background: none;
}

header .nav-button:hover {
  background-color: #39bae6;
  color: #0f1419;
  cursor: pointer;
  border-radius: 8px;
}

#form {
  height: 100%;
}

button {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.125rem;
}

button:hover {
  cursor: pointer;
}

.button {
  width: 100%;
  padding: 1em;
  border: none;
  border-radius: 8px;
  background-color: #39bae6;
}

.button:hover {
  background-color: #fa6e32;
  transition: background-color 100ms;
}

select {
  width: 100%;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.0625rem;
  border: none;
}

select > option:hover {
  background-color: #39bae6;
  color: #0f1419;
}

option {
  border-radius: 4px;
}

input {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.0625rem;
  padding: 0.25rem;
  border-color: #39bae6;
  border-style: solid;
  border-width: 1px;
  border-radius: 4px;
  box-sizing: border-box;
}

a, a:visited, a:hover {
  text-decoration: none;
}

#overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

#overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  color: white;
  transform: translate(-50%, -50%);
  font-size: 1.125rem;
}

#overlay-content table {
  border-spacing: 1rem;
}

.container {
  display: flex;
  flex-direction: row;
  gap: 32px;
  height: 100%;
}

.content {
  display: flex;
  flex: 1;
}

.content > textarea {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  line-height: 1.6rem;
  font-size: 1rem;
  resize: none;
  padding: 0;
  margin: 0;
}

.content > textarea:focus {
  outline: none !important;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 256px;
}

.controls-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.controls-row > input {
  width: 100%;
}

td.line-number {
  user-select: none;
}

.line-number {
  padding-right: 1em;
  text-align: right;
}

.line-number > a, .line-number > a:visited {
  color: #abb0b6;
}

.line-number > a:hover, .line-number > a:focus {
  color: #fa6e32;
}

.line {
  word-wrap: normal;
  white-space: pre;
  margin-top: 0px;
  margin-bottom: 0px;
  user-select: text;
}

.center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.text-center {
  text-align: center;
}
