/* ============================================================
   Native session Stream layer (game-client StreamLayer DOM).
   The TypeScript client appends this overlay into the canvas
   stage container, so it is JS-created (no Blazor scoped [b-hash])
   and must be styled GLOBALLY. On the Veil (StreamLayers="captions,
   clocks") it renders the streaming narration captions + the
   progress-clock rail; the full /live host can also mount cues.
   ============================================================ */

.rw-stream-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 40;
}

/* Hush — a soft vignette closes in while a narration plays. */
.rw-stream-overlay--hushed::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 78% 72% at 50% 44%, transparent 38%, rgba(2, 6, 10, 0.64) 100%);
    animation: rw-stream-hush-in 0.6s ease both;
}

@keyframes rw-stream-hush-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Narration captions (bottom-centre) --- */
.rw-stream-captions {
    position: absolute;
    left: 50%;
    bottom: 7%;
    transform: translateX(-50%);
    max-width: min(82%, 62rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    z-index: 2;
    animation: rw-stream-cap-rise 0.5s ease both;
}

@keyframes rw-stream-cap-rise {
    from { opacity: 0; transform: translate(-50%, 0.6rem); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.rw-stream-captions__persona {
    font-family: var(--rw-font-display, 'MedievalSharp'), serif;
    font-size: clamp(0.95rem, 1.6vw, 1.35rem);
    letter-spacing: 0.08em;
    color: var(--rw-gold, #c8a740);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.rw-stream-captions__text {
    font-family: var(--rw-font-body, 'Alegreya'), Georgia, serif;
    font-size: clamp(1.15rem, 2.2vw, 2.05rem);
    line-height: 1.36;
    color: var(--rw-sage-cream, #f0e9d6);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.92), 0 0 34px rgba(0, 0, 0, 0.7);
    background: linear-gradient(180deg, rgba(6, 14, 20, 0), rgba(6, 14, 20, 0.4));
    padding: 0.35rem 1.1rem;
    border-radius: 14px;
}

/* --- Scene Web: progress-clock rail (top-centre — clear of the Veil's side columns) --- */
.rw-stream-clocks {
    position: absolute;
    top: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 60%;
    z-index: 2;
}

.rw-stream-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.32rem;
    padding: 0.5rem 0.75rem;
    border-radius: 13px;
    background: rgba(6, 14, 20, 0.74);
    border: 1px solid rgba(196, 160, 64, 0.38);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: rw-stream-clock-in 0.4s ease both;
}

@keyframes rw-stream-clock-in {
    from { opacity: 0; transform: translateY(-0.4rem); }
    to { opacity: 1; transform: translateY(0); }
}

.rw-stream-clock__pips {
    display: flex;
    gap: 0.32rem;
}

.rw-stream-clock__pip {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    border: 1.5px solid rgba(196, 160, 64, 0.5);
    background: rgba(4, 10, 14, 0.6);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.rw-stream-clock__pip--filled {
    background: radial-gradient(circle at 35% 30%, #ffe08a, var(--rw-gold, #c8a740) 65%, #9c7d26);
    border-color: var(--rw-gold, #c8a740);
    box-shadow: 0 0 9px rgba(196, 160, 64, 0.65);
}

.rw-stream-clock__count {
    font-family: var(--rw-font-mono, 'JetBrains Mono'), monospace;
    font-size: 0.8rem;
    color: var(--rw-sage-cream, #f0e9d6);
}

/* --- Scene Web: cue toasts (top-centre) — full host only --- */
.rw-stream-cues {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.rw-stream-cue {
    padding: 0.5rem 0.95rem;
    border-radius: 11px;
    text-align: center;
    background: rgba(6, 14, 20, 0.82);
    border: 1px solid rgba(196, 160, 64, 0.32);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
    animation: rw-stream-cap-rise 0.4s ease both;
}

.rw-stream-cue__kind {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--rw-gold, #c8a740);
}

.rw-stream-cue__body {
    font-size: 0.96rem;
    color: var(--rw-sage-cream, #f0e9d6);
}
