/* Operator buttons (AIR, BBC ...) and operator panels. Load AFTER style.css and vu-meter.css. */

/* The search box and the operator button share one line. .search-line takes over the
   spacing the search box had on its own (same values as style.css), so it lines up with the list below. */
.search-line {
  display: flex; align-items: center; gap: 10px;
  max-width: 720px; margin: 6px 18px 16px;
}
.search-line > .search-row { flex: 1 1 auto; min-width: 0; margin: 0; max-width: none; }
.search-line #searchInput { min-width: 0; width: 100%; }
@media (min-width: 758px) { .search-line { margin-left: auto; margin-right: auto; } }
@media (min-width: 900px) { .search-line { max-width: none; margin-left: 22px; margin-right: 22px; } }

.operator-bar { display: flex; gap: 8px; flex: none; }
.operator-bar[hidden] { display: none; }

.op-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 10px;
  border-radius: 12px; border: 1px solid rgba(139, 92, 246, 0.5);
  background: var(--ink-violet-800); color: var(--text-high);
  font-family: var(--font-body); font-size: 17px; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease;
}
.op-btn img { width: 30px; height: 30px; object-fit: contain; border-radius: 7px; background: #fff; flex: none; }
.op-btn:hover { background: var(--violet-600); }
.op-btn:focus-visible, .op-back:focus-visible, .op-toggle button:focus-visible { outline: 2px solid var(--amber-500); outline-offset: 2px; }
.op-btn.is-active { background: var(--violet-600); border-color: var(--amber-500); box-shadow: 0 0 0 1px var(--amber-500) inset; }

.op-panel-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid rgba(139, 92, 246, 0.35); background: var(--ink-violet-900);
}
.op-back {
  min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(139, 92, 246, 0.45);
  background: var(--ink-violet-800); color: var(--text-high);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
}
.op-back:hover { background: var(--violet-600); }
.op-title { flex: 1 1 140px; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-high); }
.op-title .category-count { margin-left: 8px; }
.op-toggle { display: inline-flex; border-radius: 12px; overflow: hidden; border: 1px solid rgba(139, 92, 246, 0.45); }
.op-toggle button {
  min-height: 44px; padding: 0 16px; border: 0; background: var(--ink-violet-800); color: var(--text-mid);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
}
.op-toggle button + button { border-left: 1px solid rgba(139, 92, 246, 0.45); }
.op-toggle button[aria-pressed="true"] { background: var(--violet-600); color: var(--text-high); }
.op-native { margin-left: 10px; font-family: var(--font-body); font-weight: 500; color: var(--text-mid); }
.op-subhead {
  padding: 12px 18px 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--amber-500);
  border-top: 1px solid rgba(139, 92, 246, 0.14);
}

@media (max-width: 899px) {
  .op-btn { min-height: 52px; }
  .op-toggle { width: 100%; }
  .op-toggle button { flex: 1 1 50%; }
  .op-back { flex: 1 1 100%; text-align: left; }
}

/* ================= Header stat boxes (brushed-metal plates) ================= */
.stat-boxes { display: grid; gap: 8px; }
.stat-box {
  position: relative;
  text-align: center;
  border-radius: 9px;
  border: 1px solid #55585f;
  padding: 7px 8px 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.60) 0%, rgba(255,255,255,.08) 45%, rgba(0,0,0,.02) 52%, rgba(0,0,0,.20) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, rgba(0,0,0,.06) 1px 2px),
    linear-gradient(90deg, #8b8e95 0%, #c7c9ce 16%, #eff0f2 36%, #b5b8be 60%, #e2e3e6 82%, #8b8e95 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -2px 3px rgba(0,0,0,.30),
    inset 1px 0 0 rgba(255,255,255,.35),
    inset -1px 0 0 rgba(0,0,0,.18),
    0 1px 0 rgba(255,255,255,.14),
    0 5px 10px -2px rgba(0,0,0,.65);
}
.stat-box b {
  display: block;
  font-size: 21px; line-height: 1.05; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1d1b25;
  text-shadow: 0 1px 0 rgba(255,255,255,.75), 0 -1px 0 rgba(0,0,0,.18);
}
.stat-box span {
  display: block; margin-top: 2px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: #4a4c55;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
/* tiny screw heads, like the radio's faceplate (desktop only) */
@media (min-width: 900px) {
  .stat-box::before, .stat-box::after {
    content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0%, #aeb1b8 45%, #6d7078 100%);
    box-shadow: inset 0 0 0 .5px rgba(0,0,0,.4), 0 .5px 0 rgba(255,255,255,.6);
  }
  .stat-box::before { left: 7px; }
  .stat-box::after { right: 7px; }

  /* logo on the left, 2 x 2 plates on the right, tagline underneath */
  .site-header--stats {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo stats" "tag tag";
    align-items: center; column-gap: 20px; row-gap: 6px;
    text-align: left;
  }
  .site-header--stats .wordmark-logo { grid-area: logo; justify-self: start; }
  .site-header--stats .stat-boxes { grid-area: stats; grid-template-columns: 1fr 1fr; }
  .site-header--stats .tagline { grid-area: tag; text-align: center; margin: 0; }
}
/* phones: one slim row of three plates (number + label on one line) under the logo + tagline */
@media (max-width: 899px) {
  .site-header--stats { flex-wrap: wrap; }
  .site-header--stats .tagline { flex: 1 1 0; min-width: 0; }
  .site-header--stats .stat-boxes { order: 3; flex: 1 0 100%; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
  .stat-box[data-stat="countries"] { display: none; }
  .stat-box { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 4px 4px 3px; border-radius: 7px; }
  .stat-box b { display: inline; font-size: 14px; }
  .stat-box span { display: inline; margin: 0; font-size: 7.5px; letter-spacing: .1em; }
}
/* short phone screens: keep Browse All Stations in view instead */
@media (max-width: 899px) and (max-height: 710px) { .site-header--stats .stat-boxes { display: none; } }

h1.op-title { margin: 0; line-height: 1.25; }

/* language links: chip row on the AIR pages, and the link inside a language group */
.air-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.air-chips a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  background: var(--ink-violet-800); border: 1px solid var(--violet-600);
  color: var(--text-high); font-size: 14px; font-weight: 600; text-decoration: none;
}
.air-chips a:hover { background: var(--violet-600); }
.air-chips a[aria-current="page"] { border-color: var(--amber-500); color: var(--amber-500); }
.air-chips .n { margin-left: 6px; font-weight: 400; opacity: .7; font-size: 12px; }
.air-chips-label { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mid); }
.op-page-link {
  display: block; padding: 12px 18px; font-weight: 600; font-size: 14px;
  color: var(--amber-500); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.06);
}
.op-page-link:hover { text-decoration: underline; }

.op-crumbs { margin: 0 0 10px; font-size: 13px; color: var(--text-mid); }
.op-crumbs a { color: var(--text-mid); text-decoration: none; }
.op-crumbs a:hover { color: var(--text-high); text-decoration: underline; }
.op-crumbs span[aria-current] { color: var(--text-high); }
.op-station-list { columns: 2 260px; column-gap: 24px; margin: 8px 0 14px; padding-left: 18px; }
.op-station-list li { margin: 2px 0; break-inside: avoid; }
