@charset "utf-8";

body {
  font:
    1rem Roboto,
    Verdana,
    Arial,
    Helvetica,
    sans-serif;
  /*background: #666666; */
  margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
  padding: 0;
  text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
  color: #000000;
}

#algoControlSection {
  background: var(--controlBackground);
  color: #000000;
}

canvas {
  /* background: black; */
  font-size: 1.1rem;
  font-family: monospace;
  color: black;
  background: #cac;
  cursor: grab;
  --flex-grow: 1;
}

#generalAnimationControls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 5px;
  margin: 5px;
  gap: 2px;
  row-gap: 5px;
}

#generalAnimationControls > h1 {
  font-size: 1rem;
  margin: 0;
}

#animationSurround {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#animationSurround > svg {
  flex: 1;
  min-height: 150px;
}

#animationSurround > canvas {
  flex: 0;
}

#algoControlSection {
  font-size: 0.8rem;
  order: 1;
}

#AlgorithmSpecificControls {
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  row-gap: 5px;
  margin: 5px;
}

#AlgorithmSpecificControls > * {
  flex: 1;
  justify-content: center;
}

#AlgorithmSpecificControls hr {
  min-width: 90%;
}

svg {
  cursor: move;
  /* max-width: 800px; */
  min-height: 200px;
}

#algoControlSection {
  container-name: sidebar;
  container-type: inline-size;
  min-width: 150px;
}

@media (min-width: 600px) {
  #algoControlSection {
    overflow: auto;
    resize: horizontal;
    width: 200px;
    scrollbar-width: thin;
    order: 0;
  }
  #animationSurround {
    flex-direction: row;
  }
}

svg circle {
  shape-rendering: geometricPrecision;
  fill: white;
}

svg text {
  user-select: none;
}

.controlGroup {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-width: 90%;
}

.controlGroup :is(input[type="text"], select) {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.stepButtons {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.autoplayRow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stepButtons * {
  flex: 1;
}

#stepForwardButton:enabled {
  background-color: #f0fbdb;
}
#skipForwardButton:enabled {
  background-color: #f0fbdb;
}

.radioButtonGroup {
  min-width: 100%;
}

@container sidebar (width < 200px) {
  #algoControlSection .controlGroup {
    flex-direction: column;
  }

  .controlGroup {
    align-content: stretch;
  }

  .controlGroup :is(input[type="text"], select) {
    width: 100%;
  }
}

:root {
  --svgColor: rgb(0, 0, 0);
  --svgColor--red: rgb(231, 36, 36);
  --svgColor--redback: rgb(255, 233, 233);
  --svgColor--black: rgb(0, 0, 0);
  --svgColor--blackback: rgb(227, 227, 227);
  --svgColor--highlight: rgb(214, 38, 38);
  --svgColor--althighlight: rgb(52, 133, 198);
  --svgFillColor: white;
  --controlBackground: #f0f8ff;
}

:root.dark-mode {
  --svgColor: rgb(221, 221, 221);
  --svgColor--red: rgb(231, 36, 36);
  --svgColor--redback: rgb(255, 233, 233);
  --svgColor--black: rgb(0, 0, 0);
  --svgColor--blackback: rgb(82, 82, 82);
  --svgColor--highlight: rgb(214, 38, 38);
  --svgColor--althighlight: rgb(52, 133, 198);
  --svgFillColor: rgb(82, 82, 82);
  --controlBackground: #f0f8ff;
}
