﻿/* ---------- Header image ---------- */
.wgi-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(140px, 34svh, 240px);
    max-height: min(24svh, 240px);
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 12px;
    overflow: hidden;
}

    .wgi-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

/* ---------- Prompt (with inline blanks as dropzones) ---------- changed font size on line 21 from clamp(16px, 2.8svh, 18px) */
.wgi-text {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 10px;
    margin-top: 10px;
}

    .wgi-text .blank,
    .wgi-text .blank-drop,
    .wgi-text [data-blank-id],
    /* include elements your JS uses as dropzones */
    .wgi-text .wgi-blank {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 100px;
        min-height: 24px;
        padding: 6px 10px;
        margin: 4px 3px;
        border: 2px dashed #c4c4c4;
        border-radius: 10px;
        background: #fafafa;
        color: #666;
        font-weight: 600;
        vertical-align: middle;
        transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
    }

        /* GREEN outline on drag-over — matches your JS's .drag-over class */
        .wgi-text .blank.drag-over,
        .wgi-text .blank-drop.drag-over,
        .wgi-text [data-blank-id].drag-over,
        .wgi-text .wgi-blank.drag-over {
            background: #f0fff4;
            border-color: #28a745;
            border-style: solid; /* switch from dashed */
            outline: 2px solid #28a745;
            box-shadow: 0 0 0 3px rgba(40,167,69,0.18);
            transform: scale(1.02);
        }

        .wgi-text .blank.filled,
        .wgi-text .blank-drop.filled,
        .wgi-text [data-blank-id].filled,
        .wgi-text .wgi-blank.filled {
            color: #111;
            border-style: solid;
            background: #fff;
        }

/* ---------- Options ---------- changed line 77 from 14px */
.wgi-options-section {
    display: grid;
    gap: 8px;
}

.wgi-instructions {
    font-size: 1rem;
    opacity: 0.85;
    text-align: center;
    margin-bottom: 0.3rem;
}

.wgi-options {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    padding-bottom: 6px; /* a little breathing room above footer */
}

.wgi-option {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 6px;
    border-radius: 10px;
    border: 2px solid #dcdcdc;
    background: #fff;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: element;
    touch-action: none;
    cursor: grab;
    font-size: clamp(13px, 2.2svh, 16px);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

    .wgi-option:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    .wgi-option:active {
        cursor: grabbing;
    }

    .wgi-option.used {
        opacity: 0.55;
        filter: grayscale(0.15);
    }

/* JS glow pulse (option narration) */
@keyframes wgiGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(91,156,255,0.40);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(91,156,255,0.00);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(91,156,255,0.00);
    }
}

.wgi-option.glow {
    border-color: #5b9cff;
    background: #eef5ff;
    transform: scale(1.04);
    box-shadow: 0 0 0 4px rgba(91,156,255,0.18), 0 8px 18px rgba(37,99,235,0.18);
    animation: wgiGlowPulse 1.4s ease-out infinite;
}

.wgi-option.dragging {
    opacity: 0.8;
    transform: scale(0.97);
}

/* Short screens: allow slightly taller chips */
@media (max-height: 640px) {
    .wgi-option {
        height: 48px;
    }
}

/* One always-mounted footer button */
.wgi-main-button.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}


/* Ensure the footer can anchor absolutely positioned hidden button */
.eqn-footer {
    position: sticky;
}
/* already in layout.css; sticky counts as positioned */
