/* ================================================================
   Sticky header overrides - 2026-11-02 (requested by Lee)
   1) The club banner (car strips + logo) and the top site nav stay
      pinned to the top of the screen while the page scrolls.
   2) Logo shrunk ~32% and banner/nav tightened so the pinned
      header stays slim, especially on phones.
   3) The duplicate "Start here" member-doors grid is removed -
      the nav it repeated is now always on screen.
   4) The floating bottom nav bar is removed for the same reason.
   ================================================================ */

/* 1) Sticky header: banner + site nav + member bar stay on top */
.club-header {
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
}

/* 2) Slimmer banner + smaller logo (identity card 570px -> 390px) */
.club-banner {
  min-height: 0;
  padding: 12px 20px 30px;
}
.club-identity {
  width: min(390px, 100%);
  padding: 8px 12px 6px;
}

/* Tighter top nav rows and member bar inside the pinned header */
.site-nav button,
.nav-tree summary {
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.member-bar {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* 3) Remove the duplicate "Start here" member-doors grid */
.member-doors {
  display: none !important;
}

/* 4) Remove the floating bottom navigation bar */
.bottom-nav {
  display: none !important;
}

/* Slimmer still on narrow screens, so the pinned header
   does not eat the phone viewport */
@media (max-width: 699px) {
  .club-banner {
    padding: 8px 12px 27px;
    gap: 10px;
  }
  .club-identity {
    width: min(235px, 70%);
    padding: 6px 9px 5px;
  }
  .site-nav button,
  .nav-tree summary {
    min-height: 34px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .member-bar {
    padding: 5px 10px;
  }
}

/* ================================================================
   Nav dropdown contrast fix - 2026-11-02 (reported by Lee)
   The Sponsors / Events / Charities dropdowns (.nav-tree panels)
   are white, but in the Polished theme the general site-nav rule
   ([data-theme=polished] .site-nav button { color:#f2eee3 }) also
   matches the buttons INSIDE the dropdown and outranks the panel's
   own dark-text rule - pale cream text on a white panel, unreadable.
   Pin the dropdown items to dark text on the white panel in every
   theme. These selectors outrank the theme's nav rule, so this is
   the one root-cause fix for all nav dropdowns at once.
   ================================================================ */
.club-header .site-nav .nav-tree > div button {
  color: #111;
  background: #fff;
}
.club-header .site-nav .nav-tree > div .nested-nav-item {
  color: #555;
}
.club-header .site-nav .nav-tree > div button:hover,
.club-header .site-nav .nav-tree > div button:focus-visible {
  color: #111;
  background: #fff3ac;
}
[data-theme="polished"] .club-header .site-nav .nav-tree > div button:hover,
[data-theme="polished"] .club-header .site-nav .nav-tree > div button:focus-visible {
  color: #111;
  background: #f4edda;
}

/* ================================================================
   Sticky root-cause fix - 2026-11-02 (Lee, after testing himself)
   The app bundle sets .app-shell{overflow:hidden}. Any non-visible
   overflow turns an element into a scroll container. .app-shell
   never scrolls itself - the page scrolls inside
   [data-generated-space-root] - so the sticky header had no scroll
   range to travel in and rode away with the page. overflow:clip
   clips horizontally like hidden WITHOUT creating a scroll
   container, so the header now sticks against the real scroller.
   (This demo's banner carries no side photos next to the logo -
   logo card only - so the Valley side-photo fix does not apply.)
   ================================================================ */
.app-shell {
  overflow-x: clip;
  overflow-y: visible;
}

/* ================================================================
   Slim pinned header - 2026-11-02 (Lee: phone check, then laptop)
   The sticky fix worked, but the pinned header measured ~496px
   tall (public) / ~594px (signed in) on a 390px phone - and the
   same problem on Lee's laptop: the full photo header (658px at
   1280x900) eats most of a laptop screen while scrolling.
   Lee's ruling: the car photos may leave the pinned header
   entirely wherever space is tight; the full approved photo
   arrangement stays ONLY on large desktop monitors.
   So the pinned header is slim at every size EXCEPT a viewport
   at least 1800px wide AND 1100px tall (1440p/4K class), where
   the full photo banner pins as approved this morning.
   In the slim state the header is three single rows:
     1) banner = logo strip only: generation photo rows hidden,
        tagline + checker strip hidden, logo capped at 26px tall;
     2) nav = one horizontally swipeable row, every destination
        still reachable; dropdown panels are position:fixed at
        phone widths, so they still open full-width as before;
     3) member-bar = one swipeable row: status strong text and
        the session buttons (incl. Demo logins / Sign out) stay
        visible; small-print span and control labels hidden.
   ================================================================ */
@media (max-width: 1799px), (max-height: 1099px) {
  /* 1) Banner: logo strip only */
  .club-header .club-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    gap: 0;
    min-height: 0;
  }
  .club-header .club-banner::after {
    display: none;
  }
  .club-header .club-banner .generation-row {
    display: none;
  }
  .club-header .club-banner .club-identity {
    width: auto;
    max-width: 100%;
    padding: 3px 10px;
  }
  .club-header .club-identity > span {
    display: none;
  }
  .club-header .club-logo-scene {
    width: auto;
    height: 26px;
  }
  .club-header .club-logo-scene img.club-logo {
    height: 26px;
    width: auto;
  }

  /* 2) Nav: one swipeable row */
  .club-header .site-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 6px;
    gap: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .club-header .site-nav::-webkit-scrollbar {
    display: none;
  }
  .club-header .site-nav > button,
  .club-header .site-nav > .nav-tree {
    flex: 0 0 auto;
  }
  .club-header .site-nav button,
  .club-header .site-nav .nav-tree summary {
    min-height: 30px;
    padding: 2px 10px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* 3) Member bar: one swipeable row */
  .club-header .member-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 10px;
    gap: 10px;
    scrollbar-width: none;
  }
  .club-header .member-bar::-webkit-scrollbar {
    display: none;
  }
  .club-header .member-bar > div {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }
  .club-header .member-bar > div:first-child span {
    display: none;
  }
  .club-header .member-bar > div:first-child strong {
    white-space: nowrap;
    line-height: 1.25;
  }
  .club-header .member-session-actions {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  .club-header .member-bar .session-button {
    width: auto;
    min-height: 26px;
    padding: 3px 9px;
    white-space: nowrap;
  }
  .club-header .theme-flip-label {
    display: none;
  }
  .club-header .theme-flip button {
    min-height: 26px;
    padding: 3px 8px;
  }
  .club-header .role-picker {
    flex-wrap: nowrap;
  }
  .club-header .role-picker > span {
    display: none;
  }
  .club-header .role-picker select {
    min-height: 26px;
    min-width: 0;
  }
}

/* ================================================================
   Integrated pinned bar - 2026-11-02 (Lee, after living with the
   slim bar) Lee's verdict: at 26px the logo is too small to read.
   His redesign: ONE integrated pinned bar - the logo, bigger,
   sits all the way at the left of the SAME row as the nav links,
   and the separate centered logo-strip row is gone. The member
   bar keeps its own row underneath the bar. Applies only in the
   slim state below the 1800x1100 threshold; the full photo
   header up there is untouched.
   Laptop numbers: logo 80px tall in a ~100px bar row, whole
   pinned header ~130px with the member bar - inside Lee's
   130-150px band. Phones: 40px logo in the same integrated bar,
   nav behavior unchanged (one swipeable row).
   ================================================================ */
@media (max-width: 1799px), (max-height: 1099px) {
  /* The header becomes one flex bar: logo left, nav beside it,
     member bar wrapped to its own full-width row below. */
  .club-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .club-header .club-banner {
    order: 1;
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 6px 6px 6px 12px;
  }
  .club-header .club-banner .club-identity {
    padding: 4px 8px;
  }
  .club-header .club-logo-scene {
    height: 80px;
  }
  .club-header .club-logo-scene img.club-logo {
    height: 80px;
    width: auto;
  }
  .club-header .site-nav {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    align-self: center;
  }
  .club-header .member-bar {
    order: 3;
    flex: 1 0 100%;
  }
}

/* Phones: same integrated bar with a phone-sized logo. A width of
   699px or less can never coincide with the full-header state
   (1800px wide and up), so the approved desktop header is safe. */
@media (max-width: 699px) {
  .club-header .club-banner {
    padding: 4px 4px 4px 8px;
  }
  .club-header .club-banner .club-identity {
    padding: 3px 6px;
  }
  .club-header .club-logo-scene {
    height: 40px;
  }
  .club-header .club-logo-scene img.club-logo {
    height: 40px;
    width: auto;
  }
}

/* ================================================================
   Nav dropdown layering fix - 2026-11-02 (reported by Lee)
   In the slim pinned-header state .site-nav is a horizontal scroll
   container (overflow-x:auto, which forces overflow-y:hidden).
   At 700px and up the app bundle positions the Sponsors / Events /
   Charities panels (position:absolute; top:100%) INSIDE that
   scroller, so each panel is clipped to the ~30px nav row: it
   opened behind the member bar and the page content, and its
   items could not be clicked. (Phones escaped the bug: at 699px
   and down the bundle itself switches the panels to
   position:fixed, which no scroll container can clip.)
   Fix - the bundle's own phone trick, applied to the slim state:
   make the panels position:fixed with top/left/right auto, so a
   panel keeps its static position (directly under its summary,
   exactly where the absolute version was meant to land) but
   paints above the page and stays clickable. The 699px block
   then restores the bundle's full-width phone placement, so
   phone behavior is unchanged.
   ================================================================ */
@media (max-width: 1799px), (max-height: 1099px) {
  .club-header .site-nav .nav-tree > div {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
  }
}
@media (max-width: 699px) {
  .club-header .site-nav .nav-tree > div {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* ================================================================
   Bigger nav in the pinned bar - 2026-11-02 (Lee, ~15:54 MST)
   Lee: the integrated bar looks good, but make the navigation
   bigger - almost as tall as the logo, with a larger font.
   In the slim state the top-level nav links / dropdown summaries
   grow from 11px font / 30px tall to 18px font / 68px tall, so
   the nav strip fills most of the ~100px logo row (logo: 80px).
   The logo itself, the member bar, and the full photo header
   (1800px wide AND 1100px tall and up) are untouched. Dropdown
   panel items grow moderately too (16px) so the panels match
   the bar; the panels stay position:fixed exactly as the
   layering fix left them - only their anchor point moves down
   with the taller summary, still directly beneath it.
   ================================================================ */
@media (max-width: 1799px), (max-height: 1099px) {
  .club-header .site-nav {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .club-header .site-nav > button,
  .club-header .site-nav .nav-tree > summary {
    min-height: 68px;
    padding: 12px 16px;
    font-size: 18px;
    line-height: 1.3;
  }
  .club-header .site-nav .nav-tree > div button {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 16px;
  }
}

/* Phones: same idea at phone scale - nav links 15px in a 46px
   hit area beside the 40px logo, so the bar stays a small slice
   of a phone screen while the links get properly tappable. */
@media (max-width: 699px) {
  .club-header .site-nav > button,
  .club-header .site-nav .nav-tree > summary {
    min-height: 46px;
    padding: 8px 12px;
    font-size: 15px;
  }
  .club-header .site-nav .nav-tree > div button {
    min-height: 42px;
    padding: 9px 14px;
    font-size: 15px;
  }
}

/* ================================================================
   Dropdown arrow affordance - 2026-11-02 (Lee)
   The bundle's only dropdown indicator on the Sponsors /
   Events / Charities summaries is summary::after
   { content:" ▾"; font-size:9px } - a 9px small triangle that
   sits under the label and reads as a tiny dot, so members
   can't tell those items are dropdowns. Replace it with the
   full-size down triangle (▼) sized for each header state
   (14px beside the enlarged 18px nav text, 12px on phones,
   13px in the full photo header). The arrow inherits the
   summary's text color, so contrast holds in Classic and
   Polished, open and closed. line-height:1 pins the arrow's
   grid row to exactly its font size; small summary-padding
   offsets (the 1800px+ block below, a 0.3px trim on phones)
   compensate the arrow row's height change so the nav row -
   and every bar height - stays exactly as the nav
   enlargement set them.
   ================================================================ */
.club-header .site-nav .nav-tree > summary::after {
  content: " ▼";
  font-size: 13px;
  line-height: 1;
}
@media (max-width: 1799px), (max-height: 1099px) {
  .club-header .site-nav .nav-tree > summary::after {
    font-size: 14px;
  }
}
@media (max-width: 699px) {
  .club-header .site-nav .nav-tree > summary::after {
    font-size: 12px;
  }
  .club-header .site-nav .nav-tree > summary {
    padding-top: 7.7px;
  }
}
@media (min-width: 1800px) and (min-height: 1100px) {
  .club-header .site-nav .nav-tree > summary {
    padding-top: 6.25px;
    padding-bottom: 6.25px;
  }
}
