/* J.M. Fry mobile-only fixed branded header and compact navigation.
   Desktop (901px+) is intentionally untouched. */
.jmf-mobile-fixed-header,
.jmf-mobile-float-panel,
.jmf-mobile-backdrop { display:none; }

@media (max-width:900px) {
  :root {
    --jmf-mobile-header-height:76px;
    --jmf-main-offset:0px !important;
    --jm-fixed-header-height:var(--jmf-mobile-header-height) !important;
    --header-total-height:var(--jmf-mobile-header-height) !important;
    scroll-padding-top:var(--jmf-mobile-header-height) !important;
  }

  html { margin:0 !important; padding:0 !important; overflow-x:hidden !important; }
  body {
    margin:0 !important;
    padding:var(--jmf-mobile-header-height) 0 0 !important;
    overflow-x:hidden !important;
  }

  /* Hide all legacy header pieces on mobile. */
  body > header:not(.jmf-mobile-fixed-header),
  header:not(.jmf-mobile-fixed-header),
  .jmf-header,.site-header,.topbar,.navbar,.desktop-header,.mobile-header,
  [role="banner"]:not(.jmf-mobile-fixed-header),
  .jmf-mobile-icons,.jmf-mobile-menu,#jmfMenuPanel,#jmfMenuButton,
  .jmf-announcement,.announcement-bar,.announcement,.ticker-bar,
  .jmf-mobile-hero-brand,.desktop-hero-logo {
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }

  .jmf-mobile-fixed-header {
    position:fixed !important;
    inset:0 0 auto 0 !important;
    z-index:2147483001 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    width:100% !important;
    height:var(--jmf-mobile-header-height) !important;
    min-height:var(--jmf-mobile-header-height) !important;
    box-sizing:border-box !important;
    padding:8px 12px 7px !important;
    background:#fff !important;
    border:0 !important;
    border-bottom:3px solid #071f43 !important;
    box-shadow:none !important;
  }
  .jmf-mobile-fixed-home {
    display:flex !important;
    align-items:center !important;
    height:52px !important;
    min-width:0 !important;
    flex:1 1 auto !important;
    overflow:hidden !important;
  }
  .jmf-mobile-fixed-logo {
    display:block !important;
    width:auto !important;
    height:auto !important;
    max-width:min(74vw,290px) !important;
    max-height:52px !important;
    object-fit:contain !important;
    object-position:left center !important;
    margin:0 !important;
  }
  .jmf-mobile-header-menu {
    position:relative !important;
    flex:0 0 52px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:52px !important;
    height:52px !important;
    padding:0 !important;
    margin:0 0 0 8px !important;
    border:0 !important;
    border-radius:50% !important;
    background:#071f43 !important;
    color:#fff !important;
    box-shadow:none !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    cursor:pointer !important;
  }
  .jmf-mobile-header-menu span,
  .jmf-mobile-header-menu::before,
  .jmf-mobile-header-menu::after {
    content:"" !important;
    position:absolute !important;
    left:15px !important;
    width:22px !important;
    height:3px !important;
    border-radius:999px !important;
    background:#fff !important;
    transition:transform .2s ease, top .2s ease, opacity .15s ease !important;
  }
  .jmf-mobile-header-menu::before { top:17px !important; }
  .jmf-mobile-header-menu span { top:25px !important; }
  .jmf-mobile-header-menu::after { top:33px !important; }
  .jmf-mobile-header-menu[aria-expanded="true"]::before { top:25px !important; transform:rotate(45deg) !important; }
  .jmf-mobile-header-menu[aria-expanded="true"] span { opacity:0 !important; }
  .jmf-mobile-header-menu[aria-expanded="true"]::after { top:25px !important; transform:rotate(-45deg) !important; }

  /* One offset only: body padding. This keeps every page flush to the header. */
  body > main,
  main,
  .page,.page-shell,.site-main,#main,#content {
    position:relative !important;
    top:auto !important;
    margin-top:0 !important;
    padding-top:0 !important;
    transform:none !important;
  }
  main > :first-child,
  .site-main > :first-child,
  #main > :first-child,
  #content > :first-child {
    margin-top:0 !important;
  }

  /* Homepage hero: full image, full width, no horizontal shift or cropping. */
  body.home .jmf-hero,
  body.home-page .jmf-hero {
    position:relative !important;
    left:auto !important;
    right:auto !important;
    width:100% !important;
    max-width:100% !important;
    height:calc(100svh - var(--jmf-mobile-header-height)) !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    transform:none !important;
    overflow:hidden !important;
    line-height:0 !important;
    background:#fff !important;
  }
  body.home .jmf-hero picture,
  body.home-page .jmf-hero picture {
    display:block !important;
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
  }
  body.home .jmf-hero picture > img,
  body.home-page .jmf-hero picture > img,
  body.home .jmf-hero > img,
  body.home-page .jmf-hero > img {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
    object-fit:fill !important;
    object-position:center top !important;
  }

  .jmf-mobile-backdrop {
    position:fixed !important;
    inset:var(--jmf-mobile-header-height) 0 0 0 !important;
    z-index:2147482998 !important;
    display:block !important;
    opacity:0 !important;
    pointer-events:none !important;
    background:rgba(4,17,38,.44) !important;
    -webkit-backdrop-filter:blur(6px) !important;
    backdrop-filter:blur(6px) !important;
    transition:opacity .2s ease !important;
  }
  .jmf-mobile-backdrop.open { opacity:1 !important; pointer-events:auto !important; }

  .jmf-mobile-float-panel {
    position:fixed !important;
    top:calc(var(--jmf-mobile-header-height) + 10px) !important;
    right:12px !important;
    z-index:2147483000 !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    width:min(60vw,280px) !important;
    max-width:calc(100vw - 24px) !important;
    max-height:calc(100dvh - var(--jmf-mobile-header-height) - 22px) !important;
    padding:10px 12px 9px !important;
    overflow:hidden !important;
    border:1px solid rgba(255,255,255,.78) !important;
    border-radius:22px !important;
    background:rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter:blur(22px) saturate(150%) !important;
    backdrop-filter:blur(22px) saturate(150%) !important;
    box-shadow:0 22px 58px rgba(7,26,58,.28) !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transform:translateY(-8px) scale(.985) !important;
    transform-origin:top right !important;
    transition:opacity .18s ease, transform .18s ease, visibility .18s !important;
  }
  .jmf-mobile-float-panel.open {
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transform:translateY(0) scale(1) !important;
  }
  .jmf-mobile-float-panel a {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    min-height:31px !important;
    padding:3px 10px !important;
    border-bottom:1px solid rgba(7,26,58,.11) !important;
    color:#071a3a !important;
    background:transparent !important;
    text-decoration:none !important;
    white-space:normal !important;
    font:800 13px/1.12 Arial,Helvetica,sans-serif !important;
  }
  .jmf-mobile-float-panel a:hover,
  .jmf-mobile-float-panel a:focus { color:#d7192f !important; }
  .jmf-mobile-float-panel .jmf-mobile-quote {
    min-height:38px !important;
    margin-top:7px !important;
    border:0 !important;
    border-radius:999px !important;
    background:#d7192f !important;
    color:#fff !important;
  }
  .jmf-mobile-menu-footer {
    padding:8px 4px 2px !important;
    text-align:center !important;
    color:#333 !important;
    font:700 10px/1.1 Arial,Helvetica,sans-serif !important;
    letter-spacing:.15em !important;
  }
  body.jmf-mobile-nav-open { overflow:hidden !important; }
}

@media (max-width:360px), (max-height:700px) {
  .jmf-mobile-fixed-logo { max-width:min(72vw,270px) !important; max-height:48px !important; }
  .jmf-mobile-header-menu { flex-basis:48px !important; width:48px !important; height:48px !important; }
  .jmf-mobile-header-menu span,.jmf-mobile-header-menu::before,.jmf-mobile-header-menu::after { left:14px !important; width:20px !important; }
  .jmf-mobile-float-panel { padding:7px 10px 6px !important; }
  .jmf-mobile-float-panel a { min-height:27px !important; font-size:11.5px !important; padding:2px 8px !important; }
  .jmf-mobile-float-panel .jmf-mobile-quote { min-height:32px !important; margin-top:5px !important; }
  .jmf-mobile-menu-footer { padding-top:5px !important; font-size:9px !important; }
}

/* 2026-08-02: mobile-only plain navy hamburger icon (no circle). */
@media (max-width:900px) {
  .jmf-mobile-header-menu {
    flex:0 0 48px !important;
    width:48px !important;
    height:48px !important;
    margin-left:8px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#071f43 !important;
    box-shadow:none !important;
  }
  .jmf-mobile-header-menu span,
  .jmf-mobile-header-menu::before,
  .jmf-mobile-header-menu::after {
    left:7px !important;
    width:34px !important;
    height:3px !important;
    border-radius:999px !important;
    background:#071f43 !important;
  }
  .jmf-mobile-header-menu::before { top:13px !important; }
  .jmf-mobile-header-menu span { top:22px !important; }
  .jmf-mobile-header-menu::after { top:31px !important; }
  .jmf-mobile-header-menu[aria-expanded="true"]::before,
  .jmf-mobile-header-menu[aria-expanded="true"]::after { top:22px !important; }
}


/* V21 mobile-only menu footer: centered company logo, no quote CTA. */
@media (max-width:900px) {
  .jmf-mobile-float-panel .jmf-mobile-quote { display:none !important; }
  .jmf-mobile-menu-footer {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:10px 4px 3px !important;
    margin:0 !important;
    border:0 !important;
  }
  .jmf-mobile-menu-logo {
    display:block !important;
    width:auto !important;
    height:auto !important;
    max-width:150px !important;
    max-height:42px !important;
    object-fit:contain !important;
    margin:0 auto !important;
  }
}
@media (max-width:360px), (max-height:700px) {
  .jmf-mobile-menu-footer { padding-top:7px !important; }
  .jmf-mobile-menu-logo { max-width:132px !important; max-height:36px !important; }
}


/* V44: FryRequest is the final clickable option in the actual floating mobile menu. */
@media (max-width:900px) {
  .jmf-mobile-float-panel a.jmf-mobile-fryrequest-live {
    color:#0657d8 !important;
    text-decoration:underline !important;
    text-underline-offset:3px !important;
    font-weight:800 !important;
  }
  .jmf-mobile-float-panel a.jmf-mobile-fryrequest-live:hover,
  .jmf-mobile-float-panel a.jmf-mobile-fryrequest-live:focus {
    color:#0043aa !important;
    text-decoration:underline !important;
  }
}
