/**
 * 313 LIVE — full player page (no Tailwind / CDN UI)
 * Works with site shell + sticky player in any environment.
 */

.page-live .live-page-hero {
  padding: var(--space-3, 1rem) 0 var(--space-2, 0.75rem);
}
.live-page-title {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--display, "Space Grotesk", system-ui, sans-serif);
  font-size: var(--fs-2xl, clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem));
  color: #fff !important;
  letter-spacing: -0.03em;
}
.live-page-sub {
  color: var(--313-muted, #a1a1aa) !important;
  max-width: 40rem;
  margin: 0;
}
.live-page-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-page-embed {
  padding-bottom: var(--space-5, 2.5rem);
}
.live-layout {
  width: var(--container, min(72rem, calc(100% - 1.5rem)));
  max-width: 100%;
  margin-inline: auto;
}

.live-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 0.9rem;
}
.live-status[hidden] { display: none !important; }
.live-status-actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: var(--space-3, 1rem);
  align-items: start;
}
@media (max-width: 960px) {
  .live-grid { grid-template-columns: 1fr; }
}

.live-main,
.live-side-card {
  padding: clamp(1rem, 2.5vw, 1.6rem);
}
.live-main-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.live-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #71717a;
  margin-bottom: 0.35rem;
}
.live-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.1);
}
.live-badge-auto {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
}
.live-badge-live {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
}
.live-badge-mute {
  color: #a1a1aa;
  background: rgba(255,255,255,0.04);
}
.live-clock { text-align: right; }
.live-clock-val {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  color: #fff;
}

.live-now {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 720px) {
  .live-now { grid-template-columns: 1fr; }
  .live-art-wrap { max-width: 280px; margin-inline: auto; }
  .live-clock { text-align: left; }
}

.live-art-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #09090b;
}
.live-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.live-art-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0,0,0,0.35);
  color: #000;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.live-art-wrap:hover .live-art-overlay,
.live-art-overlay:focus-visible {
  opacity: 1;
}
.live-art-overlay i {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.live-listeners-pill {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.75rem;
  background: rgba(9, 9, 11, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: #fff;
}
.live-listeners-pill i { color: #00f0ff; }

.live-meta { min-width: 0; }
.live-genre {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.06);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}
.live-track-title {
  margin: 0 0 0.35rem;
  font-family: var(--display, "Space Grotesk", system-ui, sans-serif);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff !important;
  word-break: break-word;
}
.live-track-artist {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  color: #d4d4d8;
  margin-bottom: 0.35rem;
}
.live-track-album {
  font-size: 0.9rem;
  color: #71717a;
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.live-progress-block { margin: 0.75rem 0 1rem; }
.live-progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #a1a1aa;
  margin-bottom: 0.35rem;
}
.live-progress-times.muted { margin-top: 0.25rem; margin-bottom: 0; font-size: 0.7rem; color: #71717a; }
.live-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.live-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00f0ff, #ff00aa);
  width: 0;
  transition: width 0.4s ease;
}

.live-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.live-play-btn {
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 1rem;
  background: #00f0ff;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.25);
}
.live-play-btn:hover { filter: brightness(1.06); }
.live-play-btn:active { transform: scale(0.96); }
body.is-live-playing .live-play-btn {
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2), 0 0 28px rgba(0, 240, 255, 0.35);
}
.live-vol {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 8rem;
}
.live-vol input[type="range"] {
  flex: 1;
  accent-color: #00f0ff;
  min-width: 0;
}
.live-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #a1a1aa;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.live-icon-btn:hover { color: #fff; border-color: rgba(0, 240, 255, 0.35); }

.live-stream-switch,
.live-viz-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.live-stream-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: #a1a1aa;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.live-stream-btn.is-active {
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.08);
}
.live-stream-btn:hover { color: #fff; }

.live-viz-card {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.live-viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.live-visualizer {
  width: 100%;
  height: 96px;
  display: block;
  border-radius: 0.85rem;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.06);
}
.live-viz-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.live-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
}
.live-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.live-upnext {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.live-up-art {
  width: 72px;
  height: 72px;
  border-radius: 0.85rem;
  object-fit: cover;
  background: #09090b;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.live-up-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.3;
}
.live-up-artist { font-size: 0.85rem; margin-top: 0.15rem; }
.live-up-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.45rem;
}
.live-countdown { margin-top: 0.65rem; font-size: 0.8rem; }

.live-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.live-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.live-stats strong {
  color: #fff;
  font-size: 1.05rem;
}

.live-history {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 360px;
  min-height: 4rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.live-placeholder {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  margin: 0;
}

/* Requests */
.live-request-help {
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.live-search-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  margin-bottom: 0.5rem;
}
.live-search-label i { color: #71717a; flex-shrink: 0; }
.live-search-label input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: max(16px, 0.9rem);
  outline: none;
}
.live-req-status {
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
  min-height: 1.1em;
}
.live-req-results {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.live-req-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.4rem 0.3rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
}
.live-req-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.live-req-row img {
  width: 40px;
  height: 40px;
  border-radius: 0.45rem;
  object-fit: cover;
  background: #09090b;
}
.live-req-title {
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-req-artist {
  font-size: 0.75rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-req-btn {
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.live-req-btn:hover { background: rgba(0, 240, 255, 0.18); color: #fff; }
.live-req-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.live-req-btn.is-done {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}
.live-history-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.35rem;
  border-radius: 0.65rem;
}
.live-history-row:hover { background: rgba(255,255,255,0.04); }
.live-history-row img {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #09090b;
}
.live-history-title {
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-history-artist {
  font-size: 0.75rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-history-time {
  font-size: 0.7rem;
  color: #71717a;
  font-variant-numeric: tabular-nums;
}

.live-actions-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.btn-block { width: 100%; }

.live-toasts {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 2rem));
}
.live-toast {
  pointer-events: auto;
  padding: 0.7rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 17, 23, 0.96);
  color: #e4e4e7;
  font-size: 0.85rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.live-toast.success { border-color: rgba(52, 211, 153, 0.35); }
.live-toast.error { border-color: rgba(248, 113, 113, 0.4); }
.live-toast.info { border-color: rgba(0, 240, 255, 0.3); }

.mono { font-variant-numeric: tabular-nums; }
.muted { color: #71717a; }
.min-w-0 { min-width: 0; }

/* Safe defaults if shell tokens missing */
.page-live {
  --live-cyan: #00f0ff;
}
