:root {
  --background: #202020;
  --text: white;
  --shaded: #00000080;
  --highlight: #ffffff30;
  --small-gap: 8px;
  --big-gap: 12px;
}

html, body {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  font-size: 12pt;
  font-family: ubuntu, sans-serif;
  color: var(--text);
  background-color: var(--background);
}

p {
  margin: 0;
}

h2 {
  margin: 0;
}

a {
  color: #3070ff;
  text-decoration: none
}

input, textarea, button, select, .fake-button {
  all: unset;
  box-sizing: border-box;
  background-color: var(--shaded);
  border: none;
  padding: 4px;
  border-radius: 4px;
}

input[type=number] {
  width: 100px;
}

input:focus, textarea:focus {
  box-shadow: 0 0 0.3em 0 var(--text);
}

::placeholder {
  color: white;
  opacity: 0.4;
}

button, .fake-button {
  cursor: pointer;
  user-select: none;
  text-align: center;
  text-decoration: none;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  min-width: 100px;
  justify-content: center;
}

.h-box {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  flex-grow: 0;
  gap: var(--small-gap);
}

.v-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--small-gap);
}

.row-box {
  display: flex;
  align-items: baseline;
  justify-content: stretch;
  flex-grow: 0;
  gap: var(--small-gap);
}

.list-box {
  display: flex;
  overflow: auto;
  flex-direction: column;
  align-items: stretch;
}

.shaded-box {
  background-color: var(--shaded);
  padding: 6px;
  border-radius: 8px;
}

.responsive-box {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--small-gap);
}

.popup-container {
  display: flex;
  position: fixed;
  align-items: center;
  justify-content: center;
  background: #00000080;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.popup-body {
  overflow: hidden;
  pointer-events: auto;
  padding: var(--small-gap);
  max-width: min(var(800px), 85vw);
  max-height: 80vh;
  background: var(--background);
  border-radius: 8px;
}

@media (max-width: 800px) {
  .responsive-box {
    flex-direction: column;
  }
}

.error-container {
  min-width: 200px;
  margin: 8px 12px;
  gap: var(--big-gap);
}

.graph-container {
  display: block;
  flex-grow: 1;
  min-width: 0;
  min-height: 0;
  background-color: var(--shaded);
}

#graph {
  width: 100%;
  height: 100%;
  display: block;
}

#controls {
  max-height: 200px;
  height: 25%;
  padding: var(--small-gap);
  gap: var(--small-gap);
  display: flex;
}

.controls-section {
  flex-grow: 1;
  flex-basis: 0;
  overflow: auto;
}

#about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--big-gap);
}

.spectra-list-elem {
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
}

.spectra-list-elem.hidden {
  opacity: 0.5;
}

.spectra-list-elem.hovered {
  font-weight: bold;
}

.spectra-list-elem.selected {
  background-color: var(--highlight);
}
