/* WTLEB 1720 AM — live audio receiver; scoped to live and pop-out pages. */
.live-radio {
  --radio-border: #524124;
  background: #11100d;
  border: 1px solid var(--radio-border);
  padding: 25px 27px 23px;
  color: var(--station-amber);
  width: 100%;
  min-width: 0;
}
.radio-topline, .radio-condition-row, .radio-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.radio-topline {
  border-bottom: 1px solid #332c20;
  padding-bottom: 15px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.5;
  color: #b87f07;
}
.radio-playback-status { color: #938675; }
.live-radio[data-audio-state="playing"] .radio-playback-status { color: #e0a106; }
.live-radio[data-audio-state="error"] .radio-playback-status { color: #c9472d; }
.radio-status-led {
  display: inline-block;
  vertical-align: middle;
  height: 7px;
  width: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}
.radio-dial {
  padding: 25px 0 20px;
  text-align: center;
}
.radio-frequency {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  font-size: clamp(54px, 9vw, 76px);
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.1;
  color: var(--station-amber);
  font-variant-numeric: tabular-nums;
}
.radio-frequency-unit {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 1.5px;
  color: #a77927;
}
.radio-dial-caption {
  margin: 5px 0 0;
  font-size: 10px;
  letter-spacing: 1.6px;
  line-height: 1.6;
  color: #8e8171;
}
.radio-readout {
  border: 1px solid #3e3323;
  background: #0b0b0a;
  padding: 19px 20px;
  min-height: 116px;
}
.radio-small-label {
  margin: 0;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.5;
  color: #938575;
}
.radio-current-title {
  color: #e6ac27;
  font-size: clamp(15px, 2.6vw, 20px);
  font-weight: normal;
  line-height: 1.45;
  letter-spacing: .3px;
  overflow-wrap: anywhere;
  margin: 9px 0 0;
}
.radio-program-context {
  margin: 10px 0 0;
  color: #a9a092;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.radio-program-context[hidden] { display: none; }
.radio-story-progress {
  margin: 12px 0 0;
  color: #8e8171;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}
.radio-story-progress[hidden] { display: none; }
.radio-environment {
  border-top: 1px solid #383021;
  border-bottom: 1px solid #383021;
  margin: 20px 0 0;
  padding: 16px 0;
}
.radio-condition-row + .radio-condition-row { margin-top: 12px; }
.radio-condition {
  color: #c7b8a0;
  font-size: 12px;
  letter-spacing: .7px;
}
.live-radio[data-condition="NORMAL"] .radio-condition { color: #8eaf86; }
.live-radio[data-condition="ELEVATED"] .radio-condition { color: #e0a106; }
.live-radio[data-condition="DEGRADED"] .radio-condition { color: #dc8c46; }
.live-radio[data-condition="CRITICAL"] .radio-condition { color: #c9472d; }
.radio-bars {
  display: inline-flex;
  align-items: end;
  justify-content: end;
  gap: 5px;
  height: 23px;
  min-width: 60px;
}
.radio-bar {
  display: block;
  background: #e0a106;
  width: 9px;
  opacity: .16;
}
.radio-bar:nth-child(1) { height: 7px; }
.radio-bar:nth-child(2) { height: 12px; }
.radio-bar:nth-child(3) { height: 17px; }
.radio-bar:nth-child(4) { height: 22px; }
.live-radio[data-condition="NORMAL"] .radio-bar { background: #8eaf86; }
.live-radio[data-condition="DEGRADED"] .radio-bar { background: #dc8c46; }
.live-radio[data-condition="CRITICAL"] .radio-bar { background: #c9472d; }
.radio-metadata-status {
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: .7px;
  line-height: 1.5;
  color: #82786a;
}
.radio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 23px 0 19px;
}
.radio-button, .radio-popout-button {
  appearance: none;
  border: 1px solid var(--station-amber);
  border-radius: 5px;
  background: transparent;
  color: var(--station-amber);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: .5px;
  line-height: 1.5;
  text-align: center;
  transition: background-color .15s ease, color .15s ease;
}
.radio-button:hover:not(:disabled), .radio-button:focus-visible:not(:disabled),
.radio-popout-button:hover, .radio-popout-button:focus-visible {
  background: var(--station-amber);
  color: #0b0b0b;
}
.radio-button:disabled { opacity: .42; cursor: default; }
.radio-tune-button {
  flex: 1 1 225px;
  min-height: 46px;
  background: var(--station-amber);
  color: #0b0b0b;
  padding: 12px 14px;
  font-size: 12px;
}
.radio-tune-button:disabled { background: #4b3a1c; color: #aca18d; }
.radio-disconnect-button {
  flex: 0 1 155px;
  min-height: 46px;
  padding: 12px 14px;
  font-size: 11px;
}
.radio-bottomline { min-height: 36px; }
.radio-volume-group {
  display: flex;
  align-items: center;
  flex: 1 1 205px;
  gap: 12px;
  color: #aaa398;
  font-size: 10px;
  letter-spacing: .8px;
}
.radio-volume-group label { flex: none; }
.radio-volume {
  appearance: none;
  -webkit-appearance: none;
  min-width: 70px;
  max-width: 185px;
  width: 100%;
  height: 28px;
  flex: 1 1 75px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.radio-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 10px;
  background: linear-gradient(
    to right,
    var(--station-amber) 0%,
    var(--station-amber) var(--radio-volume-percent, 50%),
    #51432c var(--radio-volume-percent, 75%),
    #51432c 100%
  );
}
.radio-volume::-moz-range-track {
  height: 4px;
  border-radius: 10px;
  background: #51432c;
}
.radio-volume::-moz-range-progress {
  height: 4px;
  border-radius: 10px;
  background: var(--station-amber);
}
.radio-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #292216;
  border-radius: 50%;
  background: #edbf5e;
  box-shadow: 0 0 0 1px #9f7938;
}
.radio-volume::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #292216;
  border-radius: 50%;
  background: #edbf5e;
  box-shadow: 0 0 0 1px #9f7938;
}
.radio-mute-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: none;
  min-width: 95px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #675335;
  border-radius: 5px;
  background: #1c1914;
  color: #c2b49c;
  font: inherit;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .55px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 214, 136, .04);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.radio-mute-icon { display: block; flex: none; }
.radio-icon-muted { display: none; }
.radio-mute-button:hover,
.radio-mute-button:focus-visible {
  background: #2d261b;
  border-color: var(--station-amber);
  color: #f0d6a1;
}
.radio-mute-button[aria-pressed="true"],
.radio-mute-button[aria-pressed="true"]:hover,
.radio-mute-button[aria-pressed="true"]:focus-visible {
  background: var(--station-amber);
  border-color: var(--station-amber);
  color: #14110a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.radio-mute-button[aria-pressed="true"] .radio-icon-waves { display: none; }
.radio-mute-button[aria-pressed="true"] .radio-icon-muted { display: block; }
.radio-popout-button {
  padding: 8px 12px;
  font-size: 10px;
  white-space: nowrap;
}
.radio-feedback {
  font-size: 11px;
  line-height: 1.6;
  color: #948a7a;
  margin: 15px 0 0;
}
.radio-feedback[hidden] { display: none; }
.radio-feedback[data-error="true"] { color: #d58f6e; }
.radio-audio-element { display: none; }
.live-relays {
  border-top: 1px solid var(--station-border);
  padding-top: 23px;
  margin-top: 36px;
}
.live-relay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 17px;
}
.live-relay-tile {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  gap: 13px;
  border: 1px solid #4a3b27;
  padding: 19px;
  text-decoration: none;
  background: #11100d;
}
.live-relay-tile:hover, .live-relay-tile:focus-visible {
  border-color: var(--station-amber);
  background: #211a10;
}
.live-relay-type {
  font-size: 10px;
  color: #938575;
  letter-spacing: .8px;
}
.live-relay-name {
  color: #e0a106;
  font-size: 18px;
  letter-spacing: 1px;
  line-height: 1.3;
}
.live-relay-action {
  font-size: 10px;
  letter-spacing: .7px;
  color: #bfa273;
}
.radio-popup-body {
  display: block;
  min-height: 0;
  padding: 0;
}
.radio-popup-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px;
}
/* Compact controls only in the pop-out; the full live page is unchanged. */
.radio-popup-shell .live-radio { padding: 15px 18px 14px; }
.radio-popup-shell .radio-topline { padding-bottom: 9px; }
.radio-popup-shell .radio-dial { padding: 14px 0 11px; }
.radio-popup-shell .radio-frequency { font-size: 56px; }
.radio-popup-shell .radio-readout { min-height: 0; padding: 13px 15px; }
.radio-popup-shell .radio-current-title { font-size: 17px; margin-top: 6px; }
.radio-popup-shell .radio-program-context,
.radio-popup-shell .radio-story-progress { margin-top: 7px; }
.radio-popup-shell .radio-environment { margin-top: 12px; padding: 11px 0; }
.radio-popup-shell .radio-condition-row + .radio-condition-row { margin-top: 8px; }
.radio-popup-shell .radio-metadata-status { margin-top: 8px; }
.radio-popup-shell .radio-controls { margin: 14px 0 10px; }
.radio-popup-shell .radio-controls .radio-button { min-height: 39px; padding: 8px 10px; }
.radio-popup-shell .radio-feedback { margin-top: 10px; }
@media (max-width: 560px) {
  .live-radio { padding: 20px 17px; }
  .radio-readout { padding: 16px; }
  .radio-tune-button { flex-basis: 100%; }
  .radio-disconnect-button { flex: 1 1 100%; }
  .radio-frequency { font-size: 54px; }
  .radio-popup-shell { padding: 12px; }
  .radio-popup-shell .live-radio { padding: 19px 16px; }
}
@media (max-width: 420px) {
  .live-relay-grid { grid-template-columns: 1fr; }
  .live-relay-tile { min-height: 103px; }
  .radio-popout-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .radio-button, .radio-popout-button, .radio-mute-button { transition: none; }
}

/* WTLEB v1.7: compact horizontal audio peak meter replacing the metadata status. */
.radio-audio-meter { margin-top: 10px; min-width: 0; }
.radio-audio-meter-label {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 4px; font-size: 10px; letter-spacing: 0.75px;
  color: #ad926d; font-variant-numeric: tabular-nums;
}
#radio-audio-db { color: #dba85e; white-space: nowrap; }
.radio-audio-meter-gauge {
  width: 100%; height: 38px; overflow: hidden; background: #14120f;
  border: 1px solid #4a3b27; border-radius: 2px;
  box-sizing: border-box;
}
.radio-audio-meter-gauge > div { box-sizing: border-box; }
.radio-visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* v1.8 compact controls, live indicator, and lightweight alternate-relay links */
.live-radio[data-audio-state="playing"] .radio-playback-status { color: #f06858; }
.live-radio[data-audio-state="playing"] .radio-status-led {
  background: #f44836;
  animation: radio-on-air-pulse 2.6s ease-in-out infinite;
}
@keyframes radio-on-air-pulse {
  0%,100% { opacity: .4; box-shadow: 0 0 2px #f44836; }
  50% { opacity: 1; box-shadow: 0 0 11px 3px rgba(244,72,54,.55); }
}
.radio-topline { padding-bottom: 10px; }
.radio-dial { padding: 17px 0 13px; }
.radio-readout { padding: 15px 17px; min-height: 94px; }
.radio-environment { margin-top: 14px; padding: 12px 0; }
.radio-controls { gap: 9px; margin: 15px 0 12px; }
.radio-controls .radio-button {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 1 auto; gap: 8px; padding: 8px 15px;
  min-width: 106px; min-height: 36px; font-size: 11px;
}
.radio-controls .radio-disconnect-button { min-width: 86px; }
.radio-control-icon { flex: none; }
.radio-mute-button { width: 35px; min-width: 35px; min-height: 34px; padding: 6px; }
.radio-bottomline { gap: 8px; flex-wrap: nowrap; }
.radio-volume-group { flex: 1 1 auto; min-width: 0; gap: 9px; }
.radio-popout-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 35px; height: 34px; flex: none; padding: 5px;
  border-color: #675335; color: #d4b17b;
}
.radio-feedback { margin-top: 9px; }
.live-relay-strip {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  margin: 13px 0 21px; padding: 9px 0;
  border-top: 1px solid #3b3020; border-bottom: 1px solid #3b3020;
}
.live-relay-strip-label { color: #8d8070; font-size: 10px; letter-spacing: 1px; margin-right: 5px; }
.live-relay-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 4px; text-decoration: none;
  border: 1px solid #4b392b; background: #18140f;
  font-size: 11px; letter-spacing: .8px; font-weight: bold;
}
.live-relay-youtube { color: #f56b5b; border-color: #6d302c; }
.live-relay-rumble { color: #8aca63; border-color: #3b6131; }
.live-relay-chip:hover,.live-relay-chip:focus-visible { background: #2a2118; border-color: currentColor; }
.radio-popup-shell { max-width: 430px; padding: 10px; }
.radio-popup-shell .live-radio { padding: 12px 15px; }
.radio-popup-shell .radio-topline { padding-bottom: 7px; }
.radio-popup-shell .radio-dial { padding: 9px 0 7px; }
.radio-popup-shell .radio-frequency { font-size: 44px; }
.radio-popup-shell .radio-dial-caption { font-size: 9px; }
.radio-popup-shell .radio-readout { padding: 10px 12px; min-height: 0; }
.radio-popup-shell .radio-current-title { font-size: 15px; margin-top: 4px; }
.radio-popup-shell .radio-environment { margin-top: 8px; padding: 8px 0; }
.radio-popup-shell .radio-controls { margin: 11px 0 8px; }
.radio-popup-shell .radio-controls .radio-button {
  min-width: 90px; min-height: 33px; padding: 5px 11px;
}
.radio-popup-shell .radio-audio-meter-gauge { height: 30px; }
.radio-popup-shell .radio-feedback { font-size: 10px; }
@media (max-width: 560px) {
  .radio-popup-shell { padding: 9px; }
  .radio-popup-shell .live-radio { padding: 12px; }
  .radio-controls .radio-button { flex: 0 0 auto; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-radio[data-audio-state="playing"] .radio-status-led {
    animation: none; opacity: 1; box-shadow: 0 0 4px rgba(244,72,54,.6);
  }
}

/* v1.8.1: pulse the complete ON AIR status, not just its tiny LED. */
.live-radio[data-audio-state="playing"] .radio-playback-status {
  display: inline-flex;
  align-items: center;
  color: #f06858;
  animation: radio-receiving-pulse 2.8s ease-in-out infinite;
  will-change: opacity;
}
@keyframes radio-receiving-pulse {
  0%, 100% { opacity: .40; text-shadow: 0 0 0 rgba(240,104,88,0); }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(240,104,88,.6); }
}
@media (prefers-reduced-motion: reduce) {
  .live-radio[data-audio-state="playing"] .radio-playback-status {
    animation: none;
    opacity: 1;
    text-shadow: none;
  }
}

/* Reusable PNG platform marks for live video relay links (v1.9). */
.live-relay-logo { width: 24px; height: 24px; display: block; object-fit: contain; flex: none; }

/* Compact pop-out titles stay one line; full title remains in DOM tooltip. */
.radio-popup-shell .radio-current-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Keep main receiver program title compact, with full text on hover. */
.live-radio .radio-current-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Minimal video relay links: platform marks carry the color, not button chrome. */
.live-relay-strip .live-relay-chip {
  padding: 5px 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #cfb78b;
  transition: color .15s ease, background-color .15s ease;
}
.live-relay-strip .live-relay-chip:hover,
.live-relay-strip .live-relay-chip:focus-visible {
  border: 0;
  background: #241e15;
  color: #f0c873;
  text-decoration: none;
}
.live-relay-strip .live-relay-chip:focus-visible {
  outline: 1px solid #dba85e;
  outline-offset: 2px;
}

/* Unified compact receiver control panel (v1.11). */
.radio-control-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 11px 12px;
  background: #0c0b09;
  border: 1px solid #332a1e;
  border-radius: 3px;
  min-width: 0;
}
.radio-control-panel .radio-controls {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 0;
}
.radio-control-panel .radio-controls .radio-button {
  flex: none;
  min-height: 34px;
  padding: 6px 11px;
  min-width: 0;
}
.radio-control-panel .radio-volume-group {
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-end;
  gap: 8px;
}
.radio-control-panel .radio-volume { min-width: 55px; max-width: 155px; flex: 1 1 90px; }
.radio-control-panel .radio-popout-slot {
  margin-left: 1px;
  padding-left: 12px;
  border-left: 1px solid #4b3c27;
  flex: none;
}
.radio-control-panel .radio-popout-button { width: 34px; height: 34px; }
.radio-popup-shell .radio-control-panel { gap: 9px; padding: 8px; margin-top: 10px; }
.radio-popup-shell .radio-control-panel .radio-controls { gap: 5px; }
.radio-popup-shell .radio-control-panel .radio-controls .radio-button {
  min-width: 0;
  min-height: 33px;
  padding: 5px 8px;
}
.radio-popup-shell .radio-control-panel .radio-volume-group { gap: 6px; }
.radio-popup-shell .radio-control-panel .radio-volume { min-width: 45px; }
@media (max-width: 650px) {
  .radio-control-panel { flex-wrap: wrap; gap: 10px; }
  .radio-control-panel .radio-controls { flex: 1 1 auto; }
  .radio-control-panel .radio-volume-group { flex: 1 1 135px; }
  .radio-control-panel .radio-popout-slot { margin-left: auto; }
}
@media (max-width: 390px) {
  .radio-control-panel .radio-controls { flex: 1 1 100%; }
  .radio-control-panel .radio-volume-group { flex: 1 1 130px; }
}

/* Pop-out only: prioritize a single horizontal transport/volume row. */
.radio-popup-shell .radio-control-panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  padding: 8px;
}
.radio-popup-shell .radio-control-panel .radio-controls {
  flex: 0 0 auto;
  gap: 5px;
  min-width: 0;
}
.radio-popup-shell .radio-control-panel .radio-controls .radio-button {
  min-width: 0;
  min-height: 33px;
  padding: 5px 7px;
  gap: 5px;
  white-space: nowrap;
}
.radio-popup-shell .radio-control-panel .radio-volume-group {
  flex: 1 1 0;
  min-width: 0;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.radio-popup-shell .radio-control-panel .radio-volume {
  flex: 1 1 55px;
  width: 100%;
  min-width: 32px;
  max-width: 85px;
}
.radio-popup-shell .radio-control-panel .radio-mute-button {
  flex: none;
  min-width: 31px;
  width: 31px;
}
@media (max-width: 345px) {
  .radio-popup-shell .radio-control-panel { flex-wrap: wrap; }
  .radio-popup-shell .radio-control-panel .radio-volume-group { flex: 1 1 100%; }
}


/* Full live page only: make TUNE IN more prominent than STOP.
   The pop-out receiver does not use the live-page body class. */
.live-page .radio-control-panel .radio-controls .radio-tune-button {
  min-width: 210px;
}
@media (max-width: 650px) {
  .live-page .radio-control-panel .radio-controls .radio-tune-button {
    min-width: 155px;
  }
}
@media (max-width: 390px) {
  .live-page .radio-control-panel .radio-controls .radio-tune-button {
    min-width: 0;
    flex: 1 1 auto;
  }
}
