/* The EZPZ site header (frontend/templates/theme3/elements/header.html) on the EZRA pages only: the first of the
 * two slim header rows (the EZRA sub-nav, partials/_header.html, is the second). Linked by
 * partials/_site_assets.html after the site's CSS and before css/ezra-brand.css, on the /ezra/ pages (base.html)
 * and the EZRA docs (docs/base_ezra.html); both put class ezp-body on <body>.
 *
 * Every rule sits under .ezp-body, so nothing here can reach another page (test_assets.py parses this file).
 * The header keeps its own markup, menus, phone drawer and script; this only restyles them. Its own <style> comes
 * later in the page (it is inside <body>) and uses !important on some properties: .ezp-body adds a class of
 * specificity, and !important is used only where the header's own rule has it.
 * Colours and timing are the --ezp-bar-* tokens on .ezp-body (css/ezra-brand.css): the site header sits outside
 * every .ezra-root, so it has none of EZRA's tokens. Dark on every EZRA page, like the sub-nav.
 * No width media queries: the header's own breakpoints (the drawer up to 1060px, the tighter nav up to 1160 and
 * 1280px) still apply, and the link size follows the viewport with clamp().
 *
 * The row: 60px, the EZRA background, a hairline under it, no shimmer or shadow; a smaller logo; muted 14px
 * links with the current section ("EZPZ AI" on /ezra/) in full text colour and no underline; Dashboard / Upgrade
 * (and Sign Up) as an outline button; the OG crown as a small badge inside the avatar's box, no glow ring.
 * On scroll (public/shell.js, .ezp-site-hidden on <html>) the row slides up out of view by transform only. It is
 * never hidden while one of its menus is open, so the drawer and the panels (position: fixed inside it, which a
 * transform would trap) never see the transform. */

/* ── Geometry: a 60px bar at every width (the drawer's 3.75rem already is). --ez-h is the header's bar height on
 *    :root, its panels open at top: var(--ez-h), and css/ezra-brand.css reads it for --ezp-site-h. ── */
:root:has(> body.ezp-body) { --ez-h: 60px; }

/* ── The bar ── */
.ezp-body .site-header .sticky-header .main-bar {
  background: var(--ezp-bar-solid) !important;
  border-bottom: 1px solid var(--ezp-bar-line) !important;
  box-shadow: none !important;
}
.ezp-body .site-header .main-bar::before { display: none; }   /* the animated shimmer along the top */
.ezp-body .ez-bar-inner { padding-top: 0; padding-bottom: 0; }
.ezp-body .ez-logo img { height: 32px; width: auto; }

/* ── Links: muted, the current section in full text colour, no underline ── */
.ezp-body .ez-menu > li > a {
  font-size: clamp(13px, 1.2vw, 14px); letter-spacing: 0; text-shadow: none;
  color: var(--ezp-bar-muted) !important;
  border-bottom-color: transparent;
}
.ezp-body .ez-menu > li > a:hover,
.ezp-body .ez-menu > li.ez-open > a,
.ezp-body .ez-menu > li.ez-active > a {
  color: var(--ezp-bar-bright) !important;
  border-bottom-color: transparent;
}
.ezp-body .ez-menu > li.ez-active > a { font-weight: 600; }   /* the current section: not by colour alone */
.ezp-body .ez-nav-ai-icon { display: none !important; }

/* ── Dashboard / Upgrade (Sign Up when signed out): an outline button; Login: a quiet text link beside it.
 *    The one filled button on the page head is the sub-nav's Open EZRA / Try EZRA free. ── */
.ezp-body .ez-cta .ez-btn-primary {
  height: 34px; padding: 0 14px;
  background: transparent; border: 1px solid var(--ezp-bar-line2); box-shadow: none;
  color: var(--ezp-bar-text) !important;
  font-size: 14px; font-weight: 600; letter-spacing: 0;
}
.ezp-body .ez-cta .ez-btn-primary::before { display: none; }
.ezp-body .ez-cta .ez-btn-primary:hover {
  transform: none; box-shadow: none;
  background: var(--ezp-bar-hover); border-color: var(--ezp-bar-accent);
  color: var(--ezp-bar-bright) !important;
}
.ezp-body .ez-cta .ez-btn-outline {
  height: 34px; padding: 0 10px;
  background: transparent; border-color: transparent;
  color: var(--ezp-bar-muted) !important;
  font-size: 14px; letter-spacing: 0;
}
.ezp-body .ez-cta .ez-btn-outline:hover {
  background: var(--ezp-bar-hover); border-color: transparent; box-shadow: none;
  color: var(--ezp-bar-bright) !important;
}
.ezp-body .ez-cta .ez-btn-primary:focus-visible,
.ezp-body .ez-cta .ez-btn-outline:focus-visible { outline: 2px solid var(--ezp-bar-ring); outline-offset: 2px; }

/* ── Account: a 32px avatar; the OG crown a small badge on its corner, inside the bar, no glow ring ── */
.ezp-body .ez-account-btn { width: 32px; height: 32px; border-color: var(--ezp-bar-line2); }
.ezp-body .ez-account-btn:has(.ez-og-crown) { box-shadow: none; }
.ezp-body .ez-account-btn:hover,
.ezp-body .ez-account.open .ez-account-btn { border-color: var(--ezp-bar-accent); box-shadow: 0 0 0 3px var(--ezp-bar-hover); }
.ezp-body .ez-og-crown {
  top: -3px; right: -3px; left: auto;
  width: 15px; height: 15px; padding: 2px;
  border-radius: 50%; background: var(--ezp-bar-solid); box-shadow: 0 0 0 1px var(--ezp-bar-line2);
  transform: none; filter: none;
}

/* ── Scroll: the row slides up out of view (public/shell.js); the sub-nav slides with it (css/ezra-public.css) ── */
.ezp-site-hidden .ezp-body .site-header { transform: translateY(-100%); }
@media (prefers-reduced-motion: no-preference) {
  .ezp-body .site-header { transition: transform var(--ezp-bar-dur) var(--ezp-bar-ease); }
}
