/* Kleurstrijd Trainer: alleen inhoudelijke afwijkingen bovenop de centrale Ookgaaf-standaard.
   Laadvolgorde: shared.css, game-tokens.css, daarna dit bestand. */
:root {
  --accent: #e879f9;
  --accent-hover: #f0abfc;
  --accent-soft: #351b3c;
  --trainer-button-text: #2a112f;
}

body.kleurstrijd-theme {
  --trainer-bg-glow-color: rgba(69, 28, 78, .62);
}

body.kleurstrijd-theme.training-intro-page,
body.kleurstrijd-theme.training-play-page {
  --trainer-bg-glow-x: 15%;
}

body.kleurstrijd-theme.game-page {
  --trainer-bg-glow-x: 85%;
  --trainer-bg-glow-size-mobile: 25rem;
  --trainer-bg-glow-size-game-desktop: 40rem;
}

body.kleurstrijd-theme.game-page.is-playing .play-screen {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.kleurstrijd-theme.is-training-playing .trainer-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

body.kleurstrijd-theme.is-training-playing .trainer-game {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
}

body.kleurstrijd-theme .color-stage {
  display: grid;
  grid-template-rows: auto 180px auto;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-top: 8px;
  box-sizing: border-box;
  align-content: start;
  position: relative;
  text-align: center;
}

body.kleurstrijd-theme .color-stage > .eyebrow {
  grid-row: 1;
  grid-column: 1;
  align-self: center;
}

body.kleurstrijd-theme .color-word {
  display: grid;
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  min-width: 0;
  height: 180px;
  padding: 0 12px 18px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: var(--font-size-sequence);
  font-weight: var(--font-weight-sequence);
  line-height: 1;
  letter-spacing: -.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.kleurstrijd-theme .color-word.is-long {
  font-size: clamp(3.1rem, 10vw, 5rem);
}

body.kleurstrijd-theme .color-choices {
  display: grid;
  grid-row: 3;
  grid-column: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-keypad-gap, 8px);
  width: 100%;
}

body.kleurstrijd-theme .color-choice {
  display: flex;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 6px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--trainer-radius-md, 12px);
  background: #090b0f;
  color: var(--choice-color);
  font-size: clamp(16px, 1.55vw, 20px);
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

body.kleurstrijd-theme .color-choice-dot {
  display: none;
}

body.kleurstrijd-theme .color-choice:hover:not(:disabled) {
  filter: brightness(1.16);
  transform: translateY(-1px);
}

body.kleurstrijd-theme .color-choice:focus-visible {
  outline: var(--trainer-focus-outline, 2px) solid var(--text, var(--color-text));
  outline-offset: 1px;
}

body.kleurstrijd-theme .color-choice:disabled {
  opacity: 1;
  cursor: default;
}

body.kleurstrijd-theme .color-choice.inactive-choice {
  background: #090b0f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

body.kleurstrijd-theme .color-choice.color-next {
  background: #090b0f;
  color: rgba(255, 255, 255, .28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  letter-spacing: .02em;
}

body.kleurstrijd-theme .color-choice.color-next.is-visible {
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  cursor: pointer;
}

body.kleurstrijd-theme .color-choice.color-next.is-visible:hover {
  background: rgba(255, 255, 255, .06);
  filter: none;
}

body.kleurstrijd-theme .color-choice.color-next:focus-visible {
  outline: 0;
}

body.kleurstrijd-theme .color-choice.correct-choice {
  background: #090b0f;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .88), 0 0 0 2px var(--accent);
}

body.kleurstrijd-theme .color-choice.wrong-choice {
  background: #090b0f;
  box-shadow: inset 0 0 0 4px rgba(17, 19, 24, .72), 0 0 0 2px var(--danger, #ff7582);
}

body.kleurstrijd-theme .color-feedback {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  min-height: 24px;
  padding: 0 8px 5px;
  margin: 0;
  align-self: end;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  text-align: center;
  z-index: 1;
}

body.kleurstrijd-theme .color-feedback:empty {
  visibility: hidden;
}

body.kleurstrijd-theme .color-word.is-result {
  height: 180px;
  padding: 8px 12px;
  align-content: center;
  gap: 6px;
  color: var(--muted, var(--color-muted)) !important;
  font-size: var(--font-size-body);
  letter-spacing: normal;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
}

body.kleurstrijd-theme .color-word.is-result strong {
  color: var(--text, var(--color-text));
  font-size: clamp(32px, 9vw, 50px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body.kleurstrijd-theme .color-game-stage {
  position: relative;
}

body.kleurstrijd-theme .color-pause {
  display: grid;
  grid-row: 2 / 4;
  min-height: 0;
  place-content: center;
  gap: var(--space-keypad-gap, 8px);
  border: var(--trainer-border-width, 1px) solid var(--line, var(--color-line));
  border-radius: var(--trainer-radius-xl, 16px);
  background: var(--trainer-card-bg, var(--color-panel));
  color: var(--muted, var(--color-muted));
  font-size: var(--font-size-body);
}

body.kleurstrijd-theme .color-pause strong {
  color: var(--text, var(--color-text));
  font-size: var(--font-size-result);
}

body.kleurstrijd-theme.is-game-paused .color-game-stage .color-word,
body.kleurstrijd-theme.is-game-paused .color-game-stage .color-choices,
body.kleurstrijd-theme.is-game-paused .color-game-stage .color-feedback {
  visibility: hidden;
}

body.kleurstrijd-theme.is-game-paused .color-game-stage .color-pause {
  visibility: visible;
}

@media (min-width: 768px) and (min-height: 701px) {
  body.kleurstrijd-theme.game-page:not(.is-playing) .game-main,
  body.kleurstrijd-theme.training-play-page:not(.is-training-playing) .training-game-main {
    align-items: safe center;
  }

  body.kleurstrijd-theme.game-page:not(.is-playing) .screen:not([hidden]),
  body.kleurstrijd-theme.training-play-page:not(.is-training-playing) .trainer-shell {
    align-self: safe center;
  }

  body.kleurstrijd-theme.game-page.is-playing .game-main,
  body.kleurstrijd-theme.is-training-playing .training-game-main {
    padding-top: 28px;
    padding-bottom: 20px;
    align-items: center;
  }

  body.kleurstrijd-theme.game-page.is-playing .play-screen,
  body.kleurstrijd-theme.is-training-playing .trainer-shell {
    height: auto;
    align-self: center;
  }

  body.kleurstrijd-theme.game-page.is-playing .play-screen {
    grid-template-rows: auto auto auto;
  }

  body.kleurstrijd-theme.is-training-playing .trainer-shell,
  body.kleurstrijd-theme.is-training-playing .trainer-game {
    grid-template-rows: auto auto;
  }

  body.kleurstrijd-theme.is-training-playing .trainer-game {
    align-self: auto;
  }

  body.kleurstrijd-theme .color-stage {
    height: auto;
    padding-top: 0;
    align-content: start;
  }
}

@media (min-width: 768px) and (max-height: 800px) {
  body.kleurstrijd-theme.game-page:not(.is-playing) .game-main,
  body.kleurstrijd-theme.training-play-page:not(.is-training-playing) .training-game-main,
  body.kleurstrijd-theme.game-page.is-playing .game-main,
  body.kleurstrijd-theme.is-training-playing .training-game-main {
    padding-top: 26px;
    padding-bottom: 14px;
  }

  body.kleurstrijd-theme .color-choice {
    height: 68px;
    aspect-ratio: auto;
  }
}

@media (max-width: 767px) {
  body.kleurstrijd-theme.is-training-playing .training-game-main {
    min-height: var(--mobile-standard-work-area-height);
    padding-top: 0;
    padding-bottom: var(--space-play-main-compact);
  }

  body.kleurstrijd-theme .color-stage {
    grid-template-rows: auto 180px auto;
    gap: 7px;
    align-content: center;
  }

  body.kleurstrijd-theme .color-word {
    height: 180px;
    font-size: var(--font-size-sequence);
  }

  body.kleurstrijd-theme .color-word.is-long {
    font-size: clamp(2.65rem, 12vw, 4rem);
  }

  body.kleurstrijd-theme .color-word.is-result {
    height: 180px;
    padding: 8px 10px;
    font-size: 14px;
  }

  body.kleurstrijd-theme .color-word.is-result strong {
    font-size: clamp(28px, 8vw, 36px);
  }

  body.kleurstrijd-theme .color-choices {
    gap: 7px;
  }

  body.kleurstrijd-theme .color-choice {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 14px;
  }

  body.kleurstrijd-theme .color-pause {
    grid-row: 2 / 4;
    min-height: 0;
  }
}

@media (max-width: 360px) {
  body.kleurstrijd-theme .color-word {
    font-size: 45px;
  }

  body.kleurstrijd-theme .color-word.is-long {
    font-size: 39px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.kleurstrijd-theme .color-choice {
    transition: none;
  }
}
