/*
 * LetterAnimator.css
 * Styles for the Bee a Better Speller card: big letters, colors, syllable honeycomb.
 * Everything is prefixed with 'bee-' so it won't clash with the web page it sits on.
 */

.bee-card
{
    --bee-board: #22302a;        /* chalkboard green */
    --bee-board-edge: #8a5a2b;   /* wooden frame */
    --bee-chalk: #f2efe6;        /* chalk white text */
    --bee-muted: #a9b5ad;
    --bee-gold: #f5b82e;         /* correct letters */
    --bee-red: #ff6b6b;          /* wrong / extra letters */
    --bee-orange: #ffa94d;       /* swapped letters */
    --bee-green: #7ee08a;        /* letters that arrive */
    --bee-size: 64px;            /* letter size, set by LetterAnimator */

    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    overflow: hidden;            /* hides missing letters until they slide in from the left */
    background: var(--bee-board);
    border: 6px solid var(--bee-board-edge);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: var(--bee-chalk);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.bee-card *
{
    box-sizing: border-box;
}

/* Header strip: logo image + title */

.bee-header
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bee-header img
{
    height: 52px;
    width: auto;
}

.bee-title
{
    font-size: 22px;
    font-weight: 600;
    color: var(--bee-gold);
    letter-spacing: 0.3px;
}

.bee-body
{
    padding: 10px 20px 12px;
}

.bee-label
{
    font-size: 13px;
    color: var(--bee-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The big word */

.bee-word
{
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: calc(var(--bee-size) * 1.2);
    margin: 2px 0 2px;
}

.bee-letter
{
    display: inline-block;
    font-size: var(--bee-size);
    font-weight: 700;
    line-height: 1.1;
    padding: 0 1px;
    color: var(--bee-gold);
    will-change: transform;
}

.bee-letter.wrong
{
    color: var(--bee-red);
    text-decoration: underline wavy var(--bee-red);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.bee-letter.extra
{
    color: var(--bee-red);
    text-decoration: line-through;
    text-decoration-thickness: 4px;
}

.bee-letter.swapped
{
    color: var(--bee-orange);
    text-decoration: underline dotted var(--bee-orange);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.bee-letter.arrived
{
    color: var(--bee-green);
    text-shadow: 0 0 14px rgba(126, 224, 138, 0.6);
}

/* What changed, as small chips */

.bee-changes
{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    margin-bottom: 6px;
}

.bee-chip
{
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid currentColor;
}

.bee-chip.wrong   { color: var(--bee-red); }
.bee-chip.extra   { color: var(--bee-red); }
.bee-chip.swapped { color: var(--bee-orange); }
.bee-chip.missing { color: var(--bee-green); }
.bee-chip.correct { color: var(--bee-gold); }

/* Syllables in honeycomb cells */

.bee-syllables
{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    min-height: 50px;
}

.bee-cell
{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 48px;
    padding: 0 22px;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%);
    background: var(--bee-gold);
    color: #2b1d02;
    font-size: 22px;
    font-weight: 700;
}

/* Replay button */

.bee-controls
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.bee-button
{
    font: inherit;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--bee-gold);
    background: transparent;
    color: var(--bee-gold);
    cursor: pointer;
}

.bee-button:hover
{
    background: rgba(245, 184, 46, 0.15);
}

.bee-button:focus-visible
{
    outline: 2px solid var(--bee-chalk);
    outline-offset: 2px;
}

/* Text only screen readers hear */

.bee-sr-only
{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
