/* Grassroots Cup — shared base styles (round 21, 2026-09-21).
   Ported from the design mockups' inline <style> block (font-family
   overrides for Roboto Condensed body text + Material Symbols icon
   sizing), plus a handful of small extras (skeleton loading shimmer,
   live-pulse dot, bottom-nav safe-area padding) that don't have a clean
   Tailwind utility equivalent. Loaded on every page via
   <link rel="stylesheet" href="css/base.css">. */

/* 2026-09-24 fix: this used to end in "!important", which beats ANY
   Tailwind font-family utility class (font-body-md, font-label-badge,
   font-headline-sm, ...) on every span/div/a/p/h1-h6/body/input/button/
   select/textarea, regardless of that class's specificity — so a Tailwind
   font class applied to any of those tags silently had NO visual effect,
   always rendering "Roboto Condensed" instead. That's exactly why e.g. the
   "Огноо:" <span> (font-label-badge) and the "Хэсгээр шүүх"/"Төлөвөөр шүүх"
   <label>s (also font-label-badge, but <label> was never in this
   !important selector list) rendered in two DIFFERENT fonts despite having
   identical classes.

   Dropping !important alone isn't quite enough, though: the old selector
   list used span:not(.material-symbols-outlined):not(.material-icons) (and
   same for div/a) to keep this rule off the Material icon glyphs — but each
   :not(.foo) adds a CLASS's worth of specificity, so
   "span:not(...):not(...)" ended up MORE specific (2 :not()s + the tag) than
   a plain Tailwind class like ".font-label-badge", and would still have won
   even without !important. The :not() exclusions turn out to be unnecessary
   anyway: the Material icon rule right below this one targets
   .material-symbols-outlined/.material-icons directly WITH !important, so
   it already always wins over this plain element-selector default
   regardless of what this rule's selector list looks like. Simplifying to
   bare tag selectors here (specificity 1) lets any Tailwind font-family
   utility class (specificity 10) win normally on span/div/a/p/h1-h6 too —
   verified in a real browser, see test_font_cascade.js. Elements with no
   font-* utility class still fall back to Roboto Condensed here exactly as
   before, since nothing else targets them. */
/* 2026-10-03: "Бичлэгүүд" marquee — scrollable (touch/trackpad) but with
   the scrollbar itself hidden. */
.gc-no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.gc-no-scrollbar::-webkit-scrollbar { display: none; }
/* Card width set here (not via Tailwind classes) so the marquee can measure
   overflow immediately — the Tailwind CDN generates new utility classes
   asynchronously, after the cards are inserted. */
.gc-video-card { flex: 0 0 auto; width: 15rem; }
@media (min-width: 640px) { .gc-video-card { width: 18rem; } }
.gc-ratio-16x9 { aspect-ratio: 16 / 9; }

body, input, button, select, textarea, h1, h2, h3, h4, h5, h6, p, span, div, a {
  font-family: "Roboto Condensed", sans-serif;
}
.material-symbols-outlined, .material-icons {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  /* Defensive clip: if the icon webfont hasn't loaded yet (slow network,
     blocked font CDN, ad-blocker) each icon renders its ligature name as
     literal text (e.g. "home", "calendar_month") instead of a glyph. A
     ligature icon glyph is ~1em square, so constrain every icon to a 1em
     box and hide overflow — once the font loads the real glyph is
     unaffected, but the un-loaded-font fallback text gets clipped instead
     of spilling out of tight containers like the fixed mobile bottom nav. */
  width: 1em;
  height: 1em;
  overflow: hidden;
  vertical-align: middle;
}

/* Live match pulsing dot (used in several places besides the header's
   inline Tailwind `animate-ping`, where a plain CSS keyframe reads clearer
   in hand-written markup). */
@keyframes gc-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.gc-live-dot { animation: gc-live-pulse 1.4s ease-in-out infinite; }

/* Skeleton shimmer — shown in place of any card while its data.js fetch is
   still in flight (see js/api.js's loading-state helpers). Kept as plain
   CSS rather than a Tailwind plugin so it works even before the CDN config
   script (loaded first) has fully evaluated. */
@keyframes gc-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.gc-skeleton {
  background: linear-gradient(90deg, #eef0ff 25%, #f8f9ff 37%, #eef0ff 63%);
  background-size: 800px 100%;
  animation: gc-shimmer 1.4s ease-in-out infinite;
  border-radius: 0.5rem;
}

/* Mobile bottom utility nav — fixed, safe-area aware (iOS home indicator). */
.gc-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Horizontally-scrollable pill-tab rows (mobile age-group / group-letter
   tabs) — hide the scrollbar but keep it functional. */
.gc-scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gc-scroll-x::-webkit-scrollbar { display: none; }
