/* ============================================================================
   HOST STAGE — COSMETIC polish layer for the playlist host page.
   Loaded LAST; activated by html.bd-host-stage-route.

   IMPORTANT: this layer is intentionally cosmetic only. It must NOT redefine
   the page grid / column layout — beatdesk-host.css already owns a working
   player + queue + control-rail layout. Imposing a second grid here caused the
   stacking/void/outline mess. We only restyle surfaces, buttons, the header,
   the queue rows, and the scrollbar so everything feels like one product.
   ============================================================================ */

html.bd-host-stage-route {
  --hs-r-sm: 12px;
  --hs-r-md: 16px;
  --hs-r-lg: 20px;
  --hs-pill: 999px;
  --hs-surface: rgba(22, 18, 44, 0.5);
  --hs-surface-2: rgba(255, 255, 255, 0.035);
  --hs-surface-hover: rgba(139, 92, 246, 0.13);
  --hs-border: rgba(255, 255, 255, 0.08);
  --hs-border-strong: rgba(255, 255, 255, 0.15);
  --hs-line: rgba(255, 255, 255, 0.07);
  --hs-text: #f5f3ff;
  --hs-text-sub: rgba(228, 224, 255, 0.66);
  --hs-violet: #8b5cf6;
  --hs-violet-soft: #b9a6ff;
  --hs-teal: #2dd4bf;
  --hs-grad: linear-gradient(135deg, #9b6dff 0%, #8b5cf6 48%, #2dd4bf 135%);
  --hs-shadow: 0 20px 46px -34px rgba(0, 0, 0, 0.8);
}

/* ----------------------------------------------------------------------------
   Header — borderless, blended (no inner outline)
   ---------------------------------------------------------------------------- */
html.bd-host-stage-route .bd-host-page .bd-mix-header,
html.bd-host-stage-route .bd-host-page .game-hero--detail {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: var(--hs-r-lg) !important;
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(139, 92, 246, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(25, 21, 50, 0.55), rgba(11, 10, 22, 0.2)) !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header .game-hero-bg,
html.bd-host-stage-route .bd-host-page .bd-mix-header .game-hero-overlay {
  display: none !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header-inner,
html.bd-host-stage-route .bd-host-page .bd-mix-header-main,
html.bd-host-stage-route .bd-host-page .bd-mix-header-copy {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header-copy h1 {
  letter-spacing: -0.02em !important;
}
/* tighten the header so it isn't tall & empty */
html.bd-host-stage-route .bd-host-page .bd-mix-header-inner {
  padding: 1.1rem 1.4rem !important;
}
/* remove the duplicate "Host console" kicker above the stage */
html.bd-host-stage-route .bd-host-page .mx-auto.max-w-6xl::before {
  display: none !important;
}

/* use the full available width (don't waste the right side) */
html.bd-host-stage-route .bd-host-page {
  --host-max: 1760px !important;
}
html.bd-host-stage-route .bd-host-page .mx-auto.max-w-6xl,
html.bd-host-stage-route .bd-host-page .game-hero--detail,
html.bd-host-stage-route .bd-host-page .bd-mix-header {
  max-width: 1760px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* back-to-mixes -> clean pill */
html.bd-host-stage-route .bd-host-page .bd-mix-header-nav a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.34rem 0.75rem !important;
  border-radius: var(--hs-pill) !important;
  border: 1px solid var(--hs-border) !important;
  background: var(--hs-surface-2) !important;
  font-weight: 600 !important;
  color: var(--hs-text-sub) !important;
  text-decoration: none !important;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header-nav a:hover {
  color: var(--hs-text) !important;
  border-color: var(--hs-border-strong) !important;
  background: var(--hs-surface-hover) !important;
}

/* header action chips + share icon — consistent sizing */
html.bd-host-stage-route .bd-host-page .bd-mix-header .action-chip {
  min-height: 2.6rem !important;
  padding: 0 1rem !important;
  gap: 0.45rem !important;
  border-radius: var(--hs-r-sm) !important;
  border: 1px solid var(--hs-border-strong) !important;
  background: var(--hs-surface-2) !important;
  color: var(--hs-text) !important;
  font-weight: 700 !important;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header .action-chip:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
  background: var(--hs-surface-hover) !important;
}
html.bd-host-stage-route .bd-host-page .bd-mix-header .ui-icon-btn {
  border-radius: var(--hs-r-sm) !important;
  border: 1px solid var(--hs-border-strong) !important;
  background: var(--hs-surface-2) !important;
  color: var(--hs-text) !important;
}

/* ----------------------------------------------------------------------------
   Cards — calm, consistent surfaces (no gaudy glow / bright outlines)
   ---------------------------------------------------------------------------- */
html.bd-host-stage-route .bd-host-page .bd-host-grid .sp-player,
html.bd-host-stage-route .bd-host-page .bd-host-grid .sp-queue,
html.bd-host-stage-route .bd-host-page #bd-host-console {
  border: 1px solid var(--hs-border) !important;
  border-radius: var(--hs-r-lg) !important;
  background: var(--hs-surface) !important;
  box-shadow: var(--hs-shadow) !important;
}
html.bd-host-stage-route .bd-host-page .bd-host-grid .sp-player {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(139, 92, 246, 0.14), transparent 62%),
    var(--hs-surface) !important;
}

/* now-playing text */
html.bd-host-stage-route .bd-host-page .sp-player-panel,
html.bd-host-stage-route .bd-host-page .sp-track {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.bd-host-stage-route .bd-host-page .sp-title {
  letter-spacing: -0.01em !important;
  color: var(--hs-text) !important;
}
html.bd-host-stage-route .bd-host-page .sp-status {
  color: var(--hs-teal) !important;
}

/* ----------------------------------------------------------------------------
   Buttons — one consistent, eye-catching system
   ---------------------------------------------------------------------------- */
html.bd-host-stage-route .bd-host-page .sp-ctrl,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn {
  border-radius: var(--hs-r-sm) !important;
  border: 1px solid var(--hs-border-strong) !important;
  background: var(--hs-surface-2) !important;
  color: var(--hs-text) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  transition: transform 0.14s ease, border-color 0.18s ease,
    background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
html.bd-host-stage-route .bd-host-page .sp-ctrl:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(139, 92, 246, 0.55) !important;
  background: var(--hs-surface-hover) !important;
}
html.bd-host-stage-route .bd-host-page .sp-ctrl:active,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action:active,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn:active {
  transform: translateY(0) scale(0.985) !important;
}

/* Only the single hero action (Auto DJ) + play use the bold gradient. */
html.bd-host-stage-route .bd-host-page .sp-ctrl--play,
html.bd-host-stage-route .bd-host-page .sp-autodj-btn,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn--accent,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="player-autodj"] {
  border: 0 !important;
  color: #fff !important;
  background: var(--hs-grad) !important;
  box-shadow: 0 18px 34px -22px rgba(139, 92, 246, 0.9) !important;
}
html.bd-host-stage-route .bd-host-page .sp-ctrl--play:hover,
html.bd-host-stage-route .bd-host-page .sp-autodj-btn:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn--accent:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="player-autodj"]:hover {
  filter: brightness(1.06) !important;
}

/* Secondary actions (Open venue, Print cards, etc.) -> calm violet tint,
   so the rail isn't a stack of competing gradient bars. */
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn--primary,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="display"],
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="print-cards"] {
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  background: rgba(139, 92, 246, 0.14) !important;
  color: #efe9ff !important;
  box-shadow: none !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn--primary:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="display"]:hover,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-action[data-action="print-cards"]:hover {
  border-color: rgba(139, 92, 246, 0.62) !important;
  background: rgba(139, 92, 246, 0.22) !important;
}
html.bd-host-stage-route .bd-host-page .sp-autodj-btn--stop {
  background: rgba(244, 114, 182, 0.16) !important;
  border: 1px solid rgba(244, 114, 182, 0.4) !important;
  color: #ffd9ec !important;
  box-shadow: none !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-btn--danger {
  border: 1px solid rgba(244, 114, 182, 0.4) !important;
  background: rgba(244, 114, 182, 0.1) !important;
  color: #ffd9ec !important;
}

/* ----------------------------------------------------------------------------
   Queue rows — clean + scannable, tasteful "now playing" highlight
   ---------------------------------------------------------------------------- */
html.bd-host-stage-route .bd-host-page .sp-queue-head {
  border-bottom: 1px solid var(--hs-line) !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-row {
  border-radius: var(--hs-r-sm) !important;
  border: 1px solid transparent !important;
  background: var(--hs-surface-2) !important;
  color: var(--hs-text-sub) !important;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-row:hover {
  background: var(--hs-surface-hover) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
  color: var(--hs-text) !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-row--now {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(45, 212, 191, 0.13)) !important;
  border: 1px solid rgba(139, 92, 246, 0.5) !important;
  color: var(--hs-text) !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-row--done {
  opacity: 0.45 !important;
}

/* styled scrollbar on the (already-clipped) queue list */
html.bd-host-stage-route .bd-host-page .sp-queue-list {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-list::-webkit-scrollbar {
  width: 9px !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-list::-webkit-scrollbar-track {
  background: transparent !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.45) !important;
  border-radius: 999px !important;
  border: 2px solid transparent !important;
  background-clip: padding-box !important;
}
html.bd-host-stage-route .bd-host-page .sp-queue-list::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7) !important;
  background-clip: padding-box !important;
}

/* ----------------------------------------------------------------------------
   Control rail — calm grouped sections
   ---------------------------------------------------------------------------- */
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-section,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-block {
  border: 0 !important;
  border-top: 1px solid var(--hs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-section:first-of-type {
  border-top: 0 !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-section-label,
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-block-label {
  color: var(--hs-violet-soft) !important;
}

/* status badge — single clean pill */
html.bd-host-stage-route .bd-host-page #bd-host-console-badge .bd-host-console-badge-text {
  display: inline-flex !important;
  align-items: center !important;
  border-radius: var(--hs-pill) !important;
  padding: 0.4rem 0.8rem !important;
  border: 1px solid var(--hs-border-strong) !important;
  background: var(--hs-surface-2) !important;
  font-weight: 700 !important;
  color: var(--hs-text) !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console-badge.is-live .bd-host-console-badge-text {
  border-color: rgba(45, 212, 191, 0.4) !important;
  background: rgba(45, 212, 191, 0.12) !important;
  color: #c9fff4 !important;
}

/* win-pattern tiles — calm, clear active state */
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-pattern-tile {
  border-radius: var(--hs-r-sm) !important;
  border: 1px solid var(--hs-border) !important;
  background: var(--hs-surface-2) !important;
}
html.bd-host-stage-route .bd-host-page #bd-host-console .bd-host-pattern-tile.is-active {
  border-color: rgba(139, 92, 246, 0.6) !important;
  background: rgba(139, 92, 246, 0.2) !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.5) !important;
}
