/* ============================================================================
   FILE: pod-spanish-peek.css
   PURPOSE: The Spanish peek bubble, card and how-to (pod-spanish-peek.js).
   Only a student holding Bilingual Support (53) ever gets these elements.
   Fixed-position so they sit over the pod without reflowing it.
   The card is .sp-peek-card, never .sp-card: that is the sheet player's
   sort card (sheet-player.css), and both load on a sheet.
   ============================================================================ */

.sp-bubble,
.sp-peek-card,
.sp-help {
    --sp-bg: #ffffff;
    --sp-text: #1f2937;
    --sp-muted: #6b7280;
    --sp-border: #d1d5db;
    --sp-accent: #0e7490;
    --sp-accent-text: #ffffff;
    --sp-es: #0f5132;
    position: fixed;
    z-index: 2100;
    font-family: inherit;
}
html[data-theme="dark"] .sp-bubble,
html[data-theme="dark"] .sp-peek-card,
html[data-theme="dark"] .sp-help {
    --sp-bg: #202020;
    --sp-text: #e8e8e8;
    --sp-muted: #a5a5a5;
    --sp-border: #434343;
    --sp-accent: #00e0ff;
    --sp-accent-text: #151515;
    --sp-es: #86efac;
}

.sp-bubble {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--sp-accent);
    color: var(--sp-accent-text);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.sp-bubble:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }

.sp-peek-card,
.sp-help {
    width: min(360px, calc(100vw - 16px));
    padding: 12px 14px;
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    background: var(--sp-bg);
    color: var(--sp-text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    line-height: 1.4;
}

.sp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.sp-card-title { font-weight: 700; font-size: 0.95rem; }
.sp-close {
    border: 0;
    background: transparent;
    color: var(--sp-muted);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}
.sp-close:hover { color: var(--sp-text); }

.sp-card-en {
    color: var(--sp-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}
.sp-card-es {
    color: var(--sp-es);
    font-size: 1.1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.sp-card-note { color: var(--sp-text); font-size: 0.9rem; }
.sp-card-foot {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--sp-border);
    color: var(--sp-muted);
    font-size: 0.78rem;
}

.sp-steps { margin: 4px 0 8px; padding-left: 1.2rem; }
.sp-steps li { margin-bottom: 6px; }
.sp-line { margin: 0 0 6px; font-size: 0.88rem; }
.sp-line .sp-en { display: block; }
.sp-line .sp-es { display: block; color: var(--sp-muted); font-style: italic; }
.sp-status {
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(250, 204, 21, 0.14);
}

.sp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.sp-actions button {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.sp-toggle {
    border: 1px solid var(--sp-border);
    background: transparent;
    color: var(--sp-text);
}
.sp-ok {
    border: 0;
    background: var(--sp-accent);
    color: var(--sp-accent-text);
}

/* Toolbar button while the tool can't run here (exit ticket, unsupported
   browser): still tappable so the how-to can say why. */
.sound-toggle.sp-paused { opacity: 0.6; }

/* Listen: the Spanish read aloud with the browser's own voice. */
.sp-listen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 12px;
    border: 1px solid var(--sp-accent);
    border-radius: 999px;
    background: transparent;
    color: var(--sp-accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.sp-listen[aria-pressed="true"] {
    background: var(--sp-accent);
    color: var(--sp-accent-text);
}

/* "Ver opciones en español": one per answer-choice list. In the page flow
   (not fixed), just above the choices; the card it opens is the usual one. */
.sp-choices-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    padding: 4px 12px;
    border: 1px solid #0e7490;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.sp-choices-btn:hover,
.sp-choices-btn:focus-visible { background: rgba(14, 116, 144, 0.16); }
html[data-theme="dark"] .sp-choices-btn {
    border-color: #00e0ff;
    background: rgba(0, 224, 255, 0.1);
    color: #00e0ff;
}
.sp-choices-card { max-width: min(420px, calc(100vw - 16px)); }
.sp-choices-list { max-height: 50vh; overflow-y: auto; color: var(--sp-text); }
.sp-choices-list .sp-line .sp-es { color: var(--sp-es); }
.sp-choices-list .sp-choices-heading { margin-top: 10px; font-weight: 700; }
.sp-choices-list .sp-choices-heading:first-child { margin-top: 0; }
