/* Queue board TV display — serving-first, modern dark, square (no radius).
   Readable from 5m, high contrast. Scoped to .queue-board-page so nothing
   leaks into the global web.assets_frontend bundle. */

.queue-board-page * {
    box-sizing: border-box;
}

.queue-board-page,
body.queue-board-page {
    margin: 0;
    padding: 0;
    background: #06080d;
    color: #e6edf6;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
}

.queue-board-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

/* Header — solid bar, square corners */
.queue-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.75rem;
    background: #0e131c;
    border-bottom: 1px solid #1b2331;
}

.clinic-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: #38bdf8;
    margin: 0;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.last-updated {
    font-size: 0.95rem;
    color: #8a97a8;
}

/* Header mute/unmute toggle */
.sound-toggle {
    background: #1b2331;
    color: #e6edf6;
    border: 1px solid #2c3645;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}
.sound-toggle:hover {
    background: #243044;
}

/* Enable-sound overlay (one-tap, autoplay-policy gate) */
.sound-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(6, 8, 13, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.sound-enable-btn {
    background: #38bdf8;
    color: #06080d;
    border: none;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.sound-enable-btn:hover {
    background: #5cccfa;
}

.sound-overlay-hint {
    color: #8a97a8;
    font-size: 1.05rem;
    margin: 0;
    text-align: center;
    max-width: 28rem;
}

/* "Now Calling" flash banner */
.now-calling-flash {
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1rem 1.75rem;
    background: #38bdf8;
    color: #06080d;
    border-bottom: 2px solid #0e131c;
}
.now-calling-flash.is-on {
    animation: ncf-pulse 1s ease-in-out 0s 3;
}
.ncf-label {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.ncf-ticket {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
}
.ncf-room {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 700;
}

@keyframes ncf-pulse {
    0%, 100% { background: #38bdf8; }
    50% { background: #fde047; }
}

/* Row pulse on the lane that was just called */
.queue-row.is-calling {
    animation: row-pulse 1s ease-in-out 0s 3;
}
@keyframes row-pulse {
    0%, 100% { background: #0e131c; box-shadow: inset 0 0 0 0 #38bdf8; }
    50% { background: #102b3a; box-shadow: inset 6px 0 0 0 #38bdf8; }
}

/* Reconnect banner — hidden by default; JS toggles display.
   Scoped .d-none kept so we don't clobber the site navbar utility. */
.queue-board-page .d-none { display: none !important; }

.reconnect-banner {
    background: #f59e0b;
    color: #111;
    text-align: center;
    padding: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Serving rows table */
.queue-table {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.queue-rows {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.queue-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 1fr 1fr;
    align-items: center;
    border-bottom: 1px solid #1b2331;
}

/* Column header row */
.queue-row-head {
    background: #0b0f17;
    border-bottom: 2px solid #1b2331;
}

.queue-row-head .cell {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a97a8;
    font-weight: 700;
    padding: 0.85rem 1.75rem;
}

.cell {
    padding: 1.5rem 1.75rem;
}

/* Zebra striping on data rows for legibility */
.queue-rows .queue-row:nth-child(odd) {
    background: #0e131c;
}
.queue-rows .queue-row:nth-child(even) {
    background: #0a0e16;
}

/* PRIMARY DISPLAY: the serving ticket number — biggest element on screen */
.serving-num {
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 900;
    color: #38bdf8;
    line-height: 1;
    display: inline-block;
}

.serving-empty {
    color: #2c3645;
}

.cell-room {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 600;
    color: #cbd5e1;
}

.cell-next .next-num {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #cbd5e1;
    line-height: 1;
}

.next-empty {
    color: #2c3645;
}

/* On-break lane */
.queue-row.status-break .serving-num {
    color: #f59e0b;
}

.break-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 1rem;
    background: #f59e0b;
    color: #111;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Empty state */
.queue-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-message {
    text-align: center;
    color: #2c3645;
}

.empty-message p {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}
