* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../vendor/fonts/ubuntu/Ubuntu-Regular.ttf");
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  display: grid;
  background: #eaeaea;
}

.title {
  font-size: 2rem;
  padding: 1rem 0 0rem;
  display: grid;
  justify-content: center;
  align-items: center;
}

.controls-wrapper {
  max-width: 100%;
  overflow: hidden;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.controls {
  max-width: 100%;
  overflow: hidden;
  line-height: 2rem;
  font-size: 1.25rem;
}

.controls input,
.controls select,
.controls input[type="button"],
.algarea {
  font-size: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.algarea {
  --font-family: "Ubuntu";
  width: 100%;
  background-color: white;
}

#twisty-wrapper {
  border-top: 1px solid rgba(0, 0, 0, 0.5);
}

/* Layout */

body {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto 1fr;
}

body > .title {
  grid-row: 1 / 2;
  grid-column: 1 / 4;
}

body > .controls-wrapper {
  grid-row: 2 / 3;
  grid-column: 1 / 4;
}

body > #twisty-wrapper {
  grid-row: 3 / 4;
  grid-column: 1 / 3;
  width: 100%;
  height: 100%;
}

#twisty-wrapper,
#twisty-wrapper twisty-player {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body > .algarea {
  grid-row: 3 / 4;
  grid-column: 3 / 4;
}

.disabled {
  opacity: 0.3333;
}

dialog#stuff-for-nerds {
  width: 80%;
  height: 80%;
  margin: 10vh 10vw;
  overflow-y: auto;
  grid-template-columns: auto auto;
  grid-template-rows: auto 1fr;
  grid-template-areas: "copy done" "text text";
  gap: 1em;
  display: none;
}

dialog#stuff-for-nerds::backdrop {
  background: rgba(0, 0, 0, 0.25);
}

dialog#stuff-for-nerds[open] {
  display: grid;
}

dialog#stuff-for-nerds form {
  grid-area: done;
}

dialog#stuff-for-nerds form span {
  width: 100%;
}

dialog#stuff-for-nerds #copy {
  grid-area: copy;
}

dialog#stuff-for-nerds textarea {
  width: 100%;
  height: 100%;
  grid-area: text;
}

side-panel {
  display: grid;
  grid-template-rows: 2em 1fr;
  overflow: hidden;
}

panel-selector {
  display: grid;
  grid-auto-flow: column;
}

panel-tabs {
  overflow-y: auto;
  display: grid;
  height: 100%;
}

twisty-alg-editor {
  height: 100%;
}

panel-tabs *[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: TODO */
  display: none !important;
}

#puzzle-shape {
  font-size: 1.25em;
  width: 100%;
}

twisty-puzzle-description-input {
  padding: 1em;
  border-left: rgba(0, 0, 0, 0.25) solid;
}

twisty-puzzle-description-input h2 {
  margin-bottom: 0.25em;
}

twisty-puzzle-description-input section {
  display: grid;
  grid-template-columns: 1fr auto;
}

twisty-puzzle-description-input button.add {
  grid-column: 1 / 3;
}
