/* ===== Nation Decades request page — styled to match nationplayer.com (Aiir "t-red" theme) ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  /* Taken from the live Nation Player station pages */
  --red: #F03223;          /* headings, buttons, active states */
  --red-dark: #d32a1c;
  --ink: #374151;          /* body text */
  --ink-strong: #111827;   /* song titles */
  --muted: #6B7280;        /* artist names, timestamps */
  --bg: #FBFAFA;           /* main content background */
  --field: #FFFFFF;
  --line: #E5E7EB;
  --radius: 6px;           /* album-art corners */
  --pill: 20px;            /* "listen live" button */
  --font: itc-avant-garde-gothic-pro, 'Jost', Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); }
body.is-transparent { background: transparent; }

.portal { max-width: 700px; padding: 4px 4px 12px; }

/* ---- Station picker (only on the all-stations version) — Aiir nav style ---- */
.stations { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.station-tab {
  font: 500 1rem/1 var(--font); color: var(--ink); background: none; border: 0; cursor: pointer;
  padding: 14px 16px; box-shadow: none; transition: box-shadow .15s, color .15s;
}
.station-tab:hover { color: var(--red); }
.station-tab[aria-pressed="true"] { color: var(--ink-strong); box-shadow: inset 0 -2px 0 var(--red); }

/* ---- Heading (matches "Playing Now") ---- */
.intro { margin: 0 0 20px; }
.intro h1 { margin: 0 0 6px; color: var(--red); font: 700 2rem/1.2 var(--font); letter-spacing: -0.01em; }
.intro p { margin: 0; max-width: 56ch; }
.intro strong { color: var(--ink-strong); font-weight: 700; }

/* ---- Form ---- */
.card { background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step + .step { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.step[aria-disabled="true"] { opacity: .45; pointer-events: none; }
h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--ink-strong); font: 700 1.15rem/1.3 var(--font); }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--red); color: #fff; font-size: .9rem; font-weight: 700; }

/* ---- Search ---- */
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink-strong); background: var(--field);
  border: 1px solid #D1D5DB; border-radius: var(--radius); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
#q { padding-left: 44px; font-size: 1.05rem; }
#q::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; cursor: pointer; }
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(240, 50, 35, .15); }
input::placeholder, textarea::placeholder { color: #9CA3AF; }
.hint { margin: 6px 2px 0; font-size: .875rem; color: var(--muted); }

.results { list-style: none; margin: 10px 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.results:empty { display: none; }
.results li + li { border-top: 1px solid var(--line); }
.result {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 10px 8px; background: none; border: 0; border-radius: var(--radius); cursor: pointer;
}
.result:hover, .result:focus-visible { outline: none; background: rgba(240, 50, 35, .06); }
.result .t { display: block; color: var(--ink-strong); font-weight: 700; line-height: 1.35; }
.result .a { display: block; color: var(--muted); font-size: .95rem; }
.result .y { margin-left: auto; color: var(--muted); font-size: .875rem; }
.result mark { background: rgba(240, 50, 35, .12); color: inherit; border-radius: 2px; }
.results .empty { padding: 12px 8px; color: var(--muted); font-size: .95rem; }

/* ---- Chosen song ---- */
.chosen { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius);
  background: rgba(240, 50, 35, .05); border: 1px solid rgba(240, 50, 35, .35); }
.chosen-icon, .thanks-icon { flex: none; display: grid; place-items: center; border-radius: var(--radius); background: var(--red); }
.chosen-icon { width: 52px; height: 52px; }
.chosen-icon svg, .thanks-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chosen-text { min-width: 0; }
.pill { display: inline-block; margin-bottom: 3px; padding: 1px 7px; border-radius: 4px; background: var(--red); color: #fff;
  font-size: .8rem; font-weight: 700; line-height: 1.5; }
.chosen strong { display: block; color: var(--ink-strong); font-size: 1.05rem; line-height: 1.3; }
#chosenArtist { color: var(--muted); }
.link-btn { margin-left: auto; font: 500 .95rem/1 var(--font); color: var(--red); background: none; border: 0;
  padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Details ---- */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; margin-bottom: 14px; }
label { display: block; margin: 0 0 5px; color: var(--ink-strong); font-size: .95rem; font-weight: 500; }
.req { color: var(--red); }
.opt { font-weight: 400; color: var(--muted); }
textarea { resize: vertical; min-height: 92px; }
.counter { position: absolute; right: 10px; bottom: 8px; font-size: .75rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error { margin: 4px 0 14px; padding: 10px 12px; border-radius: var(--radius); font-size: .95rem; color: #991B1B;
  background: #FEF2F2; border: 1px solid #FECACA; }

/* ---- Buttons (match "listen live") ---- */
.send {
  display: inline-flex; align-items: center; justify-content: center; min-width: 220px; padding: 16px 28px;
  font: 700 1rem/1 var(--font); text-transform: lowercase; cursor: pointer;
  color: #fff; background: var(--red); border: 0; border-radius: var(--pill);
  box-shadow: 0 4px 10px 2px rgba(0, 0, 0, .12); transition: background .15s, transform .1s, opacity .15s;
}
.send:hover:not(:disabled) { background: var(--red-dark); }
.send:active:not(:disabled) { transform: translateY(1px); }
.send:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.send--ghost { color: var(--red); background: #fff; }
.send--ghost:hover:not(:disabled) { background: #fff; color: var(--red-dark); }
.send:focus-visible, .station-tab:focus-visible, .link-btn:focus-visible, .result:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px; }
.small { margin: 12px 0 0; font-size: .875rem; color: var(--muted); }

/* ---- Thanks ---- */
.thanks { padding: 28px 20px; }
.thanks:focus { outline: none; }
.thanks-icon { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; }
.thanks h2 { margin-bottom: 6px; color: var(--red); font-size: 1.6rem; }
.thanks p { margin: 0 0 20px; max-width: 46ch; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 520px) {
  .intro h1 { font-size: 1.75rem; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 16px; }
  .send { width: 100%; min-width: 0; }
  .stations { overflow-x: auto; }
  .station-tab { padding: 12px 12px; }
}
