/* Shared primary action colour for the local header and page content. */
:root { --pick-action-fill: #9ce0d4; }
.theme-white { --pick-action-fill: #10675e; }
#siteHeader .header-pick-btn {
  background: var(--pick-action-fill);
  color: var(--bg) !important; /* The mobile header sets an explicit text colour. */
  border-color: transparent;
  border-radius: 8px;
  font-weight: 650;
}
#siteHeader .header-pick-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
#siteHeader {
  position: sticky;
  top: 0;
}
#siteHeader .header-topnote { max-height: none; }
#siteHeader .header-topnote-inner { padding-block: 3px !important; }
#siteHeader .header-topnote-text { font-size: 12px; line-height: 1.3; }
#siteHeader .header-inner { padding-block: 4px !important; min-height: 0 !important; }
@media (min-width: 1241px) {
  #siteHeader .brand .logo, #siteHeader .brand .logo img {
    flex: none;
    width: 96px !important;
    height: 66px !important;
    object-fit: contain !important;
  }
  #siteHeader .header-inner { gap: 8px; }
  #siteHeader .nav { gap: 2px; }
  #siteHeader .nav a, #siteHeader .nav-dd-trigger { padding: 6px 8px; }
  #siteHeader .header-actions { gap: 6px; }
  #siteHeader .header-actions .btn.sm { padding: 7px 10px; }
}
#siteHeader #mobileNav[data-open="0"] { display: none; }
@media (max-width: 1240px) {
  #siteHeader .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto auto auto 46px !important;
    grid-template-areas: "brand menu phone pick theme" !important;
    align-items: center; gap: 8px !important; padding: 6px 12px !important;
  }
  #siteHeader .header-actions { display: contents !important; }
  #siteHeader .header-inner > .nav, #siteHeader .header-topnote { display: none !important; }
  #siteHeader .header-inner > .brand { grid-area: brand; display: flex !important; min-width: 0; }
  #siteHeader .brand .logo, #siteHeader .brand .logo img {
    display: block !important; width: 74px !important; height: 51px !important; object-fit: contain !important;
  }
  #siteHeader .header-actions :is(.mobile-toggle[data-mm-mobile-toggle],.header-phone-btn,.header-pick-btn) {
    width: auto !important; min-width: 0 !important; max-width: none !important;
    height: 46px !important; min-height: 46px !important; border-radius: 10px !important;
    padding: 0 12px !important; font-size: 1rem !important; white-space: nowrap;
  }
  #siteHeader #mobileToggle { background: var(--card); color: var(--text) !important; }
  #siteHeader #mobileToggle .mobile-toggle-text { font-size: 1.0625rem !important; color: inherit !important; gap: 9px; }
  #siteHeader .mobile-toggle-text::before {
    content: ""; flex: none; width: 17px; height: 12px; box-sizing: border-box;
    border-block: 2px solid currentColor; background: linear-gradient(currentColor,currentColor) center / 100% 2px no-repeat;
  }
  #siteHeader #mobileToggle[aria-expanded="true"] { border-color: var(--pick-action-fill); color: var(--pick-action-fill) !important; }
  #siteHeader #mobileNav {
    position: absolute !important; top: 100% !important; inset-inline: 8px !important;
    box-sizing: border-box; width: auto !important; max-width: 640px; height: auto !important;
    max-height: calc(100dvh - 100% - 8px) !important; overflow: auto; overscroll-behavior: contain;
    margin: 3px auto 0 !important; padding: 6px 16px max(12px, env(safe-area-inset-bottom)) !important;
    background: var(--card) !important; color: var(--text); border: 1px solid var(--line) !important;
    border-radius: 15px !important; box-shadow: 0 12px 32px #0003 !important;
  }
  #siteHeader #mobileNav .mobile-sections > * + * { border-top: 1px solid var(--line) !important; }
  #siteHeader #mobileNav .mobile-sections > :first-child { border-top: 0 !important; }
  #siteHeader #mobileNav .mobile-sections > a, #siteHeader #mobileNav button.macc-toggle {
    display: flex !important; align-items: center; justify-content: space-between !important;
    box-sizing: border-box; width: 100% !important; max-width: none !important;
    margin: 0 !important; min-height: 54px !important; height: auto !important; padding: 10px 8px !important;
    color: var(--text) !important; background: transparent !important;
    border-inline: 0 !important; border-bottom: 0 !important; border-radius: 0 !important;
    font-family: inherit; font-weight: 600;
    font-size: 1.1875rem !important; line-height: 1.35; text-decoration: none; text-align: start;
  }
  #siteHeader #mobileNav button.macc-toggle { border: 0 !important; box-shadow: none !important; cursor: pointer; }
  #siteHeader #mobileNav .menu-angle {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
    background: color-mix(in srgb,var(--pick-action-fill) 10%,var(--card)); color: var(--pick-action-fill);
  }
  #siteHeader #mobileNav .menu-angle::after {
    content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
  }
  #siteHeader #mobileNav [aria-expanded="true"] .menu-angle::after { transform: translateY(2px) rotate(225deg); }
  #siteHeader #mobileNav .mobile-submenu { display: none; }
  #siteHeader #mobileNav .macc.open .mobile-submenu {
    display: grid; padding: 4px 12px; margin: 0 0 8px 8px; border-inline-start: 2px solid var(--pick-action-fill);
    background: color-mix(in srgb,var(--pick-action-fill) 5%,var(--card)); border-radius: 0 8px 8px 0;
  }
  #siteHeader #maccBrands.open .mobile-submenu { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #siteHeader #maccBrands .mobile-submenu a:first-child { grid-column: 1/-1; }
  #siteHeader #mobileNav .mobile-submenu a {
    display: flex; align-items: center; min-height: 46px; margin: 0 !important; padding: 6px 4px !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important; font-size: 1.0625rem; color: var(--text); text-decoration: none;
  }
  #siteHeader #mobileNav .mobile-sections a[aria-current="page"] {
    color: var(--pick-action-fill) !important; font-weight: 700;
    box-shadow: inset 3px 0 var(--pick-action-fill); padding-inline-start: 12px !important;
  }
  #siteHeader #mobileNav :is(a,button):focus-visible { outline: 2px solid var(--pick-action-fill); outline-offset: -2px; }
}
@media (max-width: 699px) {
  #siteHeader .header-inner {
    grid-template-columns: minmax(0,1fr) clamp(84px,23vw,115px) 44px !important;
    grid-template-areas: "brand menu theme" "phone pick pick" !important;
    gap: 4px 8px !important;
    padding: 8px clamp(10px,3.5vw,22px) !important;
  }
  #siteHeader .header-inner > .brand {
    justify-self: stretch; align-items: center; gap: 5px !important; min-height: 44px; max-width: 100%;
  }
  #siteHeader .brand .logo, #siteHeader .brand .logo img {
    width: clamp(40px,12vw,62px) !important; min-width: 0 !important; height: 44px !important; min-height: 0 !important; flex: none;
  }
  #siteHeader .brand > span:not(.logo) {
    display: block !important; min-width: 0;
  }
  #siteHeader .brand > span > strong {
    display: block !important; white-space: normal !important; text-overflow: clip !important;
    font-size: clamp(13px,3.7vw,17px) !important; line-height: 1.08; color: var(--text);
  }
  #siteHeader .brand > span > span { display: none !important; }
  #siteHeader .header-actions #mobileToggle[data-mm-mobile-toggle] {
    justify-self: stretch; height: 44px !important; min-height: 44px !important;
    padding-inline: 5px !important; background: transparent !important; border-color: transparent !important;
  }
  #siteHeader #mobileToggle .mobile-toggle-text { gap: 6px; font-size: 1rem !important; }
  #siteHeader .header-actions a.btn.header-phone-btn {
    justify-self: start; font-size: clamp(1.03125rem,4.7vw,1.1875rem) !important;
    padding-inline: 0 !important; background: transparent; border-color: transparent;
    font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.2;
  }
  #siteHeader .header-actions button.btn.header-pick-btn { font-size: clamp(14px,3.8vw,16px) !important; padding-inline: 8px !important; }
  #siteHeader .header-actions .appearance-control { width: 44px; height: 44px; }
}

.mobile-contact-notice { display: none; }
@media (max-width: 1240px) {
  .mobile-contact-notice:not([hidden]) {
    box-sizing: border-box; display: flow-root; width: calc(100% - 24px); max-width: 680px;
    margin: 10px auto; padding: 12px 14px 12px 16px; border: 1px solid var(--line);
    border-inline-start: 3px solid var(--pick-action-fill); border-radius: 12px;
    background: color-mix(in srgb, var(--pick-action-fill) 6%, var(--card)); color: var(--text);
  }
  .mobile-contact-notice p { margin: 2px 0 0; font-size: 1rem; line-height: 1.45; }
  .mobile-contact-notice button { min-height: 44px; border: 0; cursor: pointer; font: inherit; border-radius: 8px; }
  .mobile-contact-notice .notice-ok { margin-top: 10px; padding: 0 23px; background: var(--pick-action-fill); color: var(--bg); font-weight: 700; }
  .mobile-contact-notice .notice-close { float: right; margin: -5px -7px 0 3px; width: 44px; color: var(--muted); background: transparent; font-size: 1.625rem; line-height: 1; }
  .mobile-contact-notice button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
}

#siteHeader .appearance-control {
  grid-area: theme; align-self: center; position: relative; display: inline-grid;
  place-items: center; box-sizing: border-box; padding: 0 10px; width: 132px; height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
  cursor: pointer; user-select: none; touch-action: manipulation;
}
#siteHeader .appearance-control input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
#siteHeader .appearance-control:has(input:focus-visible) { outline: 2px solid var(--pick-action-fill); outline-offset: 2px; }
#siteHeader .appearance-option { display: inline-flex; gap: 7px; align-items: center; justify-content: center; font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap; }
#siteHeader .appearance-option svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#siteHeader .appearance-light svg { color: #f4cf85; }
#siteHeader .appearance-dark svg { color: #34528a; }
#siteHeader .appearance-dark, #siteHeader #themeSwitch:checked ~ .appearance-light { display: none; }
#siteHeader #themeSwitch:checked ~ .appearance-dark { display: inline-flex; }
@media (hover: hover) {
  #siteHeader .appearance-control:hover { border-color: var(--pick-action-fill); }
}
@media (max-width: 1240px) {
  #siteHeader .appearance-control { min-width: 0; width: 46px; height: 46px; padding: 0; }
  #siteHeader .appearance-option > span { display: none; }
  #siteHeader .appearance-option svg { width: 24px; height: 24px; }
}

@media (min-width: 1241px) and (max-width: 1360px) {
  #siteHeader .header-inner { padding-inline: 14px; }
  #siteHeader .brand > span:not(.logo) { display: none; }
  #siteHeader .brand { min-width: 0; }
}
