/* TwinEaglesRadio: responsive.css (site 1.92.0). Moved from partials/responsive.php so browsers cache it;
   it is linked from the same place the <style> block stood, so the cascade is unchanged. */
/* 1.92.0 design tokens, after the Chiltern Sound review. :where() gives them no
   weight, so a page's own :root, the Appearance colours and holiday skins still
   win. Shades are mixed from the theme colours, so they follow any theme.
   Use these in new CSS instead of new hex or rgba() values. */
:where(:root){
  --gold-08:color-mix(in srgb,var(--gold) 8%,transparent);
  --gold-15:color-mix(in srgb,var(--gold) 15%,transparent);
  --gold-30:color-mix(in srgb,var(--gold) 30%,transparent);
  --gold-line:color-mix(in srgb,var(--gold) 22%,transparent);
  --text-hi:color-mix(in srgb,var(--text) 5%,transparent);
  --fs-xs:.72rem;--fs-sm:.8rem;--fs-md:.9rem;--fs-base:1rem;--fs-lg:1.15rem;--fs-xl:1.35rem;--fs-2xl:1.75rem;--fs-3xl:2.4rem;
  --r-sm:8px;--r-md:14px;--r-pill:999px;
  --sh-1:0 1px 2px rgba(0,0,0,.25);--sh-2:0 1px 2px rgba(0,0,0,.25),0 12px 28px -14px rgba(0,0,0,.55);--sh-3:0 18px 40px -12px rgba(0,0,0,.6);
}

/* ── Breakpoints — the only four values allowed in this project ──────────────
      479   xs   compact phone (320–428 portrait)
      767   sm   phone / large phone
     1023   md   tablet portrait, small laptop
     1279   lg   laptop
     Custom properties do NOT work inside @media conditions and this project
     has no build step, so these must be written as literals every time.
     Phase 2 migrates the nine legacy breakpoints onto this scale.
   ───────────────────────────────────────────────────────────────────────── */

:root{
  /* Safe-area insets. These only report real values when the page's viewport
     meta includes viewport-fit=cover — added to every page in this phase.
     manifest.json is display:standalone, so an installed PWA has no browser
     chrome between a fixed bottom element and the home indicator. */
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-l:env(safe-area-inset-left,0px);
  --safe-r:env(safe-area-inset-right,0px);

  /* Layout constants referenced by later phases (mini-player, chat sheet). */
  --header-h:64px;        /* .header-inner height in partials/nav.php */
  --miniplayer-h:64px;

  /* One z-index scale, replacing the ad-hoc 50/60/95 values. */
  --z-sticky:10; --z-header:50; --z-dropdown:60; --z-miniplayer:70;
  --z-sheet:80;  --z-fab:90;    --z-modal:100;   --z-toast:110;

  /* Red is legible as a background fill but falls to 3.84:1 as small text on
     --card. --red stays the fill; --red-text is the readable variant (4.6:1). */
  --red-text:#F26363;
}

/* ── Safe-area padding for the standard content containers ───────────────────
   Written as max(current-value, inset) so that on a device with no notch these
   resolve to exactly what the page already had — zero visual change — and only
   grow when there's a real inset to clear (notched phone in landscape, or an
   installed PWA). Only the horizontal longhands are set, so each container's
   own vertical padding shorthand is left intact. */
.wrap, #page-wrapper, .header-inner, .subbanner{
  padding-left:max(1rem, var(--safe-l));
  padding-right:max(1rem, var(--safe-r));
}
.shell > .content{
  padding-left:max(1.75rem, var(--safe-l));
  padding-right:max(1.75rem, var(--safe-r));
}

/* ── iOS zoom-on-focus ───────────────────────────────────────────────────────
   Mobile Safari zooms the viewport whenever a focused field's font-size is
   under 16px, and does not zoom back out afterwards. Every input on this site
   was between 12.3px and 14.4px. Scoped to coarse pointers so the tighter
   desktop density (especially in the back office) is unaffected. */
@media (pointer:coarse){
  input, select, textarea,
  .chat-input, .compose-input{ font-size:16px; }
}

/* ── Focus ───────────────────────────────────────────────────────────────────
   `outline:none` appears in 17 files here and :focus-visible in none, which
   left keyboard users with no position indicator at all. :focus-visible only
   matches keyboard/AT focus, so mouse clicks stay visually clean. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible{
  outline:2px solid var(--gold,#C9A84C);
  outline-offset:2px;
  border-radius:8px;
}
/* Skip-to-content target for keyboard users, if a page provides #content-main */
:target{ scroll-margin-top:calc(var(--header-h) + 12px); }

/* ── Reduced motion ──────────────────────────────────────────────────────────
   Only sports.php honoured this. Four infinite pulse animations (lppulse,
   onairpulse, navnp, and player.php's pulse) ran unguarded everywhere else. */
/* ═══ Phase 2 ═══════════════════════════════════════════════════════════════
   Shared rules that replace per-page media queries. These live here rather
   than in each page because they were duplicated 5-6 times with slightly
   different breakpoints. Emitted after every page's <head> CSS, so they win.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Two-column form rows ────────────────────────────────────────────────────
   .field-row was declared `1fr 1fr` in five pages (dj-apply, hosting,
   indie-artists, indie-edit, report-bug), each with its own @media(600px)
   collapse. auto-fit does the same job at every width with no breakpoint:
   280px means two columns need ~592px of viewport, matching the old intent. */
.field-row{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(280px,100%), 1fr));
  gap:1rem;
}

/* ── Wrapping form rows (back office) ────────────────────────────────────────
   admin's `.row{display:flex} .row>*{flex:1}` never wrapped, so paired fields
   squeezed to unusable widths on a phone. Only admin/index.php defines .row
   among the pages that load this partial. */
.row{ flex-wrap:wrap; }
.row > *{ flex:1 1 200px; min-width:0; }

/* ── Tab strips scroll instead of overflowing ────────────────────────────────
   sports.php already did this correctly; this generalises its pattern to
   admin/index.php, admin/music.php, news.php, profile.php and schedule.php.
   max-width matters because news.php and schedule.php set width:fit-content,
   which would otherwise push past the container rather than scroll. */
.tabs{
  flex-wrap:nowrap;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
}
.tabs::-webkit-scrollbar{ display:none; }
.tabs > .tab,
.tabs > .tab-btn,
.tabs > button,
.tabs > a{ flex:0 0 auto; scroll-snap-align:start; }

/* ── Modals fit the screen they're on ────────────────────────────────────────
   index.php's .modal-box had NO max-height at all, so the sign-in and
   song-request modals were unscrollable on a landscape phone. The overlay adds
   1rem of padding top and bottom, hence the 2rem subtraction. */
.modal-box, .modal{
  max-height:calc(100vh - 2rem);
  max-height:calc(100dvh - 2rem);
  overflow-y:auto;
}
@media (max-width:639px){
  .modal-overlay{ padding:.75rem; }
  .modal-box, .modal{
    padding:1.25rem;
    max-height:calc(100dvh - 1.5rem - var(--safe-b));
  }
}

/* ── Reduced motion (Phase 1) ── */
@media (prefers-reduced-motion:reduce){
  *, *::before, *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* ═══ Phase 7 — shared game chrome ══════════════════════════════════════════
   All seven game pages carry `.te-game` on <body> and all seven include this
   partial through partials/nav.php, so the touch-target floors belong here
   rather than repeated in each file. Measured at 375px before this block:
   the "← Games" crumb link was 63x16 on every page, and the primary buttons
   were 38-41px tall — all under the 44px minimum. Scoped to coarse pointers
   so desktop density is untouched.
   ───────────────────────────────────────────────────────────────────────── */
@media (pointer:coarse){
  .game-crumb .back{
    display:inline-flex; align-items:center;
    min-height:44px; padding-right:.25rem;
  }
  .te-game .btn,
  .te-game .key,
  .te-game .tabbtn,
  .te-game .seg button{
    min-height:44px;
    display:inline-flex; align-items:center; justify-content:center;
  }
  /* A range thumb is the grab target; the track stays visually thin. */
  .te-game input[type=range]{ height:44px; }
}

/* ═══ 1.49.0 — every phone ══════════════════════════════════════════════════
   Measured at 320, 360, 375, 390, 412 and 430 wide (portrait) and 740x360
   (landscape). Nothing overflowed sideways; these fix what was left: menu
   links and footer legal links under 44px, text under 12px, and a few
   layouts that only break on the narrowest phones.
   ───────────────────────────────────────────────────────────────────────── */
@media (pointer:coarse){
  .dropdown a{ display:flex; align-items:center; min-height:44px; }
  .ftr-legal a{ display:inline-flex; align-items:center; min-height:44px; }
  .credit a{ display:inline-block; padding:.6rem 0; }
  .toc a{ display:block; padding:.55rem 0; }
  .ftr-brand a, .back-link, .crumbs a, a.home{ display:inline-flex; align-items:center; min-height:44px; }
  #lpMute{ min-width:40px; min-height:40px; }
  .vol input[type=range]{ height:32px; }
  .ev-filter button, .follow-btn, .play-find, .replay-tools .dl, #refreshBtn{ min-height:40px; }
}
/* Long words, links and song titles wrap instead of pushing the page wide */
body{ overflow-wrap:break-word; }
iframe, embed, object{ max-width:100%; }
/* Wide tables scroll inside their own box */
.panel:has(> table), .tw, .lscroll{ max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
@media (max-width:767px){
  /* Readable floor: nothing below 12px on a phone */
  .ftr-copy, .ftr-legal, .credit, .field-hint, fieldset legend,
  .game-badge, .lp-live, .hw-poster-kicker, #miniArtist,
  .stand th, .sec-title small{ font-size:.75rem; }
  .hero-dial{ font-size:.7rem; }
  /* The footer and holiday styles load after this block, so these need more weight */
  html body .ftr-copy, html body .ftr-legal, html body .ftr-legal a{ font-size:.75rem; }
  html body .today-tag, .onair-pill, .price-popular-badge, #lpListeners, .rp-req,
  .follow-btn, .play-find, .lp-recent-head b, .lp-recent-head a{ font-size:max(.7rem, 11px); }
  /* Section headings with a note beside them stack instead of squeezing */
  .sec-title:has(small){ flex-wrap:wrap; row-gap:.15rem; }
  .sec-title small{ flex-basis:100%; }
}
@media (max-width:479px){
  /* The homepage play row has no room for a volume slider on a small phone */
  .hero .lp-vol{ display:none; }
}
