/* ============================================================
   INSANE RADIO — PERSISTENT PLAYBACK HANDOFF UI + FINAL POLISH
   Additive, loaded LAST. Styles the cross-page handoff chip that
   js/music-player.js injects into the floating widget when a live
   station was playing, plus the honest on-page persistence note,
   and final mobile/spacing polish. All additive; no existing
   hooks/IDs/classes removed. Teal/amber accent only. No purple or violet.
   ============================================================ */

/* ---------- honest persistence note (on radio page) ---------- */
.ps-persist-note{
  margin:1rem auto 0;max-width:640px;padding:.8rem 1.1rem;
  border-radius:16px;border:1px solid rgba(45,212,191,.35);
  background:linear-gradient(160deg,rgba(13,27,42,.75),rgba(7,10,18,.85));
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  color:#cbd5e1;font-size:.86rem;line-height:1.55;text-align:center;
  box-shadow:0 8px 24px rgba(0,0,0,.4),inset 0 0 0 1px rgba(0,255,240,.08);
}
.ps-persist-note strong{color:#5eead4;font-weight:700;}
.ps-persist-note .ps-persist-hint{color:#fcd34d;font-weight:600;}

/* ---------- handoff LIVE chip inside floating widget (#ps-music-widget) ---------- */
.ps-radio-handoff{
  display:flex;align-items:center;gap:.45rem;width:100%;
  padding:.3rem .55rem;margin-bottom:4px;border-radius:999px;
  background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.4);
  font-size:10.5px;font-weight:700;letter-spacing:.04em;color:#f1f5f9;
  cursor:pointer;user-select:none;touch-action:manipulation;
  transition:background .15s ease,border-color .15s ease;
  box-sizing:border-box;
}
.ps-radio-handoff:hover{background:rgba(245,158,11,.22);border-color:rgba(245,158,11,.65);}
.ps-radio-handoff:focus-visible{outline:2px solid #fbbf24;outline-offset:2px;}
.ps-radio-handoff[hidden]{display:none;}
.ps-radio-handoff .ps-handoff-dot{
  width:7px;height:7px;border-radius:50%;flex:0 0 auto;
  background:#f59e0b;box-shadow:0 0 8px rgba(245,158,11,.8);
  animation:ps-handoff-blink 1.6s ease-in-out infinite;
}
.ps-radio-handoff.is-paused .ps-handoff-dot{background:#94a3b8;box-shadow:none;animation:none;}
@keyframes ps-handoff-blink{50%{opacity:.35;}}
.ps-radio-handoff .ps-handoff-name{
  flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ps-radio-handoff .ps-handoff-ic{width:13px;height:13px;flex:0 0 auto;display:inline-flex;color:#f59e0b;}
.ps-radio-handoff .ps-handoff-ic svg{width:13px;height:13px;display:block;}
@media (prefers-reduced-motion:reduce){.ps-radio-handoff .ps-handoff-dot{animation:none;}}

/* ---------- widget: make room for the handoff chip on small screens ---------- */
@media (max-width:420px){
  #ps-music-widget{max-width:calc(100vw - 20px);}
  .ps-radio-handoff{font-size:10px;}
}

/* ---------- final spacing polish: keep station grid breathing on mobile ---------- */
@media (max-width:560px){
  .station-grid{gap:.7rem !important;}
  .station-card{border-radius:18px !important;}
  .radio-stations{padding:1rem .9rem !important;}
  .radio-controls{gap:.5rem;}
  #radio-play{min-width:112px !important;}
}
/* ensure injected share buttons never cause horizontal overflow */
.radio-upnext,.radio-tracklist,#playlist,.song-btn{max-width:100%;}
.ps-share-wrap{max-width:40%;}
