/* PRINTO-MNAV-V10 (2026-11-19) - mobile header bar.
   Scoped to <=991px so the desktop header is untouched. Loaded after
   layout/header.css, which floats .skip-link cells at 20% width inside a
   #00bbd3 bar; everything here is an override of that.
   Greens/greys reuse tokens already in the site: #1f9d55 (landing green). */

@media only screen and (max-width: 991px) {

  /* No cyan slab any more - the bar sits straight on the white header.
     Fills use the brand cyan at low alpha, the same tint the hero already
     uses (rgba(0,187,211,.2)), so no new colour enters the palette. */
  /* the theme sets .skip-container.mobile{background-color:#00bbd3}, which is
     more specific than .po-mnav-host on its own - match it to win. */
  .skip-container.mobile.po-mnav-host,
  .po-mnav-host { background: transparent !important; padding: 9px 12px 0; }

  .po-mnav { display: flex; align-items: center; gap: 8px; float: none; clear: none; }
  .po-mnav:after { display: none; }

  /* undo the old floated 20%/25% cells */
  .po-mnav .skip-link {
    float: none; width: auto; height: auto; border: 0;
    line-height: 1.1; text-align: center; padding: 0;
  }
  .po-mnav .skip-link.skip-nav { border-left: 0; }
  .po-mnav .skip-link:hover, .po-mnav .skip-link.skip-active { background: none; }

  /* ---- Menu: round white button, green bars, label underneath ---- */
  .po-mnav__menu {
    flex: 0 0 auto; display: flex; flex-direction: column;
    align-items: center; gap: 4px; text-decoration: none;
  }
  .po-mnav__burger {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0, 187, 211, .13);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; box-shadow: none;
  }
  .po-mnav__burger i { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: #1f9d55; }
  .po-mnav__menu .label {
    display: block !important; font-size: 11px; line-height: 1;
    color: #15181d; font-weight: 600; letter-spacing: .01em;
  }
  .po-mnav__menu.skip-active .po-mnav__burger { background: rgba(31, 157, 85, .16); }

  /* ---- Search: fills the bar, solid white, icon inside ----
     The field is already styled by the site's own "search glass" rules, which
     set the input transparent, pin the width and lay the magnifier out as a
     static sibling. Rather than re-implement that, this only corrects what
     breaks inside a 375px bar: let it fill the row, make the pill solid so it
     reads against the cyan, and stop the placeholder clipping. The !important
     flags are scoped to .po-mnav__search, so nothing outside this bar moves. */
  /* a theme rule puts 10px of padding here, which costs the field 20px and
     clips the placeholder on a 375px screen. */
  .po-mnav__search { flex: 1 1 auto; min-width: 0; display: block; padding: 0 !important; margin: 0 !important; }
  /* the outer searchautocomplete form carries its own glass background,
     which halos the white pill on the cyan bar - flatten it here only. */
  .po-mnav__search form.searchautocomplete,
  .po-mnav__search > form {
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important;
    border-radius: 22px;
    width: 100% !important; max-width: none !important; float: none !important;
  }
  .po-mnav__search .form-search {
    position: relative; margin: 0;
    width: 100% !important; max-width: none !important;
    background: rgba(0, 187, 211, .13) !important; border-radius: 22px;
    display: flex; align-items: center;
  }
  .po-mnav__search label { display: none; }
  .po-mnav__search input#search,
  .po-mnav__search .input-text {
    flex: 1 1 auto; min-width: 0;
    width: auto !important; height: 38px;
    border: 0 !important; background: transparent !important;
    padding: 0 4px 0 12px !important; margin: 0;
    font-size: 14px !important; color: #333; box-sizing: border-box;
  }
  .po-mnav__search input#search::-webkit-input-placeholder { color: #7b848f; }
  .po-mnav__search input#search::placeholder { color: #7b848f; }
  /* the theme zeroes this, which leaves the magnifier flush against the
     pill edge - it reads as merged with the field. */
  .po-mnav__search .search-button { flex: 0 0 auto; margin-right: 4px !important; }
  /* the autocomplete panel must hang off the field */
  .po-mnav__search .search-autocomplete { top: 46px !important; left: 0; right: 0; width: auto; }

  /* ---- cart only; the account icon moved into the drawer footer ---- */
  .po-mnav .po-mnav__cart { flex: 0 0 auto; }


  /* ============ Menu drawer: full screen, slides in from the left ============
     The theme's skip-link handler only toggles .skip-active on #header-nav.
     .skip-content is display:none, which cannot animate, so below 991px the
     panel is laid out permanently and moved off-canvas with a transform
     instead. PRINTO-MDRAWER-V1 adds the close button and the scroll lock. */
  .main-menu #header-nav.nav-content {
    display: block !important;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 100%; max-width: 100%; height: 100%;
    margin: 0; padding: 0; border: 0;
    background: #fff;
    /* .sticky-notification-bar is fixed at z-index 99999 and was covering
       the close button, so the drawer has to clear it. */
    z-index: 100010;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform .28s ease, visibility 0s linear .28s;
    visibility: hidden;
    box-shadow: none;
  }
  .main-menu #header-nav.nav-content.skip-active {
    transform: translateX(0);
    visibility: visible;
    transition: transform .28s ease, visibility 0s linear 0s;
  }
  /* the page behind must not scroll while the drawer is open */
  body.po-drawer-open { overflow: hidden; }

  .po-drawer__head {
    position: sticky; top: 0; z-index: 2;
    display: flex; justify-content: flex-end; align-items: center;
    height: 52px; padding: 0 8px;
    background: #00bbd3;
  }
  .po-drawer__close {
    width: 38px; height: 38px; padding: 0; border: 0;
    border-radius: 50%; background: rgba(255,255,255,.18);
    color: #fff; font-size: 26px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }

  /* The department list is position:absolute, so .sf-menu-block and
     .nav-container-mobile collapse to height 0 and the footer flows up behind
     the menu. Inside the drawer it must sit in normal flow instead, so the
     footer lands under it and expanding a department pushes the rest down.
     Scoped to #header-nav inside the mobile query - the desktop bar uses #nav
     and is untouched. */
  .main-menu #header-nav .sf-menu-phone { position: static !important; }
  .main-menu #header-nav .nav-container-mobile,
  .main-menu #header-nav .sf-menu-block { height: auto !important; min-height: 0 !important; }

  /* footer of the drawer: track order, account links, currency */
  .po-drawer__foot {
    border-top: 1px solid #e6e9ed;
    margin-top: 10px; padding: 14px 16px 28px;
    background: #f6f8f9;
  }
  .po-drawer__foot .po-drawer__flink {
    display: block; padding: 12px 0;
    font-size: 14px; font-weight: 600; color: #15181d; text-decoration: none;
    border-bottom: 1px solid #e6e9ed;
  }
  .po-drawer__foot .po-drawer__flink:last-of-type { border-bottom: 0; }
  .po-drawer__foot ul { list-style: none; margin: 0; padding: 0; }
  .po-drawer__foot li { display: block; }
  /* these links are white in the theme (they normally sit on the cyan bar),
     which makes them invisible on the drawer's light footer. */
  .main-menu #header-nav .po-drawer__foot li a,
  .main-menu #header-nav .po-drawer__foot .links a {
    display: block; padding: 12px 0;
    font-size: 14px; color: #15181d !important; text-decoration: none;
    border-bottom: 1px solid #e6e9ed;
  }
  .main-menu #header-nav .po-drawer__foot .header-button-title,
  .main-menu #header-nav .po-drawer__foot .header-button-title span {
    color: #15181d !important;
  }
  .po-drawer__foot li:last-child a { border-bottom: 0; }
  .po-drawer__foot .header-button { float: none; margin: 12px 0 0; }

  /* ---- most-ordered chips, no label ---- */
  .po-mchips {
    display: flex; gap: 7px; align-items: center;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 10px 0 11px; margin: 0;
    scrollbar-width: none;
  }
  .po-mchips::-webkit-scrollbar { display: none; }
  .po-mchips a {
    flex: 0 0 auto; display: inline-block;
    font-size: 12.5px; line-height: 1; font-weight: 500;
    color: #15181d; background: rgba(0, 187, 211, .13);
    border-radius: 18px; padding: 9px 14px;
    text-decoration: none; white-space: nowrap;
  }
  .po-mchips a:hover, .po-mchips a:active { background: #fec006; color: #16181d; }
}

/* the bar is mobile-only; header.css already hides .skip-container.mobile
   above 991px, this just makes sure the chip row goes with it. */
@media only screen and (min-width: 992px) {
  .po-mnav-host, .po-mchips, .po-drawer__foot, .po-drawer__head { display: none !important; }
}
