/* ================================================
   Season 5 behaviour layer (driven by js/main.js)
   - reading progress bar under the top bar
   - player quotes as a slim bottom bar
   - countdown "Server is LIVE" state
   ================================================ */

/* ---------- Reading progress ---------- */
.s5-progress {
    position: fixed;
    top: var(--topbar-height, 60px);
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1001;
    pointer-events: none;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-gold));
    box-shadow: 0 0 6px rgba(var(--accent-gold-rgb), 0.45);
    transform: scaleX(0);
    transform-origin: 0 50%;
    will-change: transform;
}
[dir="rtl"] .s5-progress { transform-origin: 100% 50%; }

/* ---------- Player quotes: slim docked bar ---------- */
.review-toast {
    top: auto;
    bottom: 10px;
    left: calc(var(--sidebar-width, 280px) + 16px);
    right: 16px;
    width: auto;
    max-width: 760px;
    height: auto;
    max-height: 48px;
    margin: 0 auto;
    padding: 6px 8px 6px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    border-color: rgba(var(--accent-gold-rgb), 0.55);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(12px);
}
body.sidebar-collapsed .review-toast { left: 16px; }

/* hidden until the visitor has scrolled past the hero */
body:not(.s5-past-hero) .review-toast,
body:not(.s5-past-hero) .review-toast.is-visible {
    opacity: 0;
    pointer-events: none;
}

.review-toast-head { display: contents; }
.review-toast-avatar,
.review-toast-country,
.review-toast-season { display: none; }

.review-toast-id {
    order: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.review-toast-meta { order: -1; margin: 0; }
.review-toast-name {
    font-family: var(--font-label);
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--accent-gold);
}
.review-toast-text {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.review-toast-close { order: 3; }

@media (max-width: 1024px) {
    .review-toast { left: 12px; right: 12px; }
}

@media (max-width: 600px) {
    .review-toast {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        padding: 5px 6px 5px 12px;
        border-radius: 14px;
    }
    /* two short lines fit inside the 48px cap on phones */
    .review-toast-text {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 12px;
        line-height: 16px;
        max-height: 32px;
    }
    .review-toast-name { font-size: 13px; }
}

/* ---------- Countdown: LIVE state ---------- */
.countdown-popup.s5-live {
    border-color: var(--accent-arc);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55), 0 0 24px rgba(var(--accent-arc-rgb), 0.3);
}
.countdown-popup.s5-live .countdown-status {
    font-family: var(--font-heading);
    color: var(--accent-arc-bright);
}
.countdown-popup.s5-live .countdown-status::before {
    background: var(--accent-arc);
    box-shadow: 0 0 8px var(--accent-arc);
}
.countdown-popup.s5-live #countdownAfter .countdown-timer { display: none; }

.s5-live-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.s5-live-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}
.s5-play {
    padding: 11px 12px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1208;
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-orange));
    border: 1px solid #f3dea6;
    box-shadow: 0 0 16px rgba(var(--accent-arc-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: s5LiveGlow 2.4s ease-in-out infinite;
}
.s5-play:hover,
.s5-play:focus-visible {
    filter: brightness(1.08);
    box-shadow: 0 0 22px rgba(var(--accent-arc-rgb), 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.s5-discord {
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.35);
}
.s5-discord:hover,
.s5-discord:focus-visible { color: var(--accent-gold); border-color: var(--accent-gold); }

.countdown-popup.s5-live.is-minimized .countdown-pill {
    border-color: var(--accent-arc);
    color: var(--accent-arc-bright);
}

@keyframes s5LiveGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(var(--accent-arc-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 22px rgba(var(--accent-arc-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .s5-play,
    .countdown-popup.s5-live .countdown-status::before { animation: none; }
    .review-toast,
    .review-toast.is-visible { transform: none; }
}
