:root {
  --main-accent-color: #39bae6;
  --main-highlight-color: #fa6e32;
  --main-line-number-color: #abb0b6;
}

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

  header {
    padding: 0 !important;
  }
}

html {
  font-size: 16px;
}

body, textarea, select, input, select > option:hover {
  background-color: var(--main-bg-color);
  color: var(--main-fg-color);
}

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;
  border-bottom-color: color-mix(in srgb, var(--main-accent-color) 50%, transparent);
  border-bottom-style: solid;
  border-bottom-width: 1px;
}

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;
  color: var(--main-fg-color);
}

header .nav-button {
  display: flex;
  color: var(--main-accent-color);
  border: none;
  padding: 1rem;
  background: none;
}

header .nav-button:hover {
  background-color: var(--main-accent-color);
  color: var(--main-bg-color);
  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: var(--main-accent-color);
}

.button:hover {
  background-color: var(--main-highlight-color);
  transition: background-color 100ms;
}

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

select > option:hover {
  background-color: var(--main-accent-color);
  color: var(--main-bg-color);
}

option {
  border-radius: 4px;
}

input {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.0625rem;
  padding: 0.25rem;
  border-color: var(--main-accent-color);
  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: 12px;
}

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

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

.controls-checkbox-group {
  flex-direction: row;
  width: 100%;
}

#expiration-list:disabled {
  color: color-mix(in srgb, var(--main-fg-color) 50%, transparent);
}

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

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

.line-number > a, .line-number > a:visited {
  color: var(--main-line-number-color);
}

.line-number > a:hover, .line-number > a:focus {
  color: var(--main-highlight-color);
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex-direction: column;
  gap: 32px;
}

.text-link {
  color: var(--main-accent-color);
  font-weight: bold;
}

.toast {
  position: fixed;
  bottom: 2em;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--main-fg-color);
  color: var(--main-bg-color);
  padding: .6em 1em;
  border-radius: 8px;
  z-index: 1000;
}

.hidden {
  display: none;
}

.shown {
  display: block;
}
