/* AMIC_MOBILE_HAMBURGER_FIX_V1_0_2 */

#amicMobileMenuFixed,
#amicMobileMenuBackdrop,
#amicMobileDrawerClose {
  display: none;
}

@media (max-width: 820px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.amic-mobile-nav-open {
    overflow: hidden !important;
  }

  /* Fixed hamburger: independent of AMIC shell markup */
  #amicMobileMenuFixed {
    display: flex !important;
    position: fixed !important;
    top: 11px !important;
    left: 11px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483000 !important;
    border: 1px solid #79a4dc !important;
    border-radius: 12px !important;
    background: #f7fbff !important;
    color: #123e70 !important;
    box-shadow: 0 3px 12px rgba(7, 42, 84, .18) !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
  }

  #amicMobileMenuFixed:active {
    transform: scale(.97);
  }

  #amicMobileMenuFixed .amic-fixed-hamburger {
    width: 22px;
    height: 17px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  #amicMobileMenuFixed .amic-fixed-hamburger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    min-height: 2px !important;
    border-radius: 999px !important;
    background: #123e70 !important;
    transition: transform .20s ease, opacity .15s ease;
  }

  body.amic-mobile-nav-open #amicMobileMenuFixed .amic-fixed-hamburger span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  body.amic-mobile-nav-open #amicMobileMenuFixed .amic-fixed-hamburger span:nth-child(2) {
    opacity: 0;
  }

  body.amic-mobile-nav-open #amicMobileMenuFixed .amic-fixed-hamburger span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  /* Make room in any likely top header */
  .topbar,
  header,
  .header {
    padding-left: 64px !important;
  }

  /* Drawer */
  [data-amic-mobile-drawer="true"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(86vw, 340px) !important;
    max-width: 340px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding-top: 66px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: translateX(-104%) !important;
    transition: transform .23s cubic-bezier(.2,.8,.2,1) !important;
    z-index: 2147482500 !important;
    box-shadow: 18px 0 44px rgba(2, 20, 43, .34) !important;
    visibility: visible !important;
  }

  body.amic-mobile-nav-open [data-amic-mobile-drawer="true"] {
    transform: translateX(0) !important;
  }

  #amicMobileDrawerClose {
    display: flex !important;
    position: fixed !important;
    top: 13px !important;
    left: min(calc(86vw - 51px), 289px) !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483100 !important;
    border: 1px solid rgba(255,255,255,.32) !important;
    border-radius: 10px !important;
    background: #1a4777 !important;
    color: #fff !important;
    font-size: 25px !important;
    line-height: 1 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.amic-mobile-nav-open #amicMobileDrawerClose {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #amicMobileMenuBackdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147482000 !important;
    background: rgba(4, 18, 37, .60) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .20s ease, visibility .20s ease;
  }

  body.amic-mobile-nav-open #amicMobileMenuBackdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

@media (min-width: 821px) {
  #amicMobileMenuFixed,
  #amicMobileMenuBackdrop,
  #amicMobileDrawerClose {
    display: none !important;
  }

  [data-amic-mobile-drawer="true"] {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #amicMobileMenuFixed .amic-fixed-hamburger span,
  [data-amic-mobile-drawer="true"],
  #amicMobileMenuBackdrop {
    transition: none !important;
  }
}
