/*
 * assets/student/games/games/word-guess/style.css
 *
 * Game-specific only — shell, status pill, buttons and colour tokens all
 * come from the shared main.css.
 *
 * Note the feedback palette: it deliberately uses the shared --good /
 * --warn tokens rather than importing Wordle's green/yellow, so the board
 * sits inside the arcade's warm palette instead of fighting it.
 */

.wg-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wg-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.wg-cell {
    display: grid;
    place-items: center;
    width: clamp(44px, 13vw, 58px);
    aspect-ratio: 1 / 1;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(20px, 5.5vw, 26px);
    color: var(--ink);
    text-transform: uppercase;
}

.wg-cell.wg-filled {
    border-color: var(--ink-faint);
}

/* Feedback states — also reused to tint the on-screen keyboard. */
.wg-correct { background: var(--good); border-color: var(--good); color: #0e1f14; }
.wg-present { background: var(--warn); border-color: var(--warn); color: #241a05; }
.wg-absent  { background: var(--bg-raised); border-color: var(--line-soft); color: var(--ink-faint); }

@keyframes wg-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.wg-shake { animation: wg-shake 0.3s ease; }

/* ---- on-screen keyboard ---- */

.wg-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(96vw, 500px);
}

.wg-krow {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.wg-key {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.wg-key:hover  { background: var(--bg-card-hover); border-color: var(--ink-faint); }
.wg-key:active { transform: scale(0.94); }

.wg-key-wide {
    flex: 1.6 1 auto;
    font-size: 12px;
}
