/* ==========================================================================
   SENTRYSITE Corporate – base.css (chassis mechanics)

   This sheet makes the markup work: hidden panels, focus, skip link,
   screen-reader text, icon sizing, menu list resets. It carries no colours,
   fonts or spacing of a design. Restyle a site in main.css, not here.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body { margin: 0; min-height: 100vh; }

img, svg, video { max-width: 100%; height: auto; display: block; }

img[width][height] { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

/* ---------- accessibility ---------- */

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px; inset-inline-start: 8px;
  width: auto; height: auto;
  margin: 0; padding: 12px 20px;
  clip: auto; clip-path: none;
  white-space: normal;
  z-index: 100000;
  background: #fff; color: #000;
  border-radius: 999px;
  text-decoration: none;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Focus is always visible. Sites restyle the colour, never remove it. */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

[inert] { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- icons ---------- */

.icon {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  flex: none;
  overflow: visible;
}

/* ---------- menus ---------- */

.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }

.menu li { position: relative; }

.submenu-toggle {
  background: none; border: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
}

/* Physical borders on purpose: logical ones flip the caret in RTL. */
.submenu-toggle__icon {
  width: 0.55em; height: 0.55em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 200ms;
}

.show-childrens > .submenu-toggle .submenu-toggle__icon { transform: rotate(225deg); }

/* Mobile sub-menus stay closed until toggled. */
.mobile-menu li.menu-item-has-children > .sub-menu { display: none; }
.mobile-menu li.menu-item-has-children.show-childrens > .sub-menu { display: block; }

/* ---------- panels toggled by theme.js ---------- */

.mobile-menu[aria-hidden="true"],
.search-panel[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu[aria-hidden="false"],
.search-panel[aria-hidden="false"] {
  visibility: visible;
}

body.page-is-open { overflow: hidden; }

/* ---------- widgets ---------- */

.widget > ul, .widget > ol { list-style: none; margin: 0; padding: 0; }

/* ---------- misc ---------- */

.mobile-menu-btn__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.mobile-menu-btn__bars span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform 200ms, opacity 200ms; }
.mobile-menu-btn.open .mobile-menu-btn__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mobile-menu-btn.open .mobile-menu-btn__bars span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open .mobile-menu-btn__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- bar layout (structure only, no design) ---------- */

.header-top-bar, .header-middle-bar, .header-bottom-bar, .header-mobile,
.footer-top, .footer-middle, .footer-bottom { display: flex; flex-wrap: wrap; align-items: center; }
.header-third, .footer-half, .footer-quarter, .footer-third { flex: 1 1 0; min-width: 0; }
.footer-quarter { flex-basis: 25%; }
.footer-half { flex-basis: 50%; }
.header-middle-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.header-third { display: flex; align-items: center; gap: 8px; }
.header-middle-right { justify-content: flex-start; }
.header-middle-middle { justify-content: center; }
.header-middle-left { justify-content: flex-end; }
.header-mobile { display: none; justify-content: space-between; }
#masthead .widget, #colophon .widget { margin: 0; }
#masthead .widget-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Stacking inside #masthead. Keep this order or the hamburger ends up under the panel. */
#masthead { position: relative; z-index: 50; }
.header-top-bar, .header-mobile { position: relative; z-index: 3; }
.search-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 4; }
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;      /* physical: the panel always enters from the right */
  z-index: 1;
  width: min(440px, 100%);
  overflow-y: auto;
  background: #fff;                 /* neutral; the site sheet restyles it */
  transform: translateX(100%);
  transition: transform 300ms, visibility 0s 300ms;
}
.mobile-menu[aria-hidden="false"] { transform: none; transition-delay: 0s; }
.mobile-menu li.menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
.mobile-menu li.menu-item-has-children > a { flex: 1; }
.mobile-menu li.menu-item-has-children > .sub-menu { flex-basis: 100%; }

@media screen and (max-width: 1250px) {
  .header-middle-bar { display: none; }
  .header-mobile { display: flex; }
}

/* ---------- minimal chrome (checkout and other focused pages) ---------- */
.header-minimal { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.header-minimal .widget { margin: 0; }
.footer-minimal { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
