/* Fasto V3.0 mobile menu fix
 * This file is intentionally small and loaded after V2.9 so it does not overwrite the custom V2.8 design work.
 */
@media (max-width:1024px){
  body.fasto-v30-menu-open{overflow:hidden;}

  /* The legacy overlay creates the dark empty block seen on mobile. Keep it off for the new drawer. */
  body.fasto-v30-menu-open .overlay,
  body.fasto-v30-menu-open .overlay.visible{
    display:none;
    opacity:0;
    visibility:hidden;
    background:transparent;
    backdrop-filter:none;
  }
  body.fasto-v30-menu-open .overlay:before,
  body.fasto-v30-menu-open .overlay.visible:before{
    display:none;
    opacity:0;
  }

  /* Hide the old in-header mobile nav drawer. The real mobile drawer is cloned to body by fasto-v30-mobile-menu.js. */
  body.fasto-v30-menu-open header#theme-header nav.primary,
  body.fasto-v30-menu-open header#theme-header nav.primary.open{
    display:none;
  }

  .fasto-v30-mobile-panel{
    position:fixed;
    left:0;
    right:0;
    top:60px;
    bottom:0;
    z-index:2147483000;
    display:none;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    background:#fff;
    color:#111827;
    border-top:1px solid #e5e7eb;
  }
  body.admin-bar .fasto-v30-mobile-panel{top:106px;}
  body.fasto-v30-menu-open .fasto-v30-mobile-panel.is-open{display:block;}

  .fasto-v30-mobile-panel__inner{
    padding:18px 22px 34px;
    min-height:100%;
  }
  .fasto-v30-mobile-panel__top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:0 0 14px;
    margin:0 0 8px;
    border-bottom:1px solid #e5e7eb;
  }
  .fasto-v30-mobile-panel__title{
    margin:0;
    font-family:var(--fasto-v25-heading-font,inherit);
    font-size:18px;
    line-height:1;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#111827;
  }
  .fasto-v30-mobile-close{
    width:42px;
    height:42px;
    min-height:42px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:0;
    background:#fff;
    color:#111827;
    font-size:30px;
    line-height:1;
    box-shadow:none;
  }

  .fasto-v30-mobile-menu,
  .fasto-v30-mobile-menu ul{
    list-style:none;
    margin:0;
    padding:0;
  }
  .fasto-v30-mobile-menu > li{
    display:block;
    margin:0;
    border-bottom:1px solid #e5e7eb;
  }
  .fasto-v30-mobile-menu a{
    min-height:54px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    color:#111827;
    background:#fff;
    border:0;
    border-radius:0;
    box-shadow:none;
    font-family:var(--fasto-v25-heading-font,inherit);
    font-size:17px;
    line-height:1.1;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.02em;
    text-decoration:none;
  }
  .fasto-v30-mobile-menu a:hover,
  .fasto-v30-mobile-menu .current-menu-item > a{
    color:#ff3434;
  }
  .fasto-v30-mobile-menu .menu-item-has-children > a:after{
    content:"+";
    margin-left:auto;
    color:#ff3434;
    font-size:20px;
    line-height:1;
  }
  .fasto-v30-mobile-menu .menu-item-has-children.menu-open > a:after{content:"−";}
  .fasto-v30-mobile-menu .sub-menu{
    display:none;
    position:static;
    width:100%;
    min-width:0;
    margin:0;
    padding:0 0 10px 18px;
    background:#fff;
    border:0;
    box-shadow:none;
    opacity:1;
    visibility:visible;
    transform:none;
    pointer-events:auto;
  }
  .fasto-v30-mobile-menu .menu-open > .sub-menu{display:block;}
  .fasto-v30-mobile-menu .sub-menu li{border:0;margin:0;}
  .fasto-v30-mobile-menu .sub-menu a{
    min-height:40px;
    font-family:var(--fasto-v25-body-font,inherit);
    font-size:14px;
    font-weight:500;
    text-transform:none;
    letter-spacing:0;
    color:#4b5563;
  }
  .fasto-v30-mobile-menu .sub-menu .menu-item-has-children > a:after{font-size:17px;}

  .fasto-v30-mobile-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:0;
    margin-top:22px;
    border-top:1px solid #e5e7eb;
  }
  .fasto-v30-mobile-actions a{
    min-height:50px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid #e5e7eb;
    color:#111827;
    font-family:var(--fasto-v25-heading-font,inherit);
    font-size:15px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    text-decoration:none;
  }
  .fasto-v30-mobile-actions a:after{content:"→";color:#ff3434;}

  .mobile-trigger.is-active .mobile-trigger-inner{background:transparent;}
  .mobile-trigger.is-active .mobile-trigger-inner:before{top:0;transform:rotate(45deg);}
  .mobile-trigger.is-active .mobile-trigger-inner:after{top:0;transform:rotate(-45deg);}
}

@media (max-width:600px){
  body.admin-bar .fasto-v30-mobile-panel{top:60px;}
}
