/**
 * Taaboor — Display / TV ("Broadcast" surface)
 * Tokens scoped to .display-body only (no :root) so global app variables from tokens.css are not overridden.
 * Visual: high contrast, calm motion, no dependency on external hero images.
 */

.display-body {
  --display-bg: #07080d;
  --display-radius: 2px;
  --glass-surface: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 22px;

  --accent-blue: #a78bfa;
  --accent-emerald: #34d399;
  --accent-purple: #c4b5fd;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;

  --shadow-neon: 0 0 48px color-mix(in srgb, var(--accent-blue) 22%, transparent);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);

  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--display-bg);
  color: var(--text-primary);
  font-family: var(--font-arabic), var(--font-sans), system-ui, sans-serif;
  overflow: hidden;
  position: relative;
}

/* Ambient backdrop — pure CSS (no texture asset required) */
.display-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 120% 70% at 85% 5%, color-mix(in srgb, var(--accent-blue) 16%, transparent), transparent 52%),
    radial-gradient(ellipse 90% 55% at 0% 100%, color-mix(in srgb, var(--accent-emerald) 10%, transparent), transparent 48%),
    linear-gradient(180deg, #0c0e14 0%, var(--display-bg) 45%, #030306 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .display-body::before {
    animation: display-backdrop-drift 48s ease-in-out infinite alternate;
  }
}

@keyframes display-backdrop-drift {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.02); opacity: 0.92; }
}

/* Shell Layout */
.display-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(0.55rem, 1.85vh, 2.4vh) clamp(0.5rem, 2.2vw, 2.5vw);
  box-sizing: border-box;
  gap: clamp(0.45rem, 1.55vh, 2.2vh);
  overflow: hidden;
}

/* Header Refinement */
.display-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: clamp(0.45rem, 1.05vh, 1.4vh) clamp(0.55rem, 1.5vw, 1.85vw);
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.display-brand-mark {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255,255,255,0.06);
  padding: 0.8vh 1.2vw;
  border-radius: var(--display-radius);
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition-smooth);
}

.display-brand-mark:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.display-brand-mark > a {
  display: block;
  flex: 0 0 auto;
  --display-logo-size: clamp(3.75rem, 6.25vh, 5.25rem);
  width: var(--display-logo-size);
  height: var(--display-logo-size);
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 1.05rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.display-brand-mark > a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.display-brand-mark .brand-wrapper {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.display-brand-mark .brand-wrapper--display {
  width: 100%;
  height: 100%;
}

.display-brand-mark .brand-logo--display {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill;
  object-position: center;
  filter: none;
}

.display-brand-mark--company > a {
  background: #fff;
}

.display-brand-mark--company .brand-logo--display {
  object-fit: fill;
}

.display-brand-mark--platform > a {
  padding: 0.42rem 0.5rem;
  box-sizing: border-box;
}

.display-brand-mark--platform .brand-logo--display {
  object-fit: contain;
}

.display-brand-mark img {
  display: block;
}

.display-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.display-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.display-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Top bar stack: sound hint floats over main — does not steal flex height from the call box */
.display-topbar-region {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

.display-sound-hint {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  margin: clamp(0.2rem, 0.45vh, 0.5rem) 0 0;
  padding: 0.55rem 1rem;
  font-size: clamp(0.78rem, 1.45vh, 0.92rem);
  line-height: 1.4;
  color: var(--text-secondary);
  background: rgba(12, 14, 20, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.display-sound-hint[hidden] {
  display: none !important;
}

/* Reserve a slim band under the header when the hint is visible (overlay, not flex sibling) */
.display-shell.display-shell--sound-hint-visible .display-main {
  padding-top: clamp(2.35rem, 5.5vh, 3.25rem);
  box-sizing: border-box;
}

.display-shell.display-shell--sound-hint-visible .display-layout--focus-hero .display-spotlight-stage {
  padding-top: 0;
}

.display-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.08);
  padding: 0.6vh 1.2vw;
  border-radius: var(--display-radius);
  border: 1px solid rgba(255,255,255,0.1);
  margin-inline-end: 15px;
  min-width: 130px;
  text-align: center;
  gap: 2px;
}
.display-time {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Inter', system-ui, sans-serif;
  color: #fff;
}
.display-date {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
}
.display-live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  margin-inline-start: 10px;
  flex-shrink: 0;
}
.display-live-dot.is-live {
  background: var(--accent-emerald, #10b981);
  box-shadow: 0 0 10px var(--accent-emerald, #10b981);
}
.display-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-weight: 700;
  border-radius: var(--display-radius);
  padding: 1vh 1.5vw;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.display-btn:hover {
  background: rgba(255,255,255,0.12);
}
.display-btn--active {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 10px rgba(16,185,129,0.25);
}
.display-btn--active:hover {
  background: rgba(16,185,129,0.28);
}

#fullscreen-btn.qb-header__btn--expand-hint {
  position: relative;
}

#fullscreen-btn.qb-header__btn--expand-hint::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb020;
  border: 2px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.55);
  pointer-events: none;
  animation: display-fullscreen-hint-pulse 1.85s ease-in-out infinite;
}

@keyframes display-fullscreen-hint-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.55);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(255, 176, 32, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #fullscreen-btn.qb-header__btn--expand-hint::after {
    animation: none;
  }
}

.display-status-pill {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 15px var(--accent-emerald);
  margin-inline-start: 10px;
}

/* Main Display Area — hero row (current + inline QR), then next board */
.display-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.55rem, 1.85vh, 2.4vh);
  min-height: 0;
  overflow: hidden;
}

.display-hero-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(0.55rem, 2vw, 2rem);
  min-height: 0;
  width: 100%;
}

.display-hero-row .now-serving-card {
  flex: 1 1 0%;
  min-width: 0;
}

/* Compact QR beside current ticket (RTL/LTR: order follows DOM; mirror via flex) */
.display-hero-row .qr-panel {
  flex: 0 0 auto;
  align-self: stretch;
  width: clamp(140px, 20vw, 260px);
  max-width: min(30vw, 280px);
  padding: clamp(1rem, 2.5vh, 3.5vh) clamp(0.8rem, 2vw, 2.5vw);
  border-radius: var(--display-radius);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
}

.display-hero-row .qr-panel .display-section-label {
  font-size: clamp(0.65rem, 1.5vh, 1.15rem);
  margin-bottom: clamp(0.4rem, 1.8vh, 2.4vh);
  line-height: 1.4;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.display-hero-row .join-qr-host {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: clamp(145px, 22vh, 295px);
  padding: clamp(8px, 1.4vh, 22px);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.display-main > .display-grid {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-self: stretch;
}

/* Now Serving Hero */
.now-serving-card {
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent-blue) 12%, transparent), transparent 42%),
              var(--glass-surface);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: clamp(0.35rem, 1vh, 1.25vh);
  padding: clamp(1rem, 3.2vh, 4.5vh) clamp(1rem, 3.5vw, 4vw);
  position: relative;
  overflow: visible;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

.now-serving-card__title {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 0 clamp(0.35rem, 1vh, 1.1vh);
  padding-top: clamp(0.1rem, 0.35vh, 0.45rem);
  line-height: 1.4;
  color: color-mix(in srgb, var(--text-secondary) 88%, #fff 12%);
  opacity: 1;
  visibility: visible;
}

.now-serving-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
}

.display-section-label {
  font-size: clamp(0.95rem, 2.1vh, 1.55rem);
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: clamp(0.35rem, 1.2vh, 1.75vh);
}

.now-ticket-number {
  font-size: clamp(3.25rem, min(16vw, 20vh), 9rem);
  font-weight: 900;
  line-height: 1.08;
  padding-block: 0.04em;
  font-family: var(--font-sans), system-ui, sans-serif;
  background: linear-gradient(135deg, #fff 28%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 20px 48px color-mix(in srgb, var(--accent-blue) 28%, transparent));
  margin: clamp(0.15rem, 0.85vh, 1.1vh) 0;
}

@media (prefers-reduced-motion: no-preference) {
  .now-ticket-number {
    animation: number-pulse 5s ease-in-out infinite alternate;
  }
}

@keyframes number-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 20px 48px color-mix(in srgb, var(--accent-blue) 26%, transparent)); }
  100% { transform: scale(1.015); filter: drop-shadow(0 26px 56px color-mix(in srgb, var(--accent-blue) 38%, transparent)); }
}

.now-ticket-service {
  font-size: clamp(0.95rem, 2.4vh, 1.85rem);
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: clamp(0.4rem, 1.1vh, 1.35vh) clamp(0.75rem, 2.5vw, 2.5rem);
  border-radius: var(--display-radius);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: clamp(0.35rem, 1.2vh, 1.75vh);
}

/* Secondary Panels */
.display-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.65vh, 2.2vh);
}

.display-panel {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  padding: clamp(0.55rem, 2.2vh, 2.75vh) clamp(0.55rem, 2.2vw, 2.75vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Next board: multi-column grid, equal row heights, no internal scroll */
#next-list {
  --next-cols: 2;
}

#next-list:has(.next-list-empty) {
  display: block;
  flex: 0 1 auto;
  margin-top: clamp(0.35rem, 1.1vh, 1.35vh);
  overflow: visible;
}

#next-list:not(:has(.next-list-empty)) {
  display: grid;
  grid-template-columns: repeat(var(--next-cols), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  justify-content: stretch;
  gap: clamp(0.28rem, 1.05vh, 1.05rem);
  flex: 1 1 auto;
  min-height: 0;
  margin-top: clamp(0.35rem, 1.1vh, 1.35vh);
  overflow: hidden;
}

#next-list[data-density="2"]:not(:has(.next-list-empty)) {
  gap: clamp(0.18rem, 0.72vh, 0.72rem);
}

#next-list[data-density="3"]:not(:has(.next-list-empty)) {
  gap: clamp(0.1rem, 0.48vh, 0.48rem);
}

#next-list[data-density="4"]:not(:has(.next-list-empty)) {
  gap: clamp(0.06rem, 0.32vh, 0.35rem);
}

.next-ticket {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(0.35rem, 1.2vw, 1.5rem);
  background: rgba(255,255,255,0.03);
  padding: clamp(0.45rem, 1.35vh, 2vh) clamp(0.45rem, 1.5vw, 1.75vw);
  border-radius: var(--display-radius);
  border-inline-start: 6px solid var(--accent-blue);
  transition: var(--transition-smooth);
}

#next-list:not(:has(.next-list-empty)) > .next-ticket {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(0.08rem, 0.38vh, 0.5rem);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-inline-start-width: 0;
  border-block-start: clamp(3px, 0.45vh, 5px) solid var(--accent-blue);
}

#next-list:not(:has(.next-list-empty)) > .next-ticket .next-ticket__meta {
  align-items: center;
  text-align: center;
  width: 100%;
}

.next-ticket:hover {
  background: rgba(255,255,255,0.06);
}

.next-ticket .ticket-number-sm {
  font-size: clamp(1.05rem, 2.85vh, 2.1rem);
  font-weight: 800;
  font-family: 'Inter', system-ui, sans-serif;
  color: #fff;
}

#next-list:not(:has(.next-list-empty)) > .next-ticket .ticket-number-sm {
  font-size: clamp(1.1rem, min(3.4vh, 4.2vw), 2.15rem);
  line-height: 1.05;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#next-list[data-density="2"]:not(:has(.next-list-empty)) > .next-ticket .ticket-number-sm {
  font-size: clamp(0.95rem, min(2.85vh, 3.6vw), 1.85rem);
}

#next-list[data-density="3"]:not(:has(.next-list-empty)) > .next-ticket .ticket-number-sm {
  font-size: clamp(0.82rem, min(2.35vh, 3vw), 1.55rem);
}

#next-list[data-density="4"]:not(:has(.next-list-empty)) > .next-ticket .ticket-number-sm {
  font-size: clamp(0.72rem, min(2vh, 2.6vw), 1.28rem);
}

.next-ticket:hover {
  background: rgba(255,255,255,0.06);
}

.next-ticket .ticket-number-sm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5vh;
  flex: 1;
  min-width: 0;
}

.next-ticket__service-label {
  font-size: clamp(0.72rem, 1.45vh, 1.1rem);
  color: var(--text-secondary);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

#next-list:not(:has(.next-list-empty)) > .next-ticket .next-ticket__service-label {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

#next-list[data-density="3"] > .next-ticket .next-ticket__service-label {
  -webkit-line-clamp: 1;
  line-clamp: 1;
  font-size: clamp(0.62rem, 1.15vh, 0.88rem);
}

#next-list[data-density="4"] > .next-ticket .next-ticket__service-label {
  display: none;
}

#next-list[data-density="3"] > .next-ticket .next-ticket__priority {
  max-width: 100%;
  transform: scale(0.92);
  transform-origin: center top;
}

#next-list[data-density="4"] > .next-ticket .next-ticket__priority {
  display: none;
}

.next-ticket__priority {
  flex-shrink: 0;
  max-width: 42%;
}

.display-priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.72rem, 1.1vw, 0.92rem);
  font-weight: 700;
  padding: 0.35em 0.75em;
  border-radius: var(--display-radius);
  border: 2px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(15, 23, 42, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.display-priority-pill[data-discreet='1'] {
  opacity: 0.92;
}

.now-ticket-priority {
  margin-top: 1vh;
  text-align: center;
  min-height: 1.2em;
}

/* QR Panel */
.qr-panel {
  flex-shrink: 0;
  min-height: 0;
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  padding: clamp(0.8rem, 2.5vh, 3.2vh) clamp(0.8rem, 2.5vw, 3.2vw);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.join-link-label {
  margin: clamp(0.35rem, 1vh, 0.75rem) 0 0;
  font-size: clamp(0.72rem, 1.15vh, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.join-link {
  display: block;
  width: min(100%, 28rem);
  margin-top: clamp(0.25rem, 0.8vh, 0.55rem);
  padding: clamp(0.35rem, 0.9vh, 0.55rem) clamp(0.5rem, 1.2vw, 0.75rem);
  font-size: clamp(0.68rem, 1.05vh, 0.86rem);
  line-height: 1.4;
  color: #7dd3fc;
  word-break: break-all;
  text-decoration: none;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.join-link:hover,
.join-link:focus-visible {
  color: #bae6fd;
  text-decoration: underline;
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(125, 211, 252, 0.45);
  outline: none;
}

.join-qr-host {
  background: #fff;
  padding: clamp(8px, 1.4vh, 18px);
  border-radius: var(--display-radius);
  width: clamp(130px, 18vh, 22vh);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  margin: clamp(0.5rem, 1.4vh, 1.8vh) 0;
  position: relative;
}

.join-qr-host::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-blue), transparent);
  opacity: 0.3;
  z-index: -1;
}

.qr-placeholder {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Reconnect Overlay */
.display-footer {
  min-height: 28px;
  flex-shrink: 0;
}

.display-reconnect {
  position: fixed;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-purple);
  padding: 1vh 2vw;
  border-radius: var(--display-radius);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 0 30px var(--accent-purple);
  animation: bounce 1s infinite alternate;
}

.display-footer-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  justify-content: space-between;
  padding-top: 1vh;
  min-width: 0;
}

.display-remote-hint {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-size: clamp(0.72rem, 1.05vw, 0.92rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-secondary);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.display-remote-hint strong {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
  margin-inline-end: 0.35em;
}

.display-watermark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.6;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  padding: 0.6vh 1.2vw;
  border-radius: var(--display-radius);
  border: 1px solid rgba(255,255,255,0.05);
}

.display-watermark strong {
  color: #fff;
  letter-spacing: 0.05em;
  font-weight: 800;
}

@keyframes bounce {
  from { transform: translate(-50%, 0); }
  to { transform: translate(-50%, -10px); }
}

/* Responsive Overrides — kiosk-style: no page scroll inside the shell */
@media (max-width: 1024px) {
  .display-main {
    grid-template-columns: 1fr;
    overflow: hidden;
    min-height: 0;
  }

  .display-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .display-shell {
    padding: clamp(10px, 3vw, 15px);
  }

  .display-hero-row {
    flex-direction: column;
    align-items: center;
  }

  .display-hero-row .now-serving-card {
    width: 100%;
  }

  .display-hero-row .qr-panel {
    width: min(100%, 220px);
    max-width: 280px;
  }

  .now-ticket-number {
    font-size: clamp(2.5rem, min(22vw, 18vh), 5rem);
  }
}

/* ================================================
   THEME: midnight — Midnight Purple Aurora
   ================================================ */
[data-theme="midnight"] {
  --display-bg: #0d0a1a;
  --glass-surface: rgba(139, 92, 246, 0.06);
  --glass-border: rgba(139, 92, 246, 0.15);
  --accent-blue: #a78bfa;
  --accent-emerald: #e879f9;
  --accent-purple: #6d28d9;
  --text-secondary: #a78bfa;
  --shadow-neon: 0 0 40px rgba(139,92,246,0.2);
}
[data-theme="midnight"] .display-body::before {
  background:
    linear-gradient(to bottom, rgba(13,10,26,0.6), rgba(13,10,26,0.92)),
    radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(109,40,217,0.2) 0%, transparent 50%);
}
[data-theme="midnight"] .now-ticket-number {
  background: linear-gradient(135deg, #f5d0fe 0%, #a855f7 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 20px 40px rgba(168,85,247,0.5));
}
[data-theme="midnight"] .now-ticket-number {
  animation: pulse-purple 2s ease-in-out infinite alternate;
}
@keyframes pulse-purple {
  0%  { filter: drop-shadow(0 20px 40px rgba(168,85,247,0.35)); }
  100%{ filter: drop-shadow(0 25px 60px rgba(168,85,247,0.7)); }
}
[data-theme="midnight"] .now-serving-card {
  background: radial-gradient(circle at top right, rgba(139,92,246,0.12), transparent 40%),
              var(--glass-surface);
}
[data-theme="midnight"] .next-ticket {
  border-inline-start-color: #a78bfa;
}
[data-theme="midnight"] .qr-panel {
  background: linear-gradient(135deg, #2d1b69 0%, #0d0a1a 100%);
}
[data-theme="midnight"] .display-live-dot.is-live {
  background: #a78bfa;
  box-shadow: 0 0 12px #a78bfa;
}
[data-theme="midnight"] .display-btn--active {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.5);
  box-shadow: 0 0 10px rgba(139,92,246,0.3);
}

/* ================================================
   THEME: clinic — Medical White (Clean & Light)
   ================================================ */
[data-theme="clinic"] {
  --display-bg: #f0f5fb;
  --glass-surface: rgba(255,255,255,0.85);
  --glass-border: rgba(14,165,233,0.15);
  --accent-blue: #0284c7;
  --accent-emerald: #059669;
  --accent-purple: #6366f1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --shadow-neon: 0 0 30px rgba(2,132,199,0.1);
}
[data-theme="clinic"] .display-body {
  color: #0f172a;
}
[data-theme="clinic"] .display-body::before {
  background:
    linear-gradient(160deg, rgba(240,245,251,0.96) 0%, rgba(219,234,254,0.9) 100%),
    radial-gradient(ellipse at 30% 0%, rgba(56,189,248,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(99,102,241,0.1) 0%, transparent 50%);
  animation: none;
}
[data-theme="clinic"] .display-topbar {
  background: rgba(255,255,255,0.9);
  border-color: rgba(2,132,199,0.15);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
[data-theme="clinic"] .display-brand-mark {
  background: rgba(2,132,199,0.06);
  border-color: rgba(2,132,199,0.12);
}

[data-theme="clinic"] .display-brand-mark > a {
  background: #fff;
  border-color: rgba(2, 132, 199, 0.18);
  box-shadow:
    0 8px 22px rgba(2, 132, 199, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
[data-theme="clinic"] .display-title {
  background: linear-gradient(to right, #0284c7, #0369a1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="clinic"] .display-subtitle { color: #475569; }
[data-theme="clinic"] .display-time { color: #0f172a; }
[data-theme="clinic"] .display-date { color: #64748b; }
[data-theme="clinic"] .display-clock {
  background: rgba(2,132,199,0.07);
  border-color: rgba(2,132,199,0.15);
}
[data-theme="clinic"] .display-btn {
  background: rgba(2,132,199,0.08);
  border-color: rgba(2,132,199,0.2);
  color: #0284c7;
}
[data-theme="clinic"] .display-btn:hover {
  background: rgba(2,132,199,0.15);
}
[data-theme="clinic"] .display-btn--active {
  background: rgba(5,150,105,0.12);
  border-color: rgba(5,150,105,0.35);
  color: #059669;
  box-shadow: 0 0 8px rgba(5,150,105,0.2);
}
[data-theme="clinic"] .now-serving-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(2,132,199,0.18);
  box-shadow: 0 20px 60px rgba(2,132,199,0.08);
}
[data-theme="clinic"] .display-section-label { color: #64748b; }
[data-theme="clinic"] .now-ticket-number {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(2,132,199,0.25));
  animation: none;
}
[data-theme="clinic"] .now-ticket-service {
  color: #059669;
  background: rgba(5,150,105,0.08);
  border-color: rgba(5,150,105,0.2);
}
[data-theme="clinic"] .display-panel {
  background: rgba(255,255,255,0.85);
  border-color: rgba(2,132,199,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
[data-theme="clinic"] .next-ticket {
  background: rgba(2,132,199,0.04);
  border-inline-start-color: #0284c7;
}
[data-theme="clinic"] .next-ticket .ticket-number-sm { color: #0f172a; }
[data-theme="clinic"] .next-ticket span { color: #475569; }
[data-theme="clinic"] .qr-panel {
  background: linear-gradient(135deg, #dbeafe 0%, #f5f3ff 100%);
  border-color: rgba(2,132,199,0.15);
}
[data-theme="clinic"] .display-watermark { color: #64748b; }
[data-theme="clinic"] .display-watermark strong { color: #0f172a; }
[data-theme="clinic"] .display-live-dot.is-live {
  background: #059669;
  box-shadow: 0 0 8px rgba(5,150,105,0.5);
}

/* ================================================
   THEME: gold — Royal Gold
   ================================================ */
[data-theme="gold"] {
  --display-bg: #0a0804;
  --glass-surface: rgba(245,158,11,0.05);
  --glass-border: rgba(245,158,11,0.12);
  --accent-blue: #f59e0b;
  --accent-emerald: #fbbf24;
  --accent-purple: #d97706;
  --text-secondary: #d97706;
  --shadow-neon: 0 0 40px rgba(245,158,11,0.2);
}
[data-theme="gold"] .display-body::before {
  background:
    linear-gradient(to bottom, rgba(10,8,4,0.65), rgba(10,8,4,0.92)),
    radial-gradient(ellipse at 15% 30%, rgba(245,158,11,0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(180,83,9,0.2) 0%, transparent 50%),
    url('/assets/img/sci_fi_bg.png') center/cover no-repeat;
}
[data-theme="gold"] .display-title {
  background: linear-gradient(to right, #fef3c7, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="gold"] .now-ticket-number {
  background: linear-gradient(135deg, #fef9c3 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 20px 40px rgba(245,158,11,0.5));
  animation: pulse-gold 2s ease-in-out infinite alternate;
}
@keyframes pulse-gold {
  0%  { filter: drop-shadow(0 20px 40px rgba(245,158,11,0.35)); }
  100%{ filter: drop-shadow(0 25px 60px rgba(245,158,11,0.7)); }
}
[data-theme="gold"] .now-serving-card {
  background: radial-gradient(circle at top right, rgba(245,158,11,0.1), transparent 40%),
              var(--glass-surface);
  border-color: rgba(245,158,11,0.15);
}
[data-theme="gold"] .now-ticket-service {
  color: #fbbf24;
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.2);
}
[data-theme="gold"] .display-panel {
  border-color: rgba(245,158,11,0.1);
}
[data-theme="gold"] .next-ticket {
  border-inline-start-color: #f59e0b;
}
[data-theme="gold"] .qr-panel {
  background: linear-gradient(135deg, #451a03 0%, #0a0804 100%);
  border-color: rgba(245,158,11,0.15);
}
[data-theme="gold"] .display-topbar {
  border-color: rgba(245,158,11,0.12);
}
[data-theme="gold"] .display-live-dot.is-live {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245,158,11,0.8);
}
[data-theme="gold"] .display-btn--active {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.45);
  box-shadow: 0 0 10px rgba(245,158,11,0.25);
}

/* ================================================
   THEME: emerald — Emerald Forest
   ================================================ */
[data-theme="emerald"] {
  --display-bg: #021a12;
  --glass-surface: rgba(16,185,129,0.06);
  --glass-border: rgba(16,185,129,0.14);
  --accent-blue: #34d399;
  --accent-emerald: #6ee7b7;
  --accent-purple: #059669;
  --text-secondary: #6ee7b7;
  --shadow-neon: 0 0 40px rgba(16,185,129,0.2);
}
[data-theme="emerald"] .display-body::before {
  background:
    linear-gradient(to bottom, rgba(2,26,18,0.65), rgba(2,26,18,0.92)),
    radial-gradient(ellipse at 20% 50%, rgba(16,185,129,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(52,211,153,0.2) 0%, transparent 50%),
    url('/assets/img/sci_fi_bg.png') center/cover no-repeat;
}
[data-theme="emerald"] .display-title {
  background: linear-gradient(to right, #d1fae5, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="emerald"] .now-ticket-number {
  background: linear-gradient(135deg, #ecfdf5 0%, #34d399 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 20px 40px rgba(16,185,129,0.5));
  animation: pulse-emerald 2s ease-in-out infinite alternate;
}
@keyframes pulse-emerald {
  0%  { filter: drop-shadow(0 20px 40px rgba(16,185,129,0.35)); }
  100%{ filter: drop-shadow(0 25px 60px rgba(16,185,129,0.7)); }
}
[data-theme="emerald"] .now-serving-card {
  background: radial-gradient(circle at top right, rgba(16,185,129,0.12), transparent 40%),
              var(--glass-surface);
}
[data-theme="emerald"] .now-ticket-service {
  color: #34d399;
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25);
}
[data-theme="emerald"] .next-ticket {
  border-inline-start-color: #34d399;
}
[data-theme="emerald"] .qr-panel {
  background: radial-gradient(circle at top right, rgba(16,185,129,0.15), transparent 60%),
              rgba(16, 185, 129, 0.05);
  border-color: rgba(16,185,129,0.2);
}
[data-theme="emerald"] .display-live-dot.is-live {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52,211,153,0.8);
}
[data-theme="emerald"] .display-btn--active {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 10px rgba(16,185,129,0.3);
}

/* ==========================================================================
   CLASSIC SPLIT-SCREEN LAYOUT: Royal Split-Screen Dashboard
   ========================================================================== */
.display-layout--classic {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(0.5rem, 1.8vh, 2vh) !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* 3-Column Topbar Adjustment */
.display-topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.display-sound-indicator-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 50px !important;
  padding: 0.6vh 1.2vw !important;
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: none !important;
}

.display-sound-indicator-btn.display-btn--active {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: var(--accent-emerald, #10b981) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1) !important;
}

/* Grid splits: Next List on left (35%), Now Serving on right (65%) */
.display-classic-grid {
  display: grid !important;
  grid-template-columns: 35% 1fr !important;
  gap: clamp(0.5rem, 1.8vh, 2vh) !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

[dir="rtl"] .display-classic-grid {
  grid-template-columns: 35% 1fr !important;
}

.display-next-column {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.display-next-column .display-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.display-serving-column {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.display-serving-column .now-serving-card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  text-align: center !important;
  padding: clamp(1rem, 4vh, 6vh) !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Spotlight serving card active calling state styling */
.now-ticket-active-group {
  width: 100% !important;
  max-width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: clamp(0.35rem, 1vh, 1.25vh);
  padding-inline: clamp(0.25rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

.now-ticket-active-group .now-ticket-number {
  font-size: clamp(4.5rem, 10.5vh, 9rem) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: -2px !important;
  color: var(--accent-blue) !important;
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.3) !important;
  margin-bottom: 1.5vh !important;
}

[data-theme="gold"] .now-ticket-active-group .now-ticket-number {
  color: #fbbf24 !important;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.4) !important;
}
[data-theme="emerald"] .now-ticket-active-group .now-ticket-number {
  color: #34d399 !important;
  text-shadow: 0 0 35px rgba(16, 185, 129, 0.4) !important;
}
[data-theme="clinic"] .now-ticket-active-group .now-ticket-number {
  color: #0ea5e9 !important;
  text-shadow: 0 0 35px rgba(2, 132, 199, 0.3) !important;
}

.now-ticket-active-group .now-ticket-service {
  font-size: clamp(1.3rem, 3.2vh, 2.2rem) !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 0 2.5vh 0 !important;
}

/* Beautiful destination badge: "الرجاء التوجه إلى العيادة رقم 3" */
.now-ticket-destination-badge {
  display: block !important;
  max-width: min(100%, 40rem);
  width: fit-content;
  margin-inline: auto;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.5 !important;
  text-align: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%) !important;
  border: 2px solid rgba(255, 215, 0, 0.3) !important;
  color: #fef08a !important;
  font-size: clamp(1rem, 2.2vh, 1.65rem) !important;
  font-weight: 800 !important;
  padding: clamp(0.55rem, 1.35vh, 1.1rem) clamp(0.85rem, 2.8vw, 2rem) !important;
  border-radius: 50px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  letter-spacing: 0.02em !important;
  animation: badgeGlow 3s infinite ease-in-out !important;
}

[data-theme="midnight"] .now-ticket-destination-badge {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18) 0%, rgba(139, 92, 246, 0.05) 100%) !important;
  border-color: rgba(167, 139, 250, 0.4) !important;
  color: #ddd6fe !important;
}
[data-theme="clinic"] .now-ticket-destination-badge {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.18) 0%, rgba(3, 105, 161, 0.05) 100%) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #e0f2fe !important;
}
[data-theme="emerald"] .now-ticket-destination-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(4, 120, 87, 0.05) 100%) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #d1fae5 !important;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
    transform: scale(1) !important;
  }
  50% {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15) !important;
    transform: scale(1.02) !important;
  }
}

/* Idle State Message: "بانتظار النداء التالي" */
.now-ticket-idle-group {
  width: 100% !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: clamp(0.5rem, 1.5vh, 2vh) 0 !important;
  box-sizing: border-box !important;
}

.now-ticket-idle-message {
  font-size: clamp(1.25rem, min(3.5vh, 4.5vw), 2.6rem) !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 0.5px !important;
  animation: calmPulse 4s infinite ease-in-out !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.display-shell.display-shell--sound-hint-visible .now-ticket-idle-message {
  font-size: clamp(1.1rem, min(3vh, 4vw), 2.25rem) !important;
}

@keyframes calmPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.65; transform: scale(1.02); }
}

/* Bottom Horizontal Hub (QR Code, KPI Stats Panel) */
.display-classic-bottom-bar {
  display: grid !important;
  grid-template-columns: 35% 1fr !important;
  gap: clamp(0.5rem, 1.8vh, 2vh) !important;
  flex: 0 0 auto !important;
}

.display-bottom-qr-container {
  display: flex !important;
}

.display-bottom-qr-container .qr-panel {
  flex: 1 1 auto !important;
  padding: 1.2vh 1.5vw !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1.5vw !important;
}

.display-bottom-qr-container .qr-panel .qr-title {
  margin: 0 !important;
  font-size: clamp(0.85rem, 1.6vh, 1.15rem) !important;
  line-height: 1.4 !important;
  text-align: right !important;
}

.display-bottom-qr-container .qr-panel #join-qr-host {
  width: clamp(70px, 9vh, 95px) !important;
  height: clamp(70px, 9vh, 95px) !important;
  padding: 4px !important;
  flex-shrink: 0 !important;
}

.display-classic-bottom-bar .display-stats-card {
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1vh 2vw !important;
}

.display-classic-bottom-bar .display-stats-card .display-section-label {
  margin: 0 !important;
  font-size: clamp(1rem, 2vh, 1.3rem) !important;
  white-space: nowrap !important;
}

.display-classic-bottom-bar .stats-grid {
  margin-top: 0 !important;
  display: flex !important;
  gap: 1.5vw !important;
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
}

.display-classic-bottom-bar .stat-item {
  flex-direction: row !important;
  gap: 10px !important;
  padding: 0.6vh 1.5vw !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
}

.display-classic-bottom-bar .stat-value {
  font-size: clamp(1.3rem, 3vh, 2rem) !important;
}

.display-classic-bottom-bar .stat-label {
  margin-top: 0 !important;
  font-size: clamp(0.8rem, 1.6vh, 1rem) !important;
}

/* Beautiful Single Queue Ticket Styling overrides */
.next-list--single .next-ticket {
  font-size: clamp(1.4rem, 3.5vh, 2.2rem) !important;
  padding: 3vh 2vw !important;
  justify-content: center !important;
  text-align: center !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px dashed rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--display-radius) !important;
  animation: borderPulse 3s infinite ease-in-out !important;
}

.next-list--single .next-ticket .next-ticket__meta {
  flex-direction: column !important;
  gap: 1.5vh !important;
}

.next-list--single .next-ticket .ticket-number-sm {
  font-size: clamp(2.2rem, 5vh, 3.8rem) !important;
  color: var(--accent-blue) !important;
}

[data-theme="gold"] .next-list--single .next-ticket .ticket-number-sm { color: #fbbf24 !important; }
[data-theme="emerald"] .next-list--single .next-ticket .ticket-number-sm { color: #34d399 !important; }
[data-theme="clinic"] .next-list--single .next-ticket .ticket-number-sm { color: #0284c7 !important; }

@keyframes borderPulse {
  0%, 100% { border-color: rgba(255, 255, 255, 0.15); box-shadow: none; }
  50% { border-color: rgba(255, 255, 255, 0.3); box-shadow: inset 0 0 15px rgba(255,255,255,0.02); }
}

@media (max-width: 1024px) {
  .display-classic-grid {
    grid-template-columns: 1fr !important;
  }
  .display-classic-bottom-bar {
    grid-template-columns: 1fr !important;
  }
  .display-next-column {
    display: none !important;
  }
}

/* ==========================================================================
   FOCUS HERO LAYOUT: Cinematic Spotlight Stage
   ========================================================================== */
.display-layout--focus-hero {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  min-height: 0 !important;
  height: 100% !important;
  gap: clamp(0.6rem, 2vh, 3vh) !important;
  overflow: visible !important;
}

.display-spotlight-stage {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  padding-top: clamp(0.25rem, 1vh, 1.25vh);
}

.display-spotlight-stage .now-serving-card {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  width: 100%;
  max-width: 900px;
  align-self: center;
  background: radial-gradient(circle at center, rgba(255,255,255,0.04), transparent 70%),
              var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  padding: clamp(0.85rem, 2.4vh, 3.5vh) clamp(1.5rem, 3vw, 4.5vw) !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Beautiful pulsing ambient aura behind the spotlight card */
.display-spotlight-stage .now-serving-card::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: calc(var(--display-radius) + 10px);
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  opacity: 0.12;
  z-index: -1;
  animation: spotlight-aura-pulse 3s ease-in-out infinite alternate;
}

[data-theme="gold"] .display-spotlight-stage .now-serving-card::before {
  background: radial-gradient(circle, #fbbf24 0%, transparent 70%);
}
[data-theme="emerald"] .display-spotlight-stage .now-serving-card::before {
  background: radial-gradient(circle, #34d399 0%, transparent 70%);
}
[data-theme="clinic"] .display-spotlight-stage .now-serving-card::before {
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
}

@keyframes spotlight-aura-pulse {
  0% { transform: scale(0.98); opacity: 0.08; filter: blur(10px); }
  100% { transform: scale(1.03); opacity: 0.18; filter: blur(20px); }
}

.display-layout--focus-hero .now-ticket-number {
  font-size: clamp(3rem, min(12vw, 13vh), 8rem) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  margin: clamp(0.25rem, 0.85vh, 1vh) 0 !important;
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.display-layout--focus-hero .now-ticket-service {
  font-size: clamp(0.9rem, 2vh, 1.55rem) !important;
  padding: 0.4em 1.6em !important;
  border-radius: 50px !important;
  display: inline-block;
  max-width: 100%;
  margin-top: 0 !important;
}

.display-layout--focus-hero .now-ticket-destination-badge {
  font-size: clamp(0.95rem, 2vh, 1.45rem) !important;
  padding: clamp(0.5rem, 1.2vh, 0.95rem) clamp(0.75rem, 2.5vw, 1.75rem) !important;
}

.display-layout--focus-hero .now-serving-card .display-section-label,
.display-layout--focus-hero .now-serving-card__title {
  line-height: 1.4;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100%;
  font-size: clamp(1rem, 2.1vh, 1.45rem) !important;
  margin-bottom: clamp(0.45rem, 1.1vh, 1.15rem) !important;
  color: color-mix(in srgb, var(--text-secondary) 78%, #fff 22%) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.display-bottom-stage {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: stretch;
}

.floating-qr-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--display-radius);
  padding: clamp(0.4rem, 1.2vh, 1.8vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.floating-qr-card .qr-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.floating-qr-card .join-qr-host {
  margin: 0 !important;
  width: clamp(100px, 12vh, 130px) !important;
}

.floating-qr-card .display-section-label {
  font-size: 0.75rem !important;
  margin-bottom: 6px !important;
}

.horizontal-ticker-panel {
  min-width: 0;
  display: flex;
}

.horizontal-ticker-panel .display-panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(0.5rem, 1.5vh, 2vh) clamp(0.6rem, 1.8vw, 2.2vw) !important;
}

/* Transform next tickets into horizontal layout */
.display-layout--focus-hero #next-list:not(:has(.next-list-empty)) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-content: stretch !important;
  align-items: stretch !important;
  gap: 12px !important;
  overflow-x: auto !important;
  scrollbar-width: none; /* Hide scrollbar for standard Firefox */
  margin-top: 8px !important;
}

.display-layout--focus-hero #next-list::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.display-layout--focus-hero #next-list > .next-ticket {
  flex: 0 0 200px !important;
  flex-direction: row !important;
  padding: clamp(0.4rem, 1vh, 1.4vh) clamp(0.5rem, 1.2vw, 1.5vw) !important;
  border-block-start: none !important;
  border-inline-start: 5px solid var(--accent-blue) !important;
}

[data-theme="gold"] .display-layout--focus-hero #next-list > .next-ticket {
  border-inline-start-color: #f59e0b !important;
}
[data-theme="emerald"] .display-layout--focus-hero #next-list > .next-ticket {
  border-inline-start-color: #34d399 !important;
}
[data-theme="clinic"] .display-layout--focus-hero #next-list > .next-ticket {
  border-inline-start-color: #0284c7 !important;
}

.display-layout--focus-hero #next-list > .next-ticket .next-ticket__meta {
  flex-direction: row !important;
  align-items: center !important;
  text-align: inherit !important;
  display: flex !important;
  justify-content: space-between !important;
}

.display-layout--focus-hero #next-list > .next-ticket .ticket-number-sm {
  font-size: clamp(1.1rem, 2.5vh, 1.6rem) !important;
  font-weight: 800 !important;
}

.display-layout--focus-hero #next-list > .next-ticket .next-ticket__service-label {
  font-size: 0.72rem !important;
  text-align: right;
  margin-inline-start: auto;
}

@media (max-width: 900px) {
  .display-bottom-stage {
    grid-template-columns: 1fr !important;
  }
  .floating-qr-card {
    display: none !important; /* Hide QR on mobile view in focus hero to keep viewport extremely clean */
  }
}
