@property --canvases-scale {
    syntax: "<number>";
    inherits: true;
    initial-value: 1.0;
}

.nodisplay, .behind-canvases.nodisplay {
  display: none !important;
}

.everything-container {
  display: flex;

  flex-direction: column;

  justify-content: center;
  align-items: center;

  height: calc(100vh - 8vh - 16vh);

  margin-top: 8vh;
  margin-left: 64px;
  margin-right: 64px;

  width: calc(100vw - 128px);

  color: white;
}

.everything-subcontainer {
  display: flex;

  flex-direction: row;

  justify-content: space-between;

  width: 100%;

  color: white;
}

.everything-subcontainer>* {
  flex-grow: 1;
  flex-basis: 0;
}

.everything-subcontainer>.game-supercontainer {
  flex-basis: unset;
  flex-grow: unset;

  margin-left: 24px;
  margin-right: 24px;
}

.everything-container>* {
    flex-basis: 33.33%;
}

.game-container {
  display: grid;

  --canvases-scale: 0
}

.game-canvas {
  transform: scale(var(--canvases-scale));
}

.behind-canvases {
  display: flex;

  justify-content: center;
  align-items: center;

  flex-direction: column;
}

.behind-canvases.withborder {
  border: 1px solid white;
}

.behind-canvases .row {
  display: flex;
  flex-direction: row;

  justify-content: center;
  align-items: center;

  color: white;

  margin-left: 32px;
  margin-right: 32px;

  width: calc(100% - 64px);
}

.behind-canvases .row.spacing>* {
  margin-left: 4px;
  margin-right: 4px;
}

.modding-frame {
  margin-left: 32px;
}

.modding-frame textarea {
  background-color: black;
  color: white;
  font-family: "MS Gothic", "terminus", "nec_apc";

  width: 100%;
  resize: vertical;
}

.behind-canvases p {
  display: inline;

  margin-right: 16px;
}

.row.ballinfo span {
  height: 3vmax;

  font-size: 0.95vmax;

  text-align: center;
}

.row.ballinfo.ainfo span {
  margin-top: 0.25vmax;
  margin-bottom: 0.25vmax;
}

.row.ballinfo *, .row.ballsettings * {
  color: var(--col);
}

.ballsettings {
  margin-bottom: 8px;

  font-size: 0.95vmax;
}

.rows {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.columns {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;

  width: 100%;
}

.behind-canvases select {
  background-color: black;
  color: white;

  font-family: "MS Gothic", "terminus", "nec_apc";

  padding-top: 4px;
  padding-bottom: 4px;
}

.behind-canvases .inputbox {
  background-color: black;
  color: white;

  font-family: "MS Gothic", "terminus", "nec_apc";

  height: 24px;
}

.everything-container button {
  background-color: #222;
  color: white;

  font-family: "MS Gothic", "terminus", "nec_apc";
}

button:disabled {
  color: #666;
}

.game-container * {
  position: unset;

  grid-row: 1;
  grid-column: 1;
}

@keyframes popin {
  0% {
    --canvases-scale: 0;
  }
  100% {
    --canvases-scale: 1;
  }
}

@keyframes popout {
  0% {
    --canvases-scale: 1
  }
  100% {
    --canvases-scale: 0;
  }
}

.game-container.popin {
  animation: popin 0.2s ease-out forwards;
}

.game-container.popout {
  animation: popout 0.2s ease-in forwards;
}

.slidecontainer {
  margin-left: 16px;
  margin-right: 16px;

  --s: 0.5vmax;

  width: calc(100% - 32px);
}

.slider {
  user-select: none;

  -webkit-appearance: none;
  appearance: none;
  height: var(--s);
  width: 100%;
  background: #444;
  outline: none;
  opacity: 1;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--s);;
  height: var(--s);;
  background: var(--col);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: var(--s);;
  height: var(--s);;
  background: var(--col);
  cursor: pointer;
}

.tab-menu {
  display: flex;
  flex-direction: column;
}

.tab-menu .tab-select-buttons-container {
  display: grid;
}

.tab-menu .tab-select-buttons-container:before {
  background-color: #333;
  border: 1px solid gray;
  content: "";

  grid-column: 1;
  grid-row: 1;
}

.tab-menu .tab-select-buttons {
  display: flex;
  justify-content: left;

  padding-top: 8px;
  padding-bottom: 0;

  margin-left: 8px;
}

.tab-select-buttons .selected {
  min-height: 25px;
  z-index: 999;
  color: white;
  border: 1px solid gray;
  border-bottom: unset;
  background-color: #111;
  filter: unset;

  align-content: start;
}

.tab-select-buttons .button {
  padding-left: 8px;
  padding-right: 8px;
}

.button {
  flex: 1;
  align-self: flex-start;

  width: auto;
  align-content: center;
  text-align: center;
  filter: contrast(2);

  border: 1px solid lightgray;
  color: lightgray;
  background-color: #666;
  user-select: none;

  padding-top: 4px;
  padding-bottom: 4px;

  margin-right: 8px;

  display: inline-block;
}

.button:hover {
    background-color: #888;
}

.button:active {
    background-color: #555;
}

.button.disabled {
    background-color: #555;
}

.tab-content {
  background-color: #111;
  border: 1px solid gray;
  border-top: none;

  padding: 8px;
}

.sandbox-menu {
  font-size: 0.95vmax;
}

#fps-select {
  font-size: 1.25vmax;
}

.sandbox-speed-buttons {
  padding-top: 16px;

  display: flex;

  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.speed-control {
  user-select: none;
}

.speed-control.button {
  width: 2vmax;
  height: 2vmax;

  align-self: unset;

  padding: 0;
  margin: 0 16px 0 16px;
}

.speed-control.label {
  width: 15vmax;
  font-size: 1.25vmax;

  display: flex; 
  justify-content: center;
}

button.green {
  color: lime !important;
  background-color: #020 !important;
  border-color: #010 !important;
}

.speed-alert {
  font-size: 0.95vmax;

  margin-top: 8px;
  text-align: center;
}

.speed-alert .alert-item {
  color: lime;
}

.sandbox-team-select {
  margin-right: 16px;
}

button.sandbox-ball-random {
  margin-left: 16px;
  font-size: 1.4vmax;
}

.sandbox.replaypanel {
  display: flex;
  flex-direction: column;

  align-self: flex-start;

  margin-left: 8px;

  height: 100%;
  overflow: auto;
  scrollbar-width: none;
}

.sandbox-ball-select, .sandbox-team-select {
  font-size: 1vmax;
}

.sandbox.replaypanel button {
  --fsz: 1.25vmax;

  font-size: var(--fsz);

  width: min-content;

  animation: glow 1s ease-in forwards;
}

.sandbox.replaypanel .parent {
  display: flex;
  flex-direction: column;

  width: fit-content;
}

.sandbox.replaypanel .first>button {
  padding: 8px;
}

.sandbox.replaypanel .second>button {
  width: 100%;
}

.sandbox.replaypanel>div {
  margin-bottom: 8px;
}

.sandbox.replaypanel button>span {
  display: block;
  text-align: left;
  white-space: pre;
}

.sandbox.replaypanel button>img {
  width: var(--fsz);
  height: var(--fsz);
}

.sandbox.replaypanel button .date {
  font-weight: bold;
}

.sandbox.replaypanel button .duration {
  margin-bottom: var(--fsz);
}

@keyframes glow {
  0% {
    background-color: #244;
  }
  100% {
    background-color: #222;
  }
}

.sandbox-load-replays {
  background-color: #111;

  width: fit-content;
  height: fit-content;

  padding: 8px;
  
  margin: auto;

  box-shadow:
        0 0 0 2px #444,
        0 0 0 4px #666,
        0 0 0 8px #000;
}

.sandbox-load-replays .buttonrow {
  flex-direction: row;
}

#replay_load_balls_list {
  display: flex;
  flex-direction: column;
}

#desktop_mode_prompt {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: auto;

  background-color: #222;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  color: white;

  font-size: 2vmax;

  padding: 32px;
}