/* Shared lobby radio in the focus scene (public/js/lobby-radio.js).
   Same placement as the chat: bottom sheet on phones, side panel on desktop. */

/* ---- toggle button ---- */
.lr-btn {
  position: relative; pointer-events: auto;
  background: var(--glass, rgba(255, 255, 255, .82)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lr-btn[aria-expanded="true"] { background: var(--accent-2-soft); border-color: var(--accent-2); }
/* little equalizer while music plays */
.lr-eq { display: none; position: absolute; right: 3px; bottom: 4px; gap: 1.5px; align-items: flex-end; height: 10px; }
.lr-btn.is-playing .lr-eq { display: inline-flex; }
.lr-eq i { width: 2.5px; height: 100%; border-radius: 2px; background: var(--accent-strong); transform-origin: bottom; animation: lr-eq 1s ease-in-out infinite; }
.lr-eq i:nth-child(2) { animation-delay: -.35s; }
.lr-eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes lr-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---- panel ---- */
.lr-panel {
  position: absolute; z-index: 5;
  left: var(--s2, 8px); right: var(--s2, 8px); bottom: var(--s2, 8px);
  max-height: min(74%, 560px); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--s2, 8px);
  padding: var(--s3, 12px) var(--s3, 12px) var(--s3, 12px) var(--s4, 16px);
  background: rgba(255, 253, 251, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius-lg, 26px); box-shadow: var(--shadow-lg);
  animation: lr-in .28s var(--ease-out, ease-out);
}
.lr-panel[hidden] { display: none; }
.lr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lr-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-md, 16px); font-weight: 900; }
.lr-now { margin: 0; font-size: var(--fs-sm, 14px); color: var(--text-dim); }
.lr-now b { color: var(--text); }

.lr-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lr-station {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  min-height: 56px; padding: 8px 12px; border-radius: var(--radius, 18px); cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); font: inherit; color: var(--text);
  transition: border-color .2s, background .2s, transform .15s;
}
.lr-station b { font-size: var(--fs-sm, 14px); }
.lr-station span { font-size: var(--fs-xs, 12px); color: var(--text-dim); line-height: 1.3; }
.lr-station:hover { transform: translateY(-1px); }
.lr-station[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.lr-station:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.lr-label { display: block; font-size: var(--fs-xs, 12px); font-weight: 800; color: var(--text-dim); margin-bottom: 4px; }
.lr-yt-row { display: flex; gap: 8px; }
.lr-input { flex: 1; min-width: 0; min-height: 40px; font-size: 16px; border-radius: 999px; padding: 6px 14px; }
.lr-error { margin: 0; font-size: var(--fs-sm, 14px); font-weight: 700; color: var(--bad-ink); }
.lr-error[hidden] { display: none; }
.lr-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.lr-vol { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 220px; }
.lr-vol input { flex: 1; }
.lr-hint { margin: 0; font-size: var(--fs-xs, 12px); }

/* ---- YouTube: audio only – the player sits off-screen ---- */
.lr-yt-player { position: fixed; left: -10000px; top: 0; width: 200px; height: 200px; pointer-events: none; }
.lr-yt-frame, .lr-yt-player iframe { display: block; width: 200px; height: 200px; border: 0; }

@media (max-width: 899px) {
  .fx-scene.lr-open .fx-hud-slot { visibility: hidden; }
}
@media (min-width: 900px) {
  .lr-panel {
    left: auto; top: 68px; right: var(--s3, 12px); bottom: auto;
    width: min(370px, 44%); max-height: calc(100% - 80px);
    animation-name: lr-in-side;
  }
}
@keyframes lr-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lr-in-side { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lr-panel { animation: none; }
  .lr-eq i { animation: none; transform: scaleY(.7); }
}

/* ---- earbuds (public/js/earbuds.js) – reuses the radio panel styles ---- */
.eb-btn.is-in { background: var(--accent-2-soft); border-color: var(--accent-2); }
.eb-switches { display: flex; flex-wrap: wrap; gap: 8px 18px; }
