/* Fullscreen Prompt — landscape mobile overlay
   Dynamically created by fullscreen-prompt.js */

/* ---- Theme tokens ---- */
:root {
    --fsp-backdrop: rgba(10, 10, 24, 0.82);
    --fsp-glass-bg: rgba(22, 33, 62, 0.85);
    --fsp-glass-border: rgba(255, 215, 0, 0.18);
    --fsp-text: #e5e7eb;
    --fsp-text-dim: #9ca3af;
    --fsp-accent: #ffd700;
    --fsp-accent-glow: rgba(255, 215, 0, 0.12);
    --fsp-cancel-bg: rgba(255, 255, 255, 0.06);
    --fsp-cancel-border: rgba(255, 255, 255, 0.12);
    --fsp-cancel-text: #9ca3af;
    --fsp-cancel-hover-bg: rgba(255, 255, 255, 0.10);
}

[data-theme="light"] {
    --fsp-backdrop: rgba(180, 172, 158, 0.78);
    --fsp-glass-bg: rgba(232, 226, 216, 0.90);
    --fsp-glass-border: rgba(160, 130, 60, 0.25);
    --fsp-text: #2c2418;
    --fsp-text-dim: #6b6050;
    --fsp-accent: #9a7b2e;
    --fsp-accent-glow: rgba(154, 123, 46, 0.10);
    --fsp-cancel-bg: rgba(0, 0, 0, 0.04);
    --fsp-cancel-border: rgba(0, 0, 0, 0.10);
    --fsp-cancel-text: #6b6050;
    --fsp-cancel-hover-bg: rgba(0, 0, 0, 0.08);
}

/* ---- Overlay ---- */
.fsp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fsp-backdrop);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    animation: fspFadeIn 0.25s ease-out;
    /* Tap target: entire overlay enters fullscreen (except cancel) */
    -webkit-tap-highlight-color: transparent;
}

.fsp-overlay.fsp-hiding {
    animation: fspFadeOut 0.4s ease-in forwards;
    pointer-events: none;
}

/* ---- Card (frosted glass) ---- */
.fsp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 40px;
    background: var(--fsp-glass-bg);
    border: 1px solid var(--fsp-glass-border);
    border-radius: 14px;
    box-shadow:
        0 0 24px var(--fsp-accent-glow),
        0 8px 32px rgba(0, 0, 0, 0.25);
    pointer-events: none;  /* clicks pass through to overlay */
    max-width: 320px;
    text-align: center;
}

/* ---- Icon with ring pulse ---- */
.fsp-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fsp-accent);
    font-size: 22px;
    line-height: 1;
}

.fsp-icon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1.5px solid var(--fsp-accent);
    border-radius: 50%;
    opacity: 0;
    animation: fspRingPulse 2.4s ease-out infinite;
}

/* ---- Typography ---- */
.fsp-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fsp-text);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.fsp-hint {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.75rem;
    color: var(--fsp-text-dim);
    line-height: 1.3;
}

/* ---- Cancel button ---- */
.fsp-cancel {
    pointer-events: auto;  /* re-enable clicks on cancel only */
    cursor: pointer;
    background: var(--fsp-cancel-bg);
    border: 1px solid var(--fsp-cancel-border);
    border-radius: 8px;
    color: var(--fsp-cancel-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 24px;
    margin-top: 2px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.fsp-cancel:hover,
.fsp-cancel:active {
    background: var(--fsp-cancel-hover-bg);
    color: var(--fsp-text);
}

/* ---- Progress bar (5-second countdown) ---- */
.fsp-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--fsp-accent);
    opacity: 0.5;
    border-radius: 0 0 0 14px;
    animation: fspCountdown 5s linear forwards;
}

/* ---- Keyframes ---- */
@keyframes fspFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fspFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes fspRingPulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    60%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes fspCountdown {
    from { width: 100%; }
    to   { width: 0%; }
}
