/* ======================================================================
   File: wwwroot/css/stage.css

   Styles for Live Stages: stage and channel cards, the LIVE badge, the live room (video area, cheer bar, notes),
   and the host control room (roster, notes list, switches).
   ====================================================================== */
/* Live Stages: channels, schedule, live room and host control room. */
.h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.h4 { font-size: 1.02rem; margin: 1.1rem 0 .4rem; }
.center-row { justify-content: center; }

.live-dot {
    display: inline-block; width: .7em; height: .7em; border-radius: 50%;
    background: #dc2626; box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); animation: livepulse 1.6s infinite;
}
@keyframes livepulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); }
    70% { box-shadow: 0 0 0 .6em rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.live-pill {
    display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 999px;
    background: #7f1d1d; color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .06em;
}
.live-pill .live-dot { background: #fecaca; }
.live-band .section-head { margin-bottom: .8rem; }

.stage-card { overflow: hidden; display: flex; flex-direction: column; }
.stage-card.is-live { border: 2px solid #dc2626; }
.stage-card-top {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem 1rem 0;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.stage-emoji { font-size: 2.6rem; line-height: 1; }
.channel-card { display: flex; gap: 1rem; padding: 1rem; align-items: center; }
.channel-card .card-body { padding: 0; }

.stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stage-head h1 { margin-bottom: .2rem; }

.stage-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.stage-screen {
    position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; color: #fff;
    background: radial-gradient(800px 400px at 30% 20%, #1e3a8a 0%, #0b1730 60%, #060b16 100%);
    display: grid; place-items: center; text-align: center; padding: 1rem;
}
.stage-placeholder { max-width: 520px; }
.stage-placeholder .muted { color: #c7d2ea; }
.stage-host-emoji { display: block; font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1.1; }
.host-away { position: absolute; top: .6rem; left: .6rem; right: .6rem; margin: 0; padding: .4rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .7); color: #fff; }
.featured {
    position: absolute; left: .8rem; right: .8rem; bottom: .8rem; display: flex; gap: .7rem; align-items: center;
    background: rgba(255, 255, 255, .96); color: #0f172a; border-radius: 14px; padding: .6rem .9rem; text-align: left;
}
.featured p { margin: 0; }
.featured .avatar { background: #e8eef9; border-color: #cbd5e6; }

.cheer-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float-cheer { position: absolute; bottom: -2rem; font-size: 2rem; animation: floatup 2.3s ease-out forwards; }
@keyframes floatup {
    0% { transform: translateY(0) scale(.8); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateY(-320px) scale(1.4); opacity: 0; }
}

.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.stage-count { margin: 0; }
.cheer-bar { display: flex; flex-wrap: wrap; gap: .35rem; }
.cheer-btn {
    width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface);
    font-size: 1.5rem; cursor: pointer;
}
.cheer-btn:hover { background: var(--surface-2); border-color: var(--primary); }
.cheer-btn:active { transform: scale(.92); }

.onstage { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .8rem 0 0; }
.onstage:empty { display: none; }
.guest { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem .3rem .3rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.audience-panel { margin-top: 1rem; }
.pulse-row { margin-top: .6rem; }
.note-form { margin-top: 1rem; }
.note-row { display: flex; gap: .5rem; margin-top: .3rem; }
.note-row input { flex: 1; }

.control-room { margin-top: 0; }
.room-settings { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .9rem; margin: 0 0 1rem; display: grid; gap: .4rem; }
.room-settings legend { font-weight: 700; padding: 0 .3rem; }
.pulse-box { background: var(--surface-2); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .6rem; }
.pulse-box p { margin: 0 0 .3rem; }
.roster, .notes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; max-height: 320px; overflow-y: auto; }
.roster-row, .note-row-item, .notes li { padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.roster-row.has-hand { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.roster-who { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.roster-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.notes .note-text { margin: .2rem 0 0; overflow-wrap: anywhere; }

@media (max-width: 960px) {
    .stage-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .live-dot, .float-cheer { animation: none !important; }
}

/* ---------- Live video (filled in by wwwroot/js/stage-media.js) ---------- */
.media-tiles { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr; gap: 3px; background: #000; }
.media-tiles.has-guests { grid-template-columns: 3fr 1fr; grid-auto-rows: 1fr; }
.media-tile { position: relative; margin: 0; min-height: 0; background: #000; }
.media-tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.media-tiles.has-guests .media-tile.is-host { grid-row: 1 / span 6; }
.media-tile figcaption {
    position: absolute; left: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px;
    background: rgba(0, 0, 0, .65); color: #fff; font-size: .85rem;
}
.enable-sound { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 5; }
.host-media { align-items: center; margin-block: .5rem; }
