/* Shared base styles for every Grippd page.
   Loaded before each page's inline <style>, so page-specific rules
   still override anything here. Keep page-only styles inline. */

/* ===== Reset ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

/* ===== Design tokens =====
   Palette taken from the facility's own site, grippedfitness.com: the orange
   accent, the amber, the warm grey bar and the near-white page are its theme
   colours, matched by value. The names are the ones the NAC codebase uses and
   are deliberately left alone -- --green holds the orange, --navy the dark
   ink. Renaming them would touch ~1300 usages across every page and conflict
   on every upstream merge forever, for no visual gain. */
:root{
  /* Dark ink: headings, table headers, card titles. 261 of the --navy uses are
     text, so this has to stay near-black -- 12.56:1 on white, matching the
     13.19:1 the old navy gave. The nav BAR is --nav-bg below, not this. */
  --navy:#33342e;--navy-dark:#232420;
  /* The Gripped accent, exact. --green-dark is the darkened step used for link
     text and button hover, where white-on-orange has to clear AA (5.01:1). */
  --green:#ff6600;--green-dark:#c24700;
  /* The nav/section bar, exact from grippedfitness.com. Lighter than the old
     navy, which is why the current-page indicator is amber rather than orange:
     #ff6600 on this grey is 2.03:1, under even the 3:1 non-text floor. */
  --nav-bg:#63645e;
  /* DUPR's own brand blue, for anything representing DUPR rather than Grippd.
     Their headline blue (#3a79e0) only reaches 4.21:1 against white text, so
     this is their next step down (brand-600) at 5.73:1, which clears WCAG AA. */
  --dupr:#2b63c2;--dupr-soft:rgba(43,99,194,.4);
  --blue:#1a4b84;--blue-dark:#143a66;
  --gold:#ffb300;--gold-dark:#96660a;
  --white:#ffffff;--off-white:#f0f4f8;
  --surface:#eef1f4;--surface2:#dfe4ea;
  --text:#33342e;--muted:#6b6c64;--border:rgba(51,52,46,0.14);
  --danger:#d93b3b;
  --font-display:'Barlow Condensed',sans-serif;
  --font-body:'Barlow',sans-serif;
  --radius:8px;--radius-lg:12px;
}

/* ===== Base ===== */
body{background:var(--off-white);color:var(--text);font-family:var(--font-body);font-size:15px;line-height:1.6;min-height:100vh;-webkit-text-size-adjust:100%}

/* ===== Navigation bar ===== */
nav{background:var(--nav-bg);padding:0 max(1.5rem,env(safe-area-inset-right)) 0 max(1.5rem,env(safe-area-inset-left));display:flex;align-items:center;flex-wrap:wrap;position:sticky;top:0;z-index:100;border-bottom:3px solid var(--green)}
.nav-brand{display:flex;align-items:center;gap:12px;padding:.65rem 0;margin-right:1.2rem;text-decoration:none}
.nav-logo{height:44px;width:auto}
.nav-actions{display:flex;align-items:center;flex-wrap:wrap}
.nav-right{display:flex;align-items:center;flex-wrap:wrap;margin-left:auto}
.nav-link{padding:1rem .95rem;font-family:var(--font-display);font-size:14px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:rgba(255,255,255,.75);text-decoration:none;border-bottom:3px solid transparent;transition:all .15s;white-space:nowrap;cursor:pointer}
.nav-link:hover{color:#fff}
.nav-link.current{color:#fff;border-bottom-color:var(--gold)}
.nav-btn{font-family:var(--font-display);font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;padding:7px 14px;border-radius:var(--radius);cursor:pointer;text-decoration:none;transition:all .12s;border:1.5px solid transparent;white-space:nowrap}
.nav-btn-ghost{color:#fff;border-color:rgba(255,255,255,.4)}
.nav-btn-ghost:hover{border-color:#fff;background:rgba(255,255,255,.1)}
.nav-btn-ghost.current{border-color:var(--gold);color:#fff}
.nav-btn-solid{background:var(--green);color:#fff;border-color:var(--green)}
.nav-btn-solid:hover{background:var(--green-dark);border-color:var(--green-dark)}
.nav-greeting{color:rgba(255,255,255,.85);font-size:14px;font-weight:600;margin-right:1rem}

/* ===== Spinner / toast ===== */
@keyframes spin{to{transform:rotate(360deg)}}
.toast{position:fixed;bottom:1.5rem;right:1.5rem;background:var(--navy);color:var(--white);padding:10px 20px;border-radius:var(--radius);font-family:var(--font-display);font-weight:700;font-size:14px;text-transform:uppercase;letter-spacing:.5px;transform:translateY(80px);opacity:0;transition:all .25s;z-index:9999;pointer-events:none;border-left:4px solid var(--green)}
.toast.show{transform:translateY(0);opacity:1}

/* ── Mobile nav ───────────────────────────────────────────────────────────
   One copy for every page. These rules used to be pasted into each page's
   inline <style>, where they drifted into ten different variants. admin-nav.js
   still enforces the critical parts at runtime; keeping them in a real
   stylesheet means they are also right before that script loads. */
@media(max-width:768px){
  nav{justify-content:flex-start;flex-wrap:nowrap}
  .nav-brand{width:auto;display:flex;justify-content:flex-start;margin:0 auto 0 0;padding:.5rem 0;flex:0 1 auto}
  .nav-logo{height:64px}
  .nav-actions:empty{display:none}
  .nav-actions,.nav-right,[data-account-nav]{display:flex;width:100%;margin-left:0;justify-content:center;flex-wrap:wrap}
  .nav-link{flex:0 1 auto;padding:.7rem .6rem;font-size:13px;text-align:center;white-space:nowrap}
  [data-account-nav] a{padding:.7rem .6rem!important;font-size:13px!important;text-align:center}
  /* league / bracket / doubles-playoff / player carry an in-page tab bar */
  .back-btn{display:none}
  .nav-tabs{width:100%;border-top:1px solid rgba(255,255,255,.08);overflow-x:auto;scrollbar-width:none}
  .nav-tabs::-webkit-scrollbar{display:none}
  .nav-tab{flex:1;padding:.7rem .5rem;font-size:13px;text-align:center;min-width:70px}
}
@media(max-width:400px){
  .nav-link,[data-account-nav] a{font-size:11px!important;padding:.6rem .4rem!important}
  .nav-tab{font-size:11px;padding:.65rem .35rem}
}


/* Deployments with NAC_FEATURES.dupr = false. config.js stamps <html> and
   every DUPR-only element disappears, so a facility with no DUPR partnership
   never sees a control it cannot use. */
.no-dupr .dupr-only { display: none !important; }

/* Admin-controlled feature switches. config.js stamps these on <html> from
   <head>, so a disabled feature is hidden before it can paint. Each flag hides
   markup carrying its -only class; nav links are filtered in admin-nav.js
   instead, because removing them keeps the bar from reflowing. */
.no-tournaments .tournaments-only { display: none !important; }
.no-rules .rules-only { display: none !important; }
.no-signup-membership .signup-membership-only { display: none !important; }
.no-partner-list .partner-list-only { display: none !important; }

/* The DUPR-named classes already in use across the pages. Sweeping them here
   means a page that grows a new DUPR control inherits the behaviour by naming
   convention rather than needing another edit. */
.no-dupr .dupr-chip,
.no-dupr .dupr-pill,
.no-dupr .dupr-mini,
.no-dupr .dupr-link,
.no-dupr .dupr-status,
.no-dupr .dupr-id-badge,
.no-dupr .dupr-iframe-wrap,
.no-dupr .profile-dupr,
.no-dupr .profile-dupr-note,
.no-dupr .profile-dupr-loading { display: none !important; }
