/*
 * What the chrome behavior needs to be true in CSS.
 *
 * Deliberately small. The look of the header belongs to the site's own design
 * system, pushed by Orca into the Elementor kit; this file only carries the
 * three states the script switches between, and it carries them with enough
 * force to survive whatever the theme has to say about position.
 */

/* Stands in for the header while it is out of flow, so the page does not jump
   up by a header's height at the moment it pins. */
.iw-header-space { height: 0; }

/* Element-agnostic: since 1.4.4 the pin target is the .site-header BAND, not
   the theme template wrapper - the top bar above it must scroll away.

   FIXED FROM THE FIRST PIXEL (rule chrome.header-fixed, Nick 2026-10-28).
   While the top bar is still on screen the header rides its bottom edge
   (--iw-pin-at, measured by chrome.js), then it sits at the top; the admin
   bar's offset wins when it is the lower of the two.

   NO will-change, NO transform, NO filter on the header itself. Each one is a
   CONTAINING BLOCK: any fixed-position descendant - the full-screen mobile
   nav overlay first among them - positions against the header's own box
   instead of the viewport, so `inset: 0` rendered the menu as a strip exactly
   one header tall ("navigation doesn't exist, really" - Nick, 30 Aug). The
   solid state's blur lives on a pseudo-element for the same reason. */
.iw-pinned {
  position: fixed !important;
  top: max(var(--iw-pin-top, 0px), var(--iw-pin-at, 0px)); left: 0; right: 0;
  z-index: 999;
}

/* The WordPress admin bar sits above everything for logged-in users, and a
   header pinned to zero hides under it. 32px, and 46px on a phone, are the two
   heights that bar has ever had. */
body.admin-bar .iw-pinned { --iw-pin-top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .iw-pinned { --iw-pin-top: 46px; }
}

/* SOLID WITH A BLUR ONCE SCROLLED (rule chrome.solid-once-scrolled). The kit
   paints the solid ground; this frosts whatever passes under it. On a pseudo
   element, never the header: a backdrop-filter on the header would trap the
   full-screen menu exactly as a transform did. */
.iw-pinned.iw-solid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* Anything the site sticks under the header reads this rather than a constant. */
:root { --iw-header-h: 0px; }

/* NO tel: ON A DESKTOP (rule chrome.no-desktop-tel). chrome.js takes the
   href off where the pointer is fine; what is left reads as text and selects
   as text, and nothing under it pretends to be a link. */
a.iw-tel-off, a.iw-tel-off:hover {
  cursor: text; -webkit-user-select: text; user-select: text;
  text-decoration: none;
}

/* ---- the mobile quick action bar --------------------------------------- */
/*
 * ON A PHONE THE PRIMARY ACTION LEAVES THE HEADER. A one-handed grip puts the
 * thumb at the bottom of the device; the top corners are the hardest region to
 * reach and the one most likely to need a hand shuffle. The single action the
 * site exists to get does not live there.
 *
 * The bar is BUILT FROM THE PAGE, never invented: the primary is the header's
 * own button, cloned, and the secondaries are the tel: and map links the site
 * already carries. No header button and no phone number means no bar.
 *
 * It reveals on the same 100px pass that compacts the header rather than being
 * present from the first frame, and it ignores scroll direction (rule
 * chrome.quick-bar-behavior) - chrome.js decides when; this file only draws
 * the two states.
 */
.iw-cta-bar {
  position: fixed; z-index: 55;
  left: 0; right: 0; bottom: 0;
  display: none;
  padding: 12px var(--gutter, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
  /* A SOLID SURFACE WITH A HAIRLINE, never a gradient fade (rule
     chrome.mobile-action-bar-solid). The fade let body copy show through the
     top half of the bar, so the buttons sat over half-legible text; a solid
     ground with a hairline reads as a deliberate piece of chrome. */
  background: var(--ground, #fff);
  border-top: 1px solid var(--hairline, rgba(0,0,0,.12));
  transform: translateY(110%);
  transition: transform .24s ease;
  pointer-events: none;
}
@media (max-width: 900px) { .iw-cta-bar { display: block; } }
.iw-cta-bar.iw-show { transform: translateY(0); pointer-events: auto; }

.iw-cta-row { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; align-items: stretch; }

/* THE BAR IS ACCENT ONLY - no brand color anywhere in it ("mobile action bar
   should only be accent color, no brand color. solid accent with white/text
   (best contrast) and outline/secondary button" - Nick, 30 Aug). The primary
   is the kit's SOLID button: accent fill, ink decided by contrast and
   published by the kit as --on-accent. The secondary is the OUTLINE button:
   accent border, accent text, ground fill. Both wear the kit's 2px border so
   the pair is the same two buttons the rest of the site uses.

   !important on the primary's colors, deliberately: it is a CLONE of the
   header's CTA and arrives wearing whatever button classes and theme-style
   colors the header gave it - which is exactly how a red bar shipped with
   brand-yellow text on it. */
.iw-cta-primary {
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 18px;
  border-radius: var(--radius, 6px);
  background: var(--accent, var(--chrome, #111)) !important;
  color: var(--on-accent, #fff) !important;
  border: 2px solid var(--accent, var(--chrome, #111)) !important;
  font-weight: 650; text-decoration: none; text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 8px 22px rgba(0,0,0,.08);
}
.iw-cta-primary:hover, .iw-cta-primary:focus-visible { color: var(--on-accent, #fff) !important; }

/* Secondaries are icon over label, fixed width - the outline half of the
   pair. A shortcut for somebody who already knows what they want, not a
   second offer, which is why they carry NO FILL (rule
   chrome.quick-bar-secondaries-quiet): transparent, so the bar's own ground
   is the only surface, and the accent outline is all that marks them. The
   primary keeps the full button and takes the rest of the row. */
.iw-quick {
  flex: 0 0 64px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  min-height: 46px; padding: 6px 2px; border-radius: var(--radius, 6px);
  background: transparent !important; border: 2px solid var(--accent, var(--ink, #222));
  color: var(--accent, var(--ink, #222)); text-decoration: none; box-shadow: none;
}
.iw-quick span { font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.iw-quick svg { width: 18px; height: 18px; color: currentColor; }

/* The header's own button is the thing that MOVED, so it is not also still up
   there. Hidden only where the bar exists, and only when one was built.
   THE MOVED WIDGET, NOT EVERY BUTTON WIDGET: chrome.js marks the wrapper
   whose anchor it cloned with .iw-cta-moved. The old blanket selector hid
   every button widget in the header, which was fine while the CTA was the
   only one - the commerce header's account door is a button widget too,
   and it vanished on every phone (found 9 Sep). */
@media (max-width: 900px) {
  body.iw-has-cta-bar .elementor-location-header .iw-cta-moved,
  body.iw-has-cta-bar .elementor-location-header .iw-header-cta { display: none !important; }
}

/* ---- no back to top ---------------------------------------------------- */
/* Nick 2026-10-28 (rule chrome.no-back-to-top): the header is always there,
   so a floating control that does what the logo does is one more thing over
   the text. chrome.js no longer makes one; a stale cached copy of the old
   script is hidden here so an update reaches every visitor at once. */
.iw-to-top { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .iw-cta-bar, body.iw-menu-panel .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}

/* A LONG EMAIL NEVER PUSHES THE PAGE SIDEWAYS (playbook §4b, rule
   chrome.mobile-menu-overrides). An address is one unbreakable word, and on a
   phone the footer's and the contact panel's run past the window edge; anywhere
   lets it fold where it must. The panel's <wbr> before the @ still picks the
   nicer fold while it fits. */
[class*="-foot-email"], [class*="-foot-addr"], [class*="-fact"] b {
  overflow-wrap: anywhere;
}

/* ---- the mobile navigation --------------------------------------------- */
/*
 * BELOW 900px THE INLINE NAVIGATION BECOMES A FULL SCREEN OVERLAY, NOT A
 * DRAWER. A drawer has to decide how wide it is and then justify the strip of
 * dimmed page beside it; an overlay has one job and does it at any screen size.
 * Links are set large and spaced, because the thing being tapped is a thumb
 * rather than a line of text.
 *
 * THE CALL TO ACTION DOES NOT GO IN HERE. It is in the quick action bar, where
 * it needs no gesture first. Burying the one action the site exists to get
 * behind a tap is the most expensive mistake in a mobile header.
 *
 * Scoped to body.iw-menu-panel, which chrome.js sets only when it found a real
 * panel to take over.
 *
 * THE PANEL IS THE CONTAINER, NEVER A SUBMENU (Bennies, 3 Dec 2026). Elementor
 * gives every submenu <ul> the same .elementor-nav-menu--dropdown class as the
 * phone panel <nav>, so a rule on that class alone turned each submenu into a
 * second full-screen layer and its display:flex !important held every submenu
 * open. Every panel rule here names .elementor-nav-menu__container.
 */
@media (max-width: 900px) {
  body.iw-menu-panel .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    position: fixed !important;
    inset: 0 !important;
    /* ABOVE ELEMENTOR'S STRETCH LAYER, BELOW THE TRIGGER. A stretched nav
       menu gets z-index 9997 from Elementor at (0,3,0), which beat a plain
       60 here and put the panel over the X that closes it. */
    z-index: 9998 !important;
    width: auto !important; max-width: none !important;
    display: flex !important; flex-direction: column; justify-content: center;
    padding: var(--gutter, 24px);
    background: var(--dark, #14110f);
    overflow-y: auto;
    /* HIDDEN WITH VISIBILITY, NEVER display: none (rule
       chrome.mobile-nav-overlay). Hidden this way the closed panel's links
       leave the tab order and the accessibility tree, and the panel can still
       fade; Elementor's own scaleY/max-height collapse is switched off so the
       one state that shows it is body.iw-menu-open, which chrome.js keeps. */
    transform: none !important; max-height: none !important;
    visibility: hidden; opacity: 0;
    transition: opacity .2s ease, visibility 0s linear .2s;
  }
  body.iw-menu-panel.iw-menu-open .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    visibility: visible; opacity: 1; transition-delay: 0s;
  }
  /* SUBMENUS FOLD, A TAP OPENS ONE (Bennies, 3 Dec 2026). Inside the panel a
     submenu sits in the flow under its parent. SmartMenus calls a menu
     collapsible when its first submenu is position: static, and then shows
     and hides it itself: the first tap on "About" opens its list, a second
     tap follows the link. Nothing here sets display, so it stays SmartMenus'
     call. */
  body.iw-menu-panel .elementor-nav-menu__container.elementor-nav-menu--dropdown .sub-menu {
    position: static !important; inset: auto !important;
    width: auto !important; min-width: 0 !important; max-width: none !important;
    margin: 0 !important; transform: none !important;
    box-shadow: none !important; background: transparent !important;
  }
  body.iw-menu-panel .elementor-nav-menu__container.elementor-nav-menu--dropdown .sub-menu a {
    font-size: clamp(18px, 4.8vw, 26px); padding-left: 1em !important;
  }
  /* 44px, HEIGHT AND WIDTH (rule a11y.tap-target-44). Elementor sizes its
     toggle from the icon plus a quarter-em of padding - about 32px - and the
     trigger is the one control every phone visitor needs. The chrome's
     account icons are drawn at 15px in the top bar; the TARGET grows around
     them, the glyph does not. A button keeps its padding and gains a floor:
     height is what a thumb finds. */
  .elementor-location-header .elementor-menu-toggle,
  .elementor-social-icon {
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .elementor-widget-button .elementor-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .elementor-location-header [class*="-account-slot"] .elementor-button { min-width: 44px; }
  form[data-qf] button { min-height: 44px; }
  /* !important AND A STEP UP (playbook §4b, rule chrome.mobile-menu-overrides).
     The kit's compact and over-photo header rules color `.site-header .nav a`
     with !important at (0,3,1), and the panel's links are inside .nav - so
     once the reader had scrolled, a (0,2,2) rule lost and the panel showed
     ink links on the dark overlay. This one is (0,4,2).
     WHITE ONLY ON A DARK PANEL (Bennies, 3 Dec 2026). A kit may paint the
     panel light (Bennies' is butter); chrome.js reads the panel's ground and
     sets body.iw-menu-light, and then these white rules stand down. */
  body.iw-menu-panel:not(.iw-menu-light) .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item,
  body.iw-menu-panel:not(.iw-menu-light) .elementor-nav-menu--dropdown a {
    color: #fff !important;
  }
  body.iw-menu-panel .elementor-nav-menu--dropdown a {
    font-size: clamp(22px, 6vw, 34px); font-weight: 650;
    padding: 10px 0 !important; border: 0 !important;
    background: none !important;
  }
  body.iw-menu-panel:not(.iw-menu-light) .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item:hover,
  body.iw-menu-panel:not(.iw-menu-light) .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item:focus-visible,
  body.iw-menu-panel:not(.iw-menu-light) .elementor-nav-menu--dropdown a:hover,
  body.iw-menu-panel:not(.iw-menu-light) .elementor-nav-menu--dropdown a:focus-visible {
    color: var(--accent, #fff) !important;
  }
  /* On a light panel the links are the site's ink. Three classes and three
     elements: over the widget's own link color (which assumed Elementor's
     dark panel) and over a kit's plain base color, while a kit's :hover and
     active colors, a step higher, still show. */
  body.iw-menu-panel.iw-menu-light nav.elementor-nav-menu--dropdown a {
    color: var(--ink, #14110f) !important;
  }
  /* THE TOGGLE SITS ABOVE THE PANEL IT OPENED, so it is still the way out:
     one step over the panel's 9998, and in the panel's own ink so the X shows
     on either ground (the widget's dark icon fill vanished on the dark panel,
     white vanished on a light one). */
  body.iw-menu-open .elementor-location-header .elementor-menu-toggle {
    position: relative; z-index: 9999 !important; color: #fff !important;
  }
  body.iw-menu-open.iw-menu-light .elementor-location-header .elementor-menu-toggle {
    color: var(--ink, #14110f) !important;
  }
  body.iw-menu-open .elementor-location-header .elementor-menu-toggle svg {
    fill: currentColor !important;
  }
}

/* ---- the pinned header and the sticky category strip ------------------- */
/*
 * TWO PIECES OF CHROME, ONE TOP EDGE. Orca's jump strip sticks to
 * top: var(--chrome-h) and this plugin pins the header with position: fixed -
 * two systems that had never heard of each other, so on Bennie's menu page
 * they both took the top of the viewport and interleaved into one unreadable
 * bar. The header's owner (this file) publishes its height as --iw-header-h;
 * the strip reads it here, whatever project prefix its class carries.
 *
 * THE OFFSET TRACKS THE HEADER'S VISIBLE HEIGHT, LIVE (Nick, 30 Aug). The
 * header is fixed from the first pixel now (rule chrome.header-fixed), so
 * the strip sits under it; where it never pins (an embed that owns the
 * viewport) the strip rides at top: 0.
 *
 * --iw-header-vis is this plugin's live answer; --chrome-h is Orca's probe
 * and only the fallback for pages where this script never ran.
 */
[class*="-nav-strip"][class*="-stick"] {
  top: var(--iw-header-vis, var(--chrome-h, 0px)) !important;
  transition: top .24s ease;
}
@media (prefers-reduced-motion: reduce) {
  [class*="-nav-strip"][class*="-stick"] { transition: none; }
}

/* ---- the hero video on an iPhone (rule media.hero-video-poster) --------- */
/* Never Safari's play button over the hero: the poster and the band's own
   photograph underneath are the fallback, and a refused play() hides the
   video layer so the photograph shows (chrome.js heroVideo). */
.elementor-background-video-container video::-webkit-media-controls-start-playback-button,
.elementor-background-video-container video::-webkit-media-controls { display: none !important; -webkit-appearance: none; }
.elementor-background-video-container.iw-video-off { display: none !important; }
