/* Hero trigger: same perforated ticket-stub as Surprise Me (.ticket in
   main.css), recolored to the magenta "hot plate" so it visually matches
   the needle-drop active state on the player bar below. */
.ticket-needle {
  background: var(--magenta);
  /* #fff on --magenta is 3.56:1, fails WCAG AA — use --overprint per house rule */
  color: var(--overprint);
}

/* ============================================================
   DROP THE NEEDLE — fixed bottom-bar audio player.
   Separate stylesheet, loaded on every page. Consumes the design
   tokens declared in main.css :root (loads first in <head>).
   Black stock, 1px teal (--navy) hairline on top, magenta
   (--magenta) needle-drop state on the play button.
   ============================================================ */

.needle-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: var(--overprint);
  border-top: 1px solid var(--navy);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .45);
  color: #fff;
  font-family: var(--font-body);
}
.needle-player[hidden] { display: none; }

.needle-player-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: .6rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
}

/* ---- cover + meta ---- */
.needle-player-cover {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .18);
  flex: none;
  background: var(--tint-r);
}

.needle-player-meta {
  min-width: 0; /* allow text truncation inside grid */
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.needle-player-micro {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--scarlet-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.needle-player-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.needle-player-show {
  font-size: .78rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}
.needle-player-show:hover,
.needle-player-show:focus-visible { text-decoration: underline; }

/* ---- transport controls ---- */
.needle-player-controls {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-self: end;
}

.needle-player-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.needle-player-toggle svg { width: 18px; height: 18px; fill: currentColor; }

/* needle-drop state: playing = the hot plate, magenta */
.needle-player-toggle.is-playing {
  background: var(--magenta);
  border-color: var(--magenta);
  /* #fff on --magenta is 3.56:1, fails WCAG AA — use --overprint per house rule */
  color: var(--overprint);
}

@media (prefers-reduced-motion: no-preference) {
  .needle-player-toggle { transition: transform .2s ease, background .2s ease, color .2s ease; }
  .needle-player-toggle:active { transform: scale(.92); }
}

.needle-player-scrub {
  display: none;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: rgba(255, 255, 255, .75);
  min-width: 0;
}

.needle-player-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, .2);
  border-radius: 2px;
  cursor: pointer;
}
.needle-player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--overprint);
  cursor: pointer;
}
.needle-player-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--overprint);
  cursor: pointer;
}
.needle-player-seek::-moz-range-progress { background: var(--navy); height: 4px; border-radius: 2px; }

.needle-player-elapsed,
.needle-player-total { min-width: 2.6em; text-align: center; }

.needle-player-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.needle-player-close:hover,
.needle-player-close:focus-visible { color: #fff; }

.needle-player-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* room for the fixed bar so it never covers the footer's last links */
body.has-needle-player { padding-bottom: 76px; }

@media (min-width: 620px) {
  .needle-player-scrub { display: flex; }
}

@media (max-width: 619px) {
  .needle-player-inner {
    grid-template-columns: auto 1fr auto auto;
    padding: .55rem .85rem;
    gap: .55rem;
  }
  .needle-player-cover { width: 40px; height: 40px; }
  .needle-player-show { display: none; }
  .needle-player-controls { gap: .4rem; }
  body.has-needle-player { padding-bottom: 68px; }
}

@media (max-width: 375px) {
  .needle-player-micro { display: none; }
  .needle-player-title { font-size: .82rem; }
}

/* ============================================================
   GENRE RADIO STATIONS — channel switcher + queue list.
   The switcher reuses .chip/.chip.active from main.css (current
   station in magenta, per house convention). Queue rows are new.
   ============================================================ */

.station-switcher { margin-top: 1.4rem; }

.station-queue {
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--ink);
}

.station-row {
  display: grid;
  grid-template-columns: auto 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(242, 239, 247, .15);
}

.station-play {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.station-play svg { width: 16px; height: 16px; fill: currentColor; }
.station-play:hover, .station-play:focus-visible {
  background: var(--magenta);
  border-color: var(--magenta);
  /* #fff on --magenta is 3.56:1, fails WCAG AA — use --overprint per house rule */
  color: var(--overprint);
}
@media (prefers-reduced-motion: no-preference) {
  .station-play { transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease; }
  .station-play:active { transform: scale(.92); }
}

.station-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid rgba(242, 239, 247, .2);
  background: var(--tint-r);
}

.station-meta { min-width: 0; }
.station-show {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
}
.station-show:hover, .station-show:focus-visible { color: var(--navy); text-decoration: underline; }
.station-ep-title {
  margin-top: .15rem;
  font-size: .85rem;
  color: rgba(242, 239, 247, .7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-dur {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: rgba(242, 239, 247, .55);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .station-row { grid-template-columns: auto 44px 1fr; gap: .7rem; }
  .station-cover { width: 44px; height: 44px; }
  .station-dur { display: none; }
}
