/* School Radio player v2 (radio-v2.js). Docked mini player that expands in place.
   Phones: full width above the tab bar. Desktop: a 360px card bottom-right. Ferri UI tokens only. */
.sr {
  position: fixed; z-index: var(--fx-z-sticky);
  left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  color: var(--fx-fg); font-family: var(--fx-font); font-size: var(--fx-t-sm);
}
body.has-tabbar .sr { bottom: calc(74px + env(safe-area-inset-bottom)); }
body.fx.has-radio { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
body.fx.has-radio.has-tabbar { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .sr, body.has-tabbar .sr { left: auto; right: 20px; bottom: 20px; width: 360px; }
  body.fx.has-radio, body.fx.has-radio.has-tabbar { padding-bottom: 112px; }
}
.sr__card { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-r-surface); box-shadow: var(--fx-shadow-3); overflow: hidden; }

.sr__banner { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; background: var(--fx-info-soft); border-bottom: 1px solid var(--fx-line); line-height: 1.5; }
.sr__banner > .ph { flex: none; font-size: 16px; margin-top: 2px; color: var(--fx-info); }
.sr__banner[data-tone="warn"] { background: var(--fx-warn-soft); }
.sr__banner[data-tone="warn"] > .ph { color: var(--fx-warn); }
.sr__banner-text { overflow-wrap: anywhere; }

.sr__bar { display: flex; align-items: center; gap: 6px; padding: 8px; min-height: 60px; }
.sr__toggle { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 4px 0 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--fx-r-ctl); }
.sr__cover { position: relative; flex: none; width: 44px; height: 44px; border-radius: var(--fx-r-ctl); overflow: hidden; display: grid; place-items: center; background: var(--fx-surface-2); color: var(--fx-fg-2); font-size: 20px; }
.sr__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr__track { display: flex; flex-direction: column; min-width: 0; }
.sr__title { font-weight: 600; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr__artist { font-size: var(--fx-t-xs); color: var(--fx-fg-2); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sr__eq { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; color: var(--fx-accent); opacity: .35; transition: opacity var(--fx-med) var(--fx-ease); }
.sr__eq i { display: block; width: 3px; height: var(--sr-level, 4px); border-radius: 2px; background: currentColor; }
.sr.is-playing .sr__eq { opacity: 1; }
.sr.is-playing:not(.is-reactive) .sr__eq i { animation: sr-eq .8s ease-in-out infinite alternate; }
.sr.is-playing:not(.is-reactive) .sr__eq i:nth-child(2) { animation-delay: -.38s; }
.sr.is-playing:not(.is-reactive) .sr__eq i:nth-child(3) { animation-delay: -.15s; }
.sr.is-reactive .sr__eq i { transition: height 60ms linear; }
@keyframes sr-eq { from { height: 4px; } to { height: 16px; } }
.sr__lock { flex: none; }
@media (max-width: 479px) { .sr__lock-text { display: none; } }

.sr__btn { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--fx-r-ctl); background: none; color: var(--fx-fg-2); font-size: 20px; cursor: pointer; transition: background var(--fx-fast) var(--fx-ease), color var(--fx-fast), transform var(--fx-fast); }
.sr__btn:hover { background: var(--fx-surface-2); color: var(--fx-fg); }
.sr__btn:active { transform: scale(.94); }
.sr__btn:focus-visible { outline: none; box-shadow: var(--fx-ring); }
.sr__btn[aria-pressed="true"] { color: var(--fx-accent-ink); background: var(--fx-accent-soft); }
.sr__btn--play { background: var(--fx-accent); color: var(--fx-accent-fg); font-size: 18px; }
.sr__btn--play:hover { background: var(--fx-accent-hover); color: var(--fx-accent-fg); }
.sr__btn--lg { width: 48px; height: 48px; font-size: 22px; }
.sr__btn:disabled, .sr input:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.sr__btn:disabled:hover { background: none; color: var(--fx-fg-2); }
.sr__btn--play:disabled:hover { background: var(--fx-accent); color: var(--fx-accent-fg); }
.sr.is-expanded .sr-play-mini { display: none; }

.sr__more { display: none; flex-direction: column; gap: 12px; padding: 4px 16px 16px; }
.sr.is-expanded .sr__more { display: flex; }
.sr__progress { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 8px; font-family: var(--fx-mono); font-size: var(--fx-t-xs); color: var(--fx-fg-3); }
.sr__progress time:last-child { text-align: right; }
.sr input[type="range"] { width: 100%; min-width: 0; margin: 0; accent-color: var(--fx-accent); cursor: pointer; }
.sr__controls { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 8px; }
.sr__volume { display: flex; align-items: center; gap: 8px; }
.sr__volume input { flex: 1; }
.sr__vol-note { flex: none; font-size: var(--fx-t-xs); color: var(--fx-fg-3); }
.sr__note { margin: 0; padding: 8px 10px; border-radius: var(--fx-r-ctl); background: var(--fx-surface-2); color: var(--fx-fg-2); font-size: var(--fx-t-xs); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { .sr .sr__eq i { animation: none !important; } }
@media print { .sr { display: none; } }
