/*
 * Mobile header + drawer navigation for AcquyTheme only (Views/SiteHeader.liquid override,
 * js/acquy-mobile-nav.js). Loaded after AcquyTheme/css/site.css so these rules win the cascade
 * for the header/nav selectors they touch at <=1024px, without editing the shared
 * AAZ.BaseTheme chrome.css that every other theme also relies on.
 *
 * Desktop (>1024px) keeps the original 3-column header (logo | nav | search+hotline) untouched;
 * the toggle button and drawer are display:none there. At <=1024px the inline nav is hidden
 * (moved into the drawer) so the header collapses to two short rows: logo+toggle, then search.
 */

.acq-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--acq-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.acq-nav-toggle:hover,
.acq-nav-toggle:focus-visible {
  border-color: var(--acq-green);
  outline: none;
}

.acq-nav-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 13px;
}

.acq-nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--acq-ink);
  transition: transform .2s ease, opacity .2s ease;
}

.acq-nav-toggle[aria-expanded="true"] .acq-nav-toggle-bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.acq-nav-toggle[aria-expanded="true"] .acq-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.acq-nav-toggle[aria-expanded="true"] .acq-nav-toggle-bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .acq-nav-toggle {
    display: inline-flex;
  }

  .header-center {
    display: none;
  }

  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left toggle"
      "search search";
    align-items: center;
    row-gap: 10px;
    min-height: 0;
    padding: 12px 0;
  }

  .header-left {
    grid-area: left;
  }

  .acq-nav-toggle {
    grid-area: toggle;
  }

  .header-right {
    grid-area: search;
    width: 100%;
    justify-content: stretch;
  }

  .header-right .acq-search--header {
    width: 100%;
    flex: 1 1 auto;
  }

  .header-right .acq-search--header .acq-search__form {
    min-width: 0;
    width: 100%;
  }
}

/* Drawer */
.acq-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.acq-mobile-drawer[hidden] {
  display: none;
}

.acq-mobile-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  transition: opacity .2s ease;
}

.acq-mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(320px, 86vw);
  padding: 18px;
  background: #fff;
  box-shadow: -18px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
}

.acq-mobile-drawer.is-open .acq-mobile-drawer-overlay {
  opacity: 1;
}

.acq-mobile-drawer.is-open .acq-mobile-drawer-panel {
  transform: translateX(0);
}

.acq-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--acq-line);
}

.acq-mobile-drawer-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--acq-muted);
}

.acq-mobile-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--acq-line);
  border-radius: 8px;
  background: #fff;
  color: var(--acq-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.acq-mobile-drawer-close:hover,
.acq-mobile-drawer-close:focus-visible {
  color: var(--acq-ink);
  border-color: var(--acq-green);
  outline: none;
}

.acq-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acq-mobile-nav-link {
  display: block;
  padding: 13px 10px;
  border-radius: 10px;
  color: var(--acq-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.acq-mobile-nav-link:hover,
.acq-mobile-nav-link.is-active,
.acq-mobile-nav-link:focus-visible {
  background: var(--acq-soft);
  color: var(--acq-green-dark);
  outline: none;
}

.acq-mobile-nav-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
}

.acq-mobile-nav-child {
  display: block;
  padding: 10px;
  border-radius: 8px;
  color: var(--acq-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.acq-mobile-nav-child:hover,
.acq-mobile-nav-child.is-active,
.acq-mobile-nav-child:focus-visible {
  background: var(--acq-soft);
  color: var(--acq-green-dark);
  outline: none;
}

.acq-mobile-drawer-hotline {
  display: block;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--acq-line);
  color: var(--acq-green-dark);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

html.acq-drawer-lock,
body.acq-drawer-lock {
  overflow: hidden;
}

@media (min-width: 1025px) {
  .acq-mobile-drawer {
    display: none !important;
  }
}
