/* ======================
   PERFORMANCE MODE
   ====================== */

/* Viewer bubble container — same dimensions as featureBubbles */
#viewerBubbles {
    position: relative;
    width: min(100%, 18rem);
    height: clamp(220px, 50vh, 450px);
    margin-top: var(--space-md);
    overflow: visible;
    z-index: var(--z-content);
}

/* ── Pill buttons (shared by performer switcher and banner) ── */

.performer-pill,
.performer-banner-btn {
    font-size: var(--text-caption);
    font-weight: 300;
    letter-spacing: var(--ls-caption);
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--warm-grey);
    border-radius: var(--radius-pill);
    padding: var(--space-2xs) var(--space-md);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    -webkit-tap-highlight-color: transparent;
}

.performer-pill.active {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-subtle);
}

/* Performer switcher — horizontal pill bar */
#performerSwitcher {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    padding: var(--space-xs) 0;
    z-index: var(--z-controls);
}

/* ── Performance LIVE mode ── */

.listen-experience.performance-live {
    background: rgba(0, 0, 0, 0.95);
}

.listen-experience.performance-live .listen-title {
    color: var(--warm-white);
    opacity: 0.4;
}

.listen-experience.performance-live .feature-bubbles {
    background: var(--warm-white);
    border-radius: var(--radius-lg);
}

.listen-experience.performance-live .participant-count,
.listen-experience.performance-live .mute-btn {
    color: var(--warm-white);
    opacity: 0.4;
}


/* ── Countdown overlay (cinematic blackout, last 30s) ──── */

#performanceCountdown {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-slow) ease, background var(--duration-slow) ease;
}

#performanceCountdown.visible {
    opacity: 1;
    pointer-events: auto;
}

#performanceCountdown.fading {
    background: rgba(0, 0, 0, 0.95);
    transition: opacity 5s ease;
}

#performanceCountdown.cinematic {
    background: rgba(0, 0, 0, 0.95);
}

#countdownTimer {
    font-size: 8rem;
    font-weight: 300;
    color: var(--warm-white);
    letter-spacing: var(--ls-caption);
}

/* ── Top bar (shared layout for performer + countdown banners) ── */

.performer-banner,
#countdownBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-xs) var(--space-md);
    min-height: var(--space-3xl);
    background: var(--accent-subtle);
    border-bottom: 1px solid var(--warm-grey);
    text-align: center;
    z-index: var(--z-notification);
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
}

.performer-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#countdownBanner {
    pointer-events: auto;
}

#countdownBanner p {
    font-size: var(--text-caption);
    font-weight: 300;
    letter-spacing: var(--ls-caption);
    color: var(--text-primary);
    margin: 0;
}

#countdownBanner.live .performer-select {
    color: var(--text-primary);
    border-color: var(--warm-grey);
}

#countdownBanner.live .performer-select option {
    background: var(--warm-white);
    color: var(--text-primary);
}

.performer-select {
    font-family: inherit;
    font-size: var(--text-small);
    font-weight: 300;
    color: var(--warm-white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-2xs) var(--space-xs);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.performer-select option {
    background: #1e1e1c;
    color: var(--warm-white);
}

.performer-banner-text {
    font-size: var(--text-caption);
    font-weight: 300;
    letter-spacing: var(--ls-caption);
    margin-bottom: var(--space-2xs);
}

.performer-banner-actions {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
}

.performer-banner-btn {
    color: var(--text-primary);
}

.performer-banner-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.performer-banner-countdown {
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

.performer-banner-accept {
    border-color: var(--success);
    color: var(--success);
}

.performer-banner-decline {
    border-color: var(--error);
    color: var(--error);
}

/* ── Lead sheet modal ──────────────────────────────────── */

.lead-sheet-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg-dark);
    z-index: calc(var(--z-overlay) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.lead-sheet-modal,
.lead-sheet-info-modal {
    background: var(--warm-white);
    border: 1px solid var(--warm-grey);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    width: min(100%, 24rem);
    max-height: 80vh;
    overflow-y: auto;
}

.lead-sheet-info-modal {
    width: min(100%, 20rem);
}

.lead-sheet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: var(--text-body);
    font-weight: 300;
    letter-spacing: var(--ls-body);
}

.lead-sheet-modal-close {
    font-size: var(--text-subheading);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 var(--space-2xs);
    line-height: 1;
}

.lead-sheet-modal-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.lead-sheet-modal-item {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--duration-normal) ease;
}

.lead-sheet-modal-item.has-info {
    cursor: pointer;
}

.lead-sheet-modal-item.has-info:hover {
    background: var(--accent-subtle);
}

.lead-sheet-modal-item.active {
    background: var(--accent-subtle-hover);
    border-left: 2px solid var(--accent);
}

.lead-sheet-modal-item.past {
    opacity: 0.4;
}

.lead-sheet-modal-name {
    font-size: var(--text-body);
    font-weight: 300;
    letter-spacing: var(--ls-body);
}

.lead-sheet-info-body {
    font-size: var(--text-body);
    font-weight: 300;
    letter-spacing: var(--ls-body);
}

.lead-sheet-info-body p {
    margin-bottom: var(--space-xs);
}

.lead-sheet-performer-notes {
    color: var(--text-muted);
    font-style: italic;
}

.lead-sheet-info-label {
    color: var(--text-muted);
    font-size: var(--text-caption);
    text-transform: uppercase;
    letter-spacing: var(--ls-button);
}

.lead-sheet-info-body ul {
    padding-left: var(--space-md);
    margin: var(--space-2xs) 0;
}

.lead-sheet-info-body li {
    margin-bottom: var(--space-2xs);
}
