/* AmsalFC — whole-app audit fix (2026-11-03, user phone screenshot + full audit).
   Loads LAST on homepage, /admin and /blog/[slug], after amsal-fix.css.
   What it fixes, and why (each rule traces to a measured fault):
   1. MOBILE MENU: the old drawer was a 280px side panel whose background
      came from competing layers — white in light mode while amsal-design
      forced its links white, so light-mode menu links were invisible
      (white-on-white), and the panel covered only the right ~40% of the
      screen, hiding the opponent side of the hero match card. The menu
      is now a FULL-SCREEN solid navy panel in BOTH modes: nothing peeks
      out from behind it, nothing is ever half-hidden, and the hamburger
      stays visible above it as an obvious X close control.
   2. HERO CARDS: the old glass gradient + blur + 1px outline + inset
      shadows are replaced by a plain solid card (navy surface in dark,
      white in light), no border, no shadow, no blur. Hero ghost buttons
      are now white on translucent white in BOTH modes (the hero is dark
      in both modes; the old light-mode ghost text was dark navy on the
      dark hero). Non-hero ghost buttons follow the page theme instead
      (the old glass rule forced white text on them everywhere, which
      was invisible on light page backgrounds, e.g. Donate).
   3. SCORES: numeric scores are a display rule only — no stored data is
      touched. (The SSR/JS changes that enforce this live in index.astro;
      this file only covers the visual side.)
   4. BRACKET BOARD: the board is a tie-sheet document, not site chrome.
      amsal-design's preservation rules targeted .board-card/.board-box,
      but the real boxes use class .box, so in dark mode the board's
      team names, scores and venue pill inherited white site text on the
      cream board — invisible. Board text is now ink on cream in BOTH
      modes, exactly as the admin preview.
   5. FILTER/TAB BUTTONS: gold is only ever paired with dark text
      (white-on-gold was measured on the active glass tab and the active
      gallery filter in dark mode; dark-on-dark on the active squad
      filter in light mode). Active filters/tabs are now gold + dark ink
      in both modes.
   6. ADMIN LOGIN: the dark login box computed pure black from an older
      layer; it is now the navy canvas token like the rest of the panel.
   Focus rings are NOT removed anywhere: :focus-visible keeps a visible
   ring. Only permanent resting-state outlines are removed (menu link
   borders, hero card borders, ghost button borders/rings).
   Kept deliberately: card borders elsewhere (news, squad, ground,
   fixtures) are the design system's card treatment, not the flagged
   wrapping outlines, so they stay. The bracket board document itself
   (positions, connectors, cream/gold theme) is unchanged. */

body.menu-open { overflow: hidden !important; }

/* ---------- 1. Full-screen mobile menu (<=1024px, both themes) ---------- */
@media (max-width: 1024px) {
  body .nav-links {
    display: none !important;
  }
  body .nav-links.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: 100% !important; max-width: none !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 88px 20px 28px !important;
    gap: 6px !important;
    overflow-y: auto !important;
    background: #181733 !important;
    background-image: none !important;
    border: none !important;
    border-left: none !important;
    box-shadow: none !important;
    transform: none !important;
    z-index: 1001 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body .nav-links.active li { width: 100% !important; margin: 0 !important; }
  body .nav-links.active a {
    width: 100% !important;
    min-height: 52px !important;
    padding: 12px 16px !important;
    gap: 14px !important;
    background: transparent !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    text-align: left !important;
    justify-content: flex-start !important;
  }
  body .nav-links.active a::before { content: none !important; display: none !important; }
  body .nav-links.active a span { color: #ffffff !important; font-size: 17px !important; }
  body .nav-links.active a i { color: #fdc52c !important; font-size: 18px !important; }
  body .nav-links.active a:hover,
  body .nav-links.active a:active {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fdc52c !important;
    border: none !important;
    transform: none !important;
  }
  body .nav-links.active a:hover span { color: #fdc52c !important; }
  /* Theme toggle row inside the menu: gold pill, dark icon, full width. */
  body .nav-links.active li:has(.theme-toggle-btn) { margin-top: 10px !important; }
  body .nav-links.active .theme-toggle-btn {
    width: 100% !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fdc52c !important;
    background-image: none !important;
    color: #181733 !important;
    border: none !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 18px !important;
  }
  body .nav-links.active .theme-toggle-btn svg,
  body .nav-links.active .theme-toggle-btn i { color: #181733 !important; }
  /* Admin menu label: muted white on navy (was slate grey on navy). */
  body .nav-links.active.admin-nav-links::before { color: rgba(255, 255, 255, 0.65) !important; }
  body .nav-links.active.admin-nav-links #logout-btn {
    background: #fff1f2 !important; color: #be123c !important; border: none !important;
  }
  /* Hamburger stays visible above the solid menu and becomes an X.
     Selector must beat club-design's `.navbar .menu-toggle` rule
     (dark icon on light pill), which otherwise wins on the navy bar. */
  body .navbar .menu-toggle {
    position: relative !important;
    z-index: 1002 !important;
    color: #ffffff !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
  body .navbar .menu-toggle.active svg { display: none !important; }
  body .navbar .menu-toggle.active::after {
    content: "✕" !important;
    display: inline-block !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #ffffff !important;
  }
}

/* ---------- 2. Hero cards: simple, solid, no wrapping outline ----------
   These selectors deliberately match glass-home's
   `body.glass-home .hero-match-deck .hero-cup-card.tp-featured` rule
   (dark gradient + 1px outline + big shadow, all !important), which
   otherwise beats a plain `.hero-match-deck .glass-card` rule. Same
   for the team/foot/vs/label colours glass-home forces. */
body.glass-home .hero-match-deck .hero-cup-card.tp-featured,
body.glass-home .hero-match-deck .hero-club-card.tp-featured,
body .hero-match-deck .glass-card,
body .hero-match-deck .hero-club-card,
body .hero-match-deck .hero-cup-card {
  background: #154284 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="light"] body.glass-home .hero-match-deck .hero-cup-card.tp-featured,
html[data-theme="light"] body.glass-home .hero-match-deck .hero-club-card.tp-featured,
html[data-theme="light"] body .hero-match-deck .glass-card,
html[data-theme="light"] body .hero-match-deck .hero-club-card,
html[data-theme="light"] body .hero-match-deck .hero-cup-card {
  background: #ffffff !important;
  color: #181733 !important;
}
body.glass-home .hero-match-deck .tp-team span,
body .hero-match-deck .tp-team span { color: #ffffff !important; text-shadow: none !important; }
html[data-theme="light"] body.glass-home .hero-match-deck .tp-team span,
html[data-theme="light"] body .hero-match-deck .tp-team span { color: #181733 !important; }
body.glass-home .hero-match-deck .tp-featured-foot span,
body .hero-match-deck .tp-featured-foot span { color: #eef4ee !important; }
body.glass-home .hero-match-deck .tp-featured-foot span:last-child,
body .hero-match-deck .tp-featured-foot span:last-child { color: #cdd9d0 !important; }
html[data-theme="light"] body.glass-home .hero-match-deck .tp-featured-foot span,
html[data-theme="light"] body .hero-match-deck .tp-featured-foot span { color: #444444 !important; }
html[data-theme="light"] body.glass-home .hero-match-deck .tp-featured-foot span:last-child,
html[data-theme="light"] body .hero-match-deck .tp-featured-foot span:last-child { color: #666666 !important; }
body.glass-home .hero-match-deck .tp-vs,
body .hero-match-deck .tp-vs { color: #f2c230 !important; }
html[data-theme="light"] body.glass-home .hero-match-deck .tp-vs,
html[data-theme="light"] body .hero-match-deck .tp-vs { color: #181733 !important; }
body.glass-home .hero-match-deck .tp-featured-label,
body.glass-home .hero-match-deck .tp-featured-label-cup,
body .hero-match-deck .tp-featured-label,
body .hero-match-deck .tp-featured-label-cup { color: #f2c230 !important; }
html[data-theme="light"] body.glass-home .hero-match-deck .tp-featured-label,
html[data-theme="light"] body.glass-home .hero-match-deck .tp-featured-label-cup,
html[data-theme="light"] body .hero-match-deck .tp-featured-label,
html[data-theme="light"] body .hero-match-deck .tp-featured-label-cup { color: #154284 !important; }
body .hero-match-deck .glass-pill { border: none !important; box-shadow: none !important; }
/* No hover lift/shadow on hero cards either (club-design adds both). */
body.glass-home .hero-match-deck .hero-cup-card.tp-featured:hover,
body.glass-home .hero-match-deck .hero-club-card.tp-featured:hover,
body .hero-match-deck .tp-featured:hover {
  transform: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Hero ghost buttons: hero is dark in both modes, so white-on-translucent
   in both modes. No border, no inset outline ring in resting state. */
body .tp-hero .tp-btn-ghost,
body.glass-home .tp-hero .tp-btn-ghost {
  background: rgba(255, 255, 255, 0.14) !important;
  background-image: none !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}
/* Non-hero ghost buttons follow the page theme (light page = dark text). */
html[data-theme="light"] body .tp-btn-ghost:not(.tp-hero .tp-btn-ghost),
html[data-theme="light"] body.glass-home .tp-btn-ghost {
  background: rgba(24, 23, 51, 0.08) !important;
  background-image: none !important;
  color: #181733 !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body .tp-btn-ghost,
html[data-theme="dark"] body.glass-home .tp-btn-ghost {
  background: rgba(255, 255, 255, 0.12) !important;
  background-image: none !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}
/* The hero rule must win over the dark non-hero rule for hero buttons. */
html[data-theme="dark"] body .tp-hero .tp-btn-ghost,
html[data-theme="dark"] body.glass-home .tp-hero .tp-btn-ghost {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
/* The light non-hero rule above also matches hero buttons via the
   glass-home selector; re-assert the hero scheme for light mode. */
html[data-theme="light"] body .tp-hero .tp-btn-ghost,
html[data-theme="light"] body.glass-home .tp-hero .tp-btn-ghost {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

/* ---------- 4. Bracket board: ink text on cream, BOTH modes ----------
   Classic style ONLY (data-board-style="classic"). Other styles use
   their own theme variables from club-design.css; pinning them here
   would force every design back to cream cards and ink text. */
body .board-container[data-board-style="classic"] .board-world .box,
body .board-container[data-board-style="classic"] .board-world .box .t,
body .board-container[data-board-style="classic"] .board-world .box .s,
body .board-container[data-board-style="classic"] .board-world .box .bh,
body .board-container[data-board-style="classic"] .board-world .box .bh .lb,
body .board-container[data-board-style="classic"] .board-world .box .bh .dt,
body .board-container[data-board-style="classic"] .board-world .box .bh .tm,
body .board-container[data-board-style="classic"] .board-world .box .live-clock,
body .board-container[data-board-style="classic"] .board-world .final-card,
body .board-container[data-board-style="classic"] .board-world .final-card .t,
body .board-container[data-board-style="classic"] .board-world .final-card .s,
body .board-container[data-board-style="classic"] .board-world .final-card .bh,
body .board-container[data-board-style="classic"] .board-world .final-card .bh .lb,
body .board-container[data-board-style="classic"] .board-world .final-card .bh .dt,
body .board-container[data-board-style="classic"] .board-world .final-card .bh .tm {
  color: #14281e !important;
}
body .board-container[data-board-style="classic"] .board-world .box { background: #f7f3e8 !important; }
body .board-container[data-board-style="classic"] .board-world .board-col-header-item { color: #ffffff !important; }

/* ---------- 5. Filter/tab buttons: gold only ever with dark text ---------- */
body .tp-filter-btn.active,
body .glass-tabs button[aria-pressed="true"],
body .gallery-filters button[aria-pressed="true"] {
  background: #fdc52c !important;
  background-image: none !important;
  color: #181733 !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] body .tp-filter-btn:not(.active),
html[data-theme="light"] body .glass-tabs button[aria-pressed="false"],
html[data-theme="light"] body .gallery-filters button[aria-pressed="false"] {
  background: #ffffff !important;
  color: #181733 !important;
  border: 1px solid #ddd !important;
}
html[data-theme="dark"] body .tp-filter-btn:not(.active),
html[data-theme="dark"] body .glass-tabs button[aria-pressed="false"],
html[data-theme="dark"] body .gallery-filters button[aria-pressed="false"] {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border: none !important;
}

/* ---------- 6. Admin login box: navy canvas in dark, not pure black ---------- */
html[data-theme="dark"] body .login-box-card,
html[data-theme="dark"] body .login-box,
html[data-theme="dark"] body .login-modal-card {
  background: #181733 !important;
  color: #ffffff !important;
}

/* Events/Cups collapse button: horizontally centered in its block at
   every width (shrink-wrapped pill + auto margins; the block's h3/p
   headings stay left-aligned). Labels: View Details / Hide Details. */
.event-bracket-block .event-expand-btn {
  display: flex;
  width: fit-content;
  margin: 8px auto 12px;
}
