/*
 * 6969 MOGUL — the radio console.
 *
 * One panel, late-night neon, sitting on the site's dark shell. It leans on the
 * page's own accent where there is one and falls back to the station's own
 * magenta everywhere else, so it looks like part of the network rather than a
 * bolted-on widget.
 */

.radio {
  --radio-neon: var(--accent, #ff2d78);
  --radio-neon-2: #35e0ff;
  --radio-ink: #f3f5ff;
  --radio-dim: #8a90b8;
  --radio-panel: #12131f;
  --radio-panel-2: #191b2c;
  --radio-line: rgba(255, 255, 255, .08);

  position: relative;
  max-width: 720px;
  margin: 2.4rem auto;
  padding: 1.6rem 1.6rem 1.2rem;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 45, 120, .18), transparent 60%),
    linear-gradient(180deg, var(--radio-panel-2), var(--radio-panel));
  border: 1px solid var(--radio-line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
  outline: none;
}
.radio:focus-visible { box-shadow: 0 0 0 2px var(--radio-neon), 0 30px 80px -30px rgba(0, 0, 0, .8); }

.radio__glow {
  position: absolute; inset: -40% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 100% at 50% 0%, rgba(53, 224, 255, .16), transparent 70%);
  filter: blur(20px); opacity: .5; pointer-events: none;
  transition: opacity .6s ease;
}
.radio.is-on .radio__glow { opacity: 1; }

/* ---- header ---------------------------------------------------------- */
.radio__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  position: relative; z-index: 1;
}
.radio__dial { display: flex; flex-direction: column; gap: .15rem; }
.radio__freq {
  font-weight: 900; font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: .04em;
  color: var(--radio-ink);
  text-shadow: 0 0 18px rgba(255, 45, 120, .55), 0 0 2px rgba(255, 45, 120, .9);
  font-variant-numeric: tabular-nums;
}
.radio__band { font-size: .62rem; letter-spacing: .28em; color: var(--radio-dim); text-transform: uppercase; }

.radio__onair {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .7rem; border-radius: 999px;
  border: 1px solid var(--radio-line); background: rgba(0, 0, 0, .3);
  font-size: .7rem; font-weight: 800; letter-spacing: .18em; color: var(--radio-dim);
  text-transform: uppercase; white-space: nowrap;
}
.radio__onair i {
  width: 9px; height: 9px; border-radius: 50%; background: #3a3f5c;
  box-shadow: none; transition: background .3s, box-shadow .3s;
}
.radio.is-on .radio__onair { color: var(--radio-ink); }
.radio.is-on .radio__onair i { background: #ff4f4f; box-shadow: 0 0 10px 2px rgba(255, 60, 60, .8); }
.radio__onair.is-talking i { background: var(--radio-neon-2); box-shadow: 0 0 12px 3px rgba(53, 224, 255, .8); }

/* ---- the equaliser --------------------------------------------------- */
.radio__viz {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  height: 44px; margin: 1rem 0 .4rem; opacity: .35;
  transition: opacity .5s ease;
}
.radio__viz span {
  width: 6px; border-radius: 3px; height: 20%;
  background: linear-gradient(180deg, var(--radio-neon-2), var(--radio-neon));
}
.radio__viz.is-live { opacity: 1; }
.radio__viz.is-live span {
  animation: radio-bounce 1.1s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.07s);
}
@keyframes radio-bounce {
  0%, 100% { height: 18%; }
  50% { height: 92%; }
}

/* ---- the display ----------------------------------------------------- */
.radio__display {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem; margin: .2rem 0 1.1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .25));
  border: 1px solid var(--radio-line);
  min-height: 96px;
}
.radio__displaytext { min-width: 0; flex: 1; }

/* Album cover — a record sleeve. Shows the placeholder monogram until the
   art loads; .has-art fades the image in over it. */
.radio__cover {
  position: relative; flex: 0 0 auto;
  width: 84px; height: 84px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--radio-neon), #7b1fa2 60%, var(--radio-neon-2));
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .08);
  display: grid; place-items: center;
}
.radio__cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s ease;
}
.radio__cover.has-art img { opacity: 1; }
.radio__cover-note {
  font-weight: 900; font-size: 1.1rem; letter-spacing: .04em; color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.radio__cover.has-art .radio__cover-note { opacity: 0; }
@media (max-width: 520px) {
  .radio__cover { width: 64px; height: 64px; }
}
.radio__status {
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--radio-neon); font-weight: 800; margin-bottom: .3rem;
}
.radio__now {
  font-size: clamp(1.05rem, 3vw, 1.4rem); font-weight: 800; color: var(--radio-ink);
  line-height: 1.15;
}
.radio__caption {
  margin: .55rem 0 0; min-height: 1.2em;
  font-size: .95rem; color: var(--radio-dim); font-style: italic; line-height: 1.35;
  transition: color .3s;
}
.radio.is-on .radio__caption { color: #cfd4f5; }

/* ---- controls -------------------------------------------------------- */
.radio__controls {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.radio__power {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 108px; height: 108px; border-radius: 50%;
  border: 1px solid var(--radio-line); cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #2a2d45, #101120);
  color: var(--radio-ink); font-weight: 800; font-size: .9rem; letter-spacing: .06em;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .6), 0 6px 18px -6px rgba(0, 0, 0, .7);
  transition: transform .15s ease, box-shadow .3s ease;
}
.radio__power:hover { transform: translateY(-1px); }
.radio__power:active { transform: translateY(1px) scale(.98); }
.radio__power-ring {
  position: absolute; inset: 10px; border-radius: 50%;
  border: 2px solid #3a3f5c; transition: border-color .3s, box-shadow .3s;
}
.radio__power.is-on .radio__power-ring {
  border-color: var(--radio-neon);
  box-shadow: 0 0 18px 2px rgba(255, 45, 120, .55), inset 0 0 12px rgba(255, 45, 120, .35);
}
.radio__power.is-on .radio__power-label { color: #fff; }
.radio__power.is-on::after { content: ''; }
.radio__power.is-muted .radio__power-ring { border-color: #6a4a58; box-shadow: none; }

.radio__knobs { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 200px; }
.radio__mute {
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: var(--radio-panel-2); border: 1px solid var(--radio-line);
  font-size: 1.1rem; line-height: 1; color: var(--radio-ink);
  transition: border-color .2s, transform .1s;
}
.radio__mute:hover { border-color: var(--radio-neon); }
.radio__mute:active { transform: scale(.94); }
.radio__mute.is-muted { color: var(--radio-dim); }

.radio__vol { display: flex; align-items: center; gap: .6rem; flex: 1; }
.radio__vol-icon { color: var(--radio-dim); font-size: .8rem; letter-spacing: -.05em; }
.radio__vol input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--radio-neon), var(--radio-neon-2));
  outline: none; cursor: pointer;
}
.radio__vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--radio-neon);
  box-shadow: 0 0 10px rgba(255, 45, 120, .6);
}
.radio__vol input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--radio-neon);
  background: #fff; box-shadow: 0 0 10px rgba(255, 45, 120, .6);
}

/* ---- control-booth preview ------------------------------------------- */
.radio__debug {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  position: relative; z-index: 1; margin-top: 1rem;
  padding: .55rem .7rem; border-radius: 10px;
  border: 1px dashed rgba(53, 224, 255, .35); background: rgba(53, 224, 255, .06);
}
.radio__debug-tag {
  font-size: .58rem; font-weight: 900; letter-spacing: .22em; color: var(--radio-neon-2);
  text-transform: uppercase;
}
.radio__skip {
  cursor: pointer; border: 1px solid rgba(53, 224, 255, .4);
  background: rgba(53, 224, 255, .12); color: var(--radio-ink);
  border-radius: 8px; padding: .35rem .7rem; font-size: .8rem; font-weight: 700;
  transition: background .15s, transform .1s;
}
.radio__skip:hover { background: rgba(53, 224, 255, .22); }
.radio__skip:active { transform: scale(.96); }

.radio__state {
  position: relative; z-index: 1; margin: .6rem 0 0;
  padding: .5rem .7rem; border-radius: 10px;
  background: rgba(0, 0, 0, .4); border: 1px solid var(--radio-line);
  display: grid; grid-template-columns: 1fr 1fr; gap: .1rem .8rem;
}
.rs__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  font-size: .74rem; padding: .12rem 0; min-width: 0;
}
.rs__row span { color: var(--radio-dim); text-transform: uppercase; letter-spacing: .12em; font-size: .58rem; flex: 0 0 auto; }
.rs__row b { color: #cfe8ff; font-weight: 700; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .radio__state { grid-template-columns: 1fr; } }

.radio__diagout {
  position: relative; z-index: 1; margin: .6rem 0 0;
  padding: .8rem .9rem; border-radius: 10px;
  background: rgba(0, 0, 0, .5); border: 1px solid var(--radio-line);
  color: #cfe8ff; font-size: .74rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}

.radio__panelhead {
  position: relative; z-index: 1; margin: .7rem 0 .25rem;
  color: var(--radio-dim); text-transform: uppercase; letter-spacing: .12em; font-size: .58rem;
}
.radio__transcript {
  position: relative; z-index: 1;
  padding: .7rem .9rem; border-radius: 10px; max-height: 260px; overflow-y: auto;
  background: rgba(0, 0, 0, .5); border: 1px solid var(--radio-line);
  color: #eaf4ff; font-size: .82rem; line-height: 1.45;
}
.rt__line { padding: .28rem 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.rt__line:last-child { border-bottom: 0; }
.rt__cat {
  display: inline-block; margin-right: .5rem; padding: .02rem .4rem; border-radius: 999px;
  background: rgba(120, 180, 255, .16); color: #9fc7ff;
  font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; vertical-align: middle;
}

/* ---- footer ---------------------------------------------------------- */
.radio__foot { position: relative; z-index: 1; margin-top: 1rem; text-align: center; }
.radio__by, .radio__warn { font-size: .78rem; color: var(--radio-dim); margin: .2rem 0 0; }
.radio__warn { color: #e6a15a; }

@media (max-width: 520px) {
  .radio { margin: 1.2rem auto; padding: 1.1rem; border-radius: 18px; }
  .radio__controls { gap: .8rem; }
  .radio__power { width: 92px; height: 92px; }
}
