/* Mobile navigation and drawer component. Loaded after header.css. */

@media (max-width: 1023px) {
  .wp-netsons-header {
    position: sticky;
    top: 20px;
    right: auto;
    left: auto;
    width: min(calc(100% - 40px), 1460px);
    height: 60px;
    margin: 20px auto 0;
    transform: none;
  }

  .wp-netsons-nav {
    position: static;
    display: block;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .wp-netsons-nav-group {
    display: none;
  }

  .wp-netsons-mobile {
    display: flex;
    width: 100%;
    height: 60px;
    padding: 2px 14px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--header-mobile-border);
    border-radius: 18px;
    background: var(--header-mobile-background);
    box-shadow: var(--header-mobile-shadow);
    color: var(--header-nav-color);
    pointer-events: auto;
    backdrop-filter: var(--header-mobile-backdrop);
    -webkit-backdrop-filter: var(--header-mobile-backdrop);
  }

  .wp-netsons-mobile > div {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .wp-netsons-mobile .wp-netsons-logo {
    width: 126px;
    height: 30px;
    min-width: 40px;
    min-height: 0;
    padding: 0;
  }

  .wp-netsons-mobile .wp-netsons-logo .netsons-brand-logo {
    display: block;
    width: 126px;
    height: 30px;
  }

  .wp-netsons-mobile button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--header-mobile-color);
    font-size: 25px;
  }

  .wp-netsons-mobile .wp-mobile-account {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--header-mobile-color);
    font-size: 23px;
  }

  .wp-netsons-mobile .wp-mobile-account .wp-ni {
    font-size: 23px;
  }

  .wp-netsons-mobile .wp-eco-toggle {
    display: block;
    height: 42px;
    padding: 0;
    text-align: center;
  }

  .wp-mobile-menu {
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
  }

  .wp-netsons-mobile .wp-nav-leaf .wp-ni {
    font-size: 25px;
  }

  .wp-mobile-drawer {
    position: fixed;
    z-index: 1006;
    top: 88px;
    right: 20px;
    left: 20px;
    display: block;
    max-height: calc(100vh - 104px);
    max-height: calc(100dvh - 104px);
    padding: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--header-mobile-drawer-border);
    border-radius: 20px;
    background: var(--header-mobile-drawer-background);
    box-shadow: var(--header-mobile-drawer-shadow);
    color: var(--header-mobile-drawer-color);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    overscroll-behavior: contain;
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
    backdrop-filter: var(--header-mobile-backdrop);
    -webkit-backdrop-filter: var(--header-mobile-backdrop);
  }

  .wp-mobile-drawer.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .wp-mobile-drawer details {
    border-bottom: 1px solid var(--header-mobile-divider);
  }

  .wp-mobile-drawer summary {
    display: flex;
    min-height: 0;
    padding: 16px 4px;
    align-items: center;
    justify-content: space-between;
    color: var(--header-mobile-summary-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.65;
    cursor: pointer;
    list-style: none;
  }

  .wp-mobile-drawer summary::-webkit-details-marker {
    display: none;
  }

  .wp-mobile-drawer summary > span {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .wp-mobile-drawer summary > span :is(.wp-ni, .wp-business-icon),
  .wp-mobile-drawer summary > .wp-mobile-chevron {
    color: var(--header-mobile-accent);
  }

  .wp-mobile-drawer summary > span > .wp-ni,
  .wp-mobile-drawer summary > .wp-mobile-chevron,
  .wp-mobile-listino-link .wp-ni {
    font-size: 20px;
  }

  .wp-mobile-drawer summary .wp-mobile-chevron {
    transition: transform 200ms ease;
  }

  .wp-mobile-drawer details[open] > summary .wp-mobile-chevron {
    transform: rotate(180deg);
  }

  .wp-mobile-drawer .wp-mega-menu-columns {
    display: grid;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 30px);
  }

  .wp-mobile-drawer .wp-mega-menu-columns section {
    padding: 15px;
  }

  .wp-mobile-drawer .wp-mega-menu-columns h2 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
  }

  .wp-mobile-drawer .wp-mega-menu-columns li a {
    display: flex;
    min-height: 40px;
    padding: 7px 8px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--header-mobile-menu-color);
    font-size: 15px;
    line-height: 1.45;
  }

  .wp-mobile-drawer .wp-mega-menu-columns li a > span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    line-height: 1.45;
  }

  .wp-mobile-drawer .wp-mega-menu-columns li a:hover {
    color: var(--header-hover-color);
    background: var(--header-hover-background);
  }

  .wp-mobile-drawer .wp-mega-menu-columns li a small,
  .wp-mobile-drawer .wp-mega-menu-help a small {
    font-size: 13px;
    line-height: 1.5;
  }

  .wp-mobile-drawer .wp-mega-menu-help a strong {
    font-size: 15px;
    line-height: 1.65;
  }

  .wp-mobile-drawer .wp-solution-area-menu {
    display: grid;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .wp-mobile-drawer .wp-solution-area-menu > a {
    min-height: 104px;
    padding: 23px;
    gap: 13px;
    border-color: var(--header-mobile-solution-border);
  }

  .wp-mobile-drawer .wp-solution-area-menu > a > span {
    font-size: 17px;
    font-weight: 650;
    line-height: 1.32;
    letter-spacing: -0.015em;
  }

  .wp-mobile-drawer .wp-solution-area-menu > a > small {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .wp-mobile-listino-link {
    display: flex;
    min-height: 0;
    padding: 16px 4px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--header-mobile-divider);
    color: var(--header-mobile-color);
    font-size: 16px;
    line-height: 1.65;
  }

  .wp-mobile-listino-link > span {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .wp-mobile-listino-link .wp-ni {
    color: var(--header-accent);
  }

  .wp-mobile-languages {
    display: grid;
    padding: 17px 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid var(--header-mobile-divider);
  }

  .wp-mobile-languages :is(a, button) {
    display: flex;
    min-height: 42px;
    padding: 7px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--header-mobile-language-border);
    border-radius: 10px;
    background: var(--header-mobile-language-background);
    color: var(--header-mobile-language-color);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
  }

  .wp-mobile-languages :is(a:hover, button:hover),
  .wp-mobile-languages a.active {
    background: var(--header-mobile-language-hover-background);
  }

  .wp-mobile-languages a.active {
    border-color: var(--header-mobile-language-active-border);
    background: var(--header-mobile-language-active-background);
    color: var(--header-mobile-language-active-color);
  }

  .wp-mobile-quick-links {
    display: grid;
    padding-top: 17px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .wp-mobile-quick-links a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--header-mobile-quick-border);
    border-radius: 11px;
    background: var(--header-mobile-quick-background);
    color: var(--header-mobile-quick-color);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
  }

  .wp-mobile-quick-links a:hover {
    background: var(--header-mobile-quick-hover-background);
  }

  body.wp-mobile-menu-open .wp-netsons-header {
    position: fixed;
    top: 20px;
    right: 0;
    left: 0;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .wp-netsons-mobile .wp-eco-toggle {
    height: 44px;
  }

  .wp-mobile-drawer .wp-solution-area-menu {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .wp-mobile-drawer .wp-mega-menu-columns {
    grid-template-columns: 1fr;
  }
}
