/* Shared drawer for the Tourtree and Ulleung Air themes. Never moves the page. */
body .nav-mobile,
body .nav-mobile-overlay,
body .nav-mobile:not(.is-open),
body .nav-mobile-overlay:not(.is-open) { display: none !important; }

@media (max-width: 980px) {
  html.ua-mobile-navigation-open,
  body.nav-mobile-open { overflow: hidden; }
  body.nav-mobile-open { padding-right: 0 !important; }
  body.nav-mobile-open .quick-consult-widget { display: none; }
  body > .nav-mobile.is-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0 0 auto auto;
    width: min(86vw, 360px);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    color: #111827;
    border: 0;
    box-shadow: -12px 0 24px rgba(2, 6, 23, .16);
    transform: none !important;
    transition: none;
    z-index: 10001;
  }
  body > .nav-mobile-overlay.is-open {
    display: block !important;
    position: fixed;
    inset: 0;
    right: auto;
    /* The dismiss button's hit area is only the exposed background, not links. */
    width: calc(100% - min(86vw, 360px));
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .4);
    opacity: 1;
    pointer-events: auto;
    transition: none;
    z-index: 10000;
  }
  body .nav-mobile .ua-mobile-navigation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
  }
  body .nav-mobile .ua-mobile-navigation-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 28px;
    cursor: pointer;
  }
  body .nav-mobile .nav-menu-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    width: 100%;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  body .nav-mobile .nav-menu-item { width: 100%; min-width: 0; }
  body .nav-mobile .nav-menu-link,
  body .nav-mobile .nav-dropdown a {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
  }
  /* Submenus must not require hover or extend outside the mobile drawer. */
  body .nav-mobile .nav-dropdown {
    display: block;
    position: static;
    min-width: 0;
    width: auto;
    margin: 0 0 8px 12px;
    padding: 0 0 0 8px;
    border: 0;
    border-left: 2px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  body .nav-mobile .nav-dropdown-arrow { display: none; }
  body .nav-mobile .nav-mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    width: 100%;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
  }
  body .nav-mobile .nav-mobile-actions > a {
    justify-content: flex-start;
    min-height: 44px;
    padding: 12px;
    border-left: 0;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  /* Keep the Tourtree layout; only normalize the member action hit height. */
  body .nav-mobile [data-customer-header="mobile"][data-customer-header-profile="tourtree"] > a {
    min-height: 44px;
    box-sizing: border-box;
  }
  /* The Air link spans a row, so anchor its badge to the centered bell, not the row edge. */
  body .nav-mobile [data-customer-header="mobile"][data-customer-header-profile="ulleungair"] .ua-customer-notification-bell > span {
    left: calc(50% + 5px);
    right: auto !important; /* Override the legacy inline right offset without stretching the badge. */
  }
}
