/* =========================================================
   Guess the Word — Clue (hint) block
   Uses the game's tokens when they exist; the fallback after
   each comma is the design value.
   ========================================================= */

.clue {
  /* Sits under the word card, the same width as the card. */
  width: min(340px, 90vw);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--font-ui);
}

/* The bar (while the clue is coming up) and the clue sentence share one
   grid cell, so the body is as tall as whichever is showing: the bar gives
   the default card height, the clue sentence the taller one. The card width
   is fixed in styles.css, so only the height changes. */
.clue__body {
  display: grid;
  justify-items: center;
  width: 100%;
  /* Reserve room for two lines of clue, so the card above doesn't move when
     the clue appears (the board centres the card and clue as one stack). */
  min-height: calc(2 * 1.45 * 17px + 1.2rem + 2px + 10px);
}
.clue__bar, .clue__text { grid-area: 1 / 1; }

.clue__divider {
  display: none;
}

/* Label: "CLUE COMING UP" (grey) → "CLUE" (green) */
.clue__label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color 0.25s ease;
}
.clue__icon {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clue[data-state="shown"] .clue__label { color: var(--gold); }

/* Progress bar (coming-up state only) */
.clue__bar {
  margin-top: 8px;
  width: 160px;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-alt);
  overflow: hidden;
}
.clue__fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: var(--gold);
  transition: width 0.25s linear;
}
.clue[data-state="shown"] .clue__bar { visibility: hidden; }

/* Clue sentence (shown state only) */
.clue__text {
  margin: 10px 0 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-secondary);
}
.clue__text[hidden] {
  /* Keep the space while hidden (clue.js sets the hidden attribute). */
  display: block;
  visibility: hidden;
}
.clue__text::before { content: "\201C"; }
.clue__text::after { content: "\201D"; }
.clue[data-state="shown"] .clue__text { animation: clue-in 0.35s ease-out; }

@keyframes clue-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .clue__label, .clue__fill { transition: none; }
  .clue[data-state="shown"] .clue__text { animation: none; }
}
