/* ==========================================================================
   Lanka — Хвилина мовчання  |  silence.css
   ========================================================================== */

/* ── Overlay root ── */
#lanka-silence-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lanka-silence-overlay[hidden] {
    display: none !important;
}

/* ── Backdrop ── */
.lso-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: lsoFadeIn 0.6s ease both;
}

/* ── Content card ── */
.lso-content {
    position: relative;
    z-index: 1;
    width: min(520px, 92vw);
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 48px 40px 40px;
    text-align: center;
    color: #e8e8e8;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    animation: lsoSlideUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── Candle ── */
.lso-candle {
    width: 72px;
    height: 144px;
    margin: 0 auto 24px;
    filter: drop-shadow(0 0 16px rgba(255,160,40,0.55));
}

.lso-flame {
    transform-origin: 30px 24px;
    animation: lsoFlicker 2.2s ease-in-out infinite;
}

.lso-flame-glow {
    animation: lsoFlicker 2.2s ease-in-out infinite reverse;
}

/* ── Flag ribbon ── */
.lso-ribbon {
    font-size: 2rem;
    margin-bottom: 16px;
    line-height: 1;
}

/* ── Title ── */
.lso-title {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0 0 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── Subtitle ── */
.lso-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.55;
    margin: 0 0 28px;
    font-family: inherit;
}

/* ── Countdown timer ── */
.lso-timer {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    margin-bottom: 20px;
    line-height: 1;
}

.lso-timer-label {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
}

/* ── Progress bar ── */
.lso-progress-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 28px;
}

.lso-progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform-origin: left;
    transition: transform 1s linear;
}

/* ── Close button ── */
.lso-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
    box-shadow: 0 4px 20px rgba(118,75,162,0.45);
}

.lso-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(118,75,162,0.65);
}

.lso-btn:active {
    transform: translateY(0);
}

/* ── Animations ── */
@keyframes lsoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lsoSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);     }
}

@keyframes lsoFlicker {
    0%,100% { transform: scaleX(1)   scaleY(1)    rotate(-1deg); opacity: 1;   }
    25%      { transform: scaleX(.9)  scaleY(1.06) rotate(1.5deg); opacity: .95; }
    50%      { transform: scaleX(1.06) scaleY(.95)  rotate(-2deg); opacity: 1;   }
    75%      { transform: scaleX(.95) scaleY(1.04) rotate(1deg);  opacity: .9;  }
}

/* ── Exit animation ── */
#lanka-silence-overlay.lso-hiding .lso-content {
    animation: lsoSlideDown 0.4s ease forwards;
}

#lanka-silence-overlay.lso-hiding .lso-backdrop {
    animation: lsoFadeOut 0.45s ease forwards;
}

@keyframes lsoSlideDown {
    to { opacity: 0; transform: translateY(30px) scale(0.96); }
}

@keyframes lsoFadeOut {
    to { opacity: 0; }
}

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
    .lso-content {
        padding: 36px 24px 32px;
    }
    .lso-candle {
        width: 56px;
        height: 112px;
    }
    .lso-timer {
        font-size: 2.4rem;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .lso-flame,
    .lso-flame-glow {
        animation: none;
    }
    .lso-content,
    .lso-backdrop {
        animation: none;
    }
}
