/* Reproductor de la grabación (#exam) en clave «panel de radio». player.js no cambia: mismo DOM y mismas clases.
   Sin JS quedan los controles nativos del <audio>. Solo anima transform y opacity. */

.radio {
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 2.6vw, 38px);
  background: rgb(4 7 15 / 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
}
.radio__corner { position: absolute; width: 14px; height: 14px; border: 0 solid var(--amber); pointer-events: none; }
.radio__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.radio__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.radio__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.radio__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.radio__tag { display: flex; justify-content: space-between; gap: 12px; color: var(--steel-300); font-size: 0.64rem; }
.radio__tag span:first-child { color: var(--amber); }
.js .radio audio { display: none; }
.radio audio { width: 100%; }

.radio__stage { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 5vw, 56px) clamp(28px, 5vw, 56px); }
.radio__play {
  position: relative; flex: none; width: clamp(88px, 8vw, 112px); height: clamp(88px, 8vw, 112px); border: 1px solid var(--ice); border-radius: 50%;
  background: transparent; color: var(--ice); display: grid; place-items: center; min-width: var(--tap-min); min-height: var(--tap-min);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform 0.4s var(--ease-out);
}
.radio__play:hover { background: var(--amber); color: var(--ink); border-color: var(--amber); transform: scale(1.05); }
.radio__play:focus-visible, .radio__mute:focus-visible, .radio__retry:focus-visible, .docked__toggle:focus-visible, .radio__seek:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.radio__icon { width: 34px; height: 34px; margin-left: 4px; }
.radio.is-playing .radio__play { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.radio.is-playing .radio__icon { margin-left: 0; }

/* anillos: quietos en reposo, salen del botón al sonar */
.radio__rings { position: absolute; inset: 0; pointer-events: none; }
.radio__rings svg { position: absolute; top: 50%; left: 50%; color: var(--amber); translate: -50% -50%; overflow: visible; }
.radio__rings svg:nth-child(1) { width: 144%; height: 144%; opacity: 0.45; }
.radio__rings svg:nth-child(2) { width: 186%; height: 186%; opacity: 0.25; }
.radio__rings svg:nth-child(3) { width: 228%; height: 228%; opacity: 0.12; }
.radio.is-playing .radio__rings svg { animation: radio-ring 2.4s var(--ease-out) infinite; }
.radio.is-playing .radio__rings svg:nth-child(2) { animation-delay: 0.8s; }
.radio.is-playing .radio__rings svg:nth-child(3) { animation-delay: 1.6s; }
@keyframes radio-ring { from { scale: 0.62; opacity: 0.75; } to { scale: 1.1; opacity: 0; } }
.radio__label { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 1.6vw, 1.5rem); letter-spacing: -0.03em; }

/* onda */
.radio__wave { height: 64px; display: flex; align-items: center; gap: 2px; }
.radio__wave:empty {
  background: repeating-linear-gradient(90deg, var(--steel-700) 0 2px, transparent 2px 6px);
  -webkit-mask: linear-gradient(0deg, transparent 0 20%, #000 20% 80%, transparent 80%); mask: linear-gradient(0deg, transparent 0 20%, #000 20% 80%, transparent 80%);
}
.radio__bar { flex: 1 1 0; min-width: 2px; max-width: 6px; height: 100%; background: var(--steel-700); transform-origin: center; transition: background-color 0.2s linear; }
.radio__bar.is-played { background: var(--amber); }
.radio.is-playing .radio__bar.is-played:last-of-type { opacity: 0.85; }

.radio__seek { width: 100%; height: var(--tap-min); margin: -10px 0; background: transparent; accent-color: var(--amber); cursor: pointer; }
.radio__row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; }
.radio__status { max-width: none !important; margin-right: auto; font-family: var(--font-mono); font-size: 0.74rem !important; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber) !important; display: inline-flex; align-items: center; gap: 10px; }
.radio__status::before { content: ""; width: 8px; height: 8px; background: var(--amber); }
.radio__live { display: inline-flex; align-items: center; gap: 8px; font-size: 0; }
.radio__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--alert); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.radio__live[hidden] + .radio__time { margin-left: auto; }
.radio__time { font-family: var(--font-mono); font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--steel-100); letter-spacing: 0.06em; }
.radio__mute, .radio__retry {
  min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 18px; background: transparent; border: 1px solid var(--line-strong);
  color: var(--ice); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.radio__mute:hover, .radio__retry:hover { border-color: var(--amber); color: var(--amber); }
.radio__mute.is-muted { border-color: var(--alert); color: var(--alert); }
.radio__retry { align-self: flex-start; color: var(--amber); border-color: var(--amber); }

/* mini-reproductor: sube desde abajo y se va igual */
.docked { transform: translateY(calc(100% + 32px)); opacity: 0; transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out); }
.docked.is-in { transform: none; opacity: 1; }
.docked__bar { transition: transform 250ms linear; }
.docked__toggle.is-paused::before { left: 16px; top: 13px; width: 16px; height: 18px; border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.docked__toggle.is-paused::after { display: none; }

@media (max-width: 720px) {
  .radio__stage { flex-direction: column; padding: 36px 0; gap: 20px; }
  .radio__play { align-self: center; }
  .radio__label { align-self: center; }
  .radio__wave { height: 52px; }
  .radio__row { gap: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .radio.is-playing .radio__rings svg, .radio__dot { animation: none; }
  .docked { transform: none; transition: opacity 0.2s linear; }
  .radio__bar, .radio__play { transition: none; }
}
