/* Corrective mobile nav/back-button patch */

/* Back controls handled by mobile-smart-back-follow-final.css */

/* Actual mobile hamburger panel: enclose the links/buttons, no giant empty rectangle. */
@media (max-width: 920px) {
  .mobile-menu {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 14px !important;
    box-sizing: border-box;
  }

  .mobile-menu[hidden],
  .mobile-menu:not(.open):not(.active):not(.is-open) {
    /* Preserve existing JS behavior; this rule does not force hidden state. */
  }

  .mobile-menu a {
    flex-shrink: 0;
  }

  .mobile-menu-book-button,
  .mobile-menu-billing-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 10px 18px 0;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .mobile-menu-book-button {
    background: var(--aim-navy, #042249);
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(4, 34, 73, 0.16);
  }

  .mobile-menu-billing-button {
    margin-bottom: 4px;
    background: #ffffff;
    color: var(--aim-navy, #042249) !important;
    border: 1px solid rgba(4, 34, 73, 0.14);
  }

  .mobile-menu-book-button:focus-visible,
  .mobile-menu-billing-button:focus-visible {
    outline: 3px solid rgba(79, 163, 217, 0.34);
    outline-offset: 3px;
  }
}


/* mobile-menu-shrinkwrap-final
   Match Billing/Book Now to regular mobile links and remove extra container whitespace. */
@media (max-width: 920px) {
  nav.mobile-menu,
  .mobile-menu {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 24px) !important;
    overflow-y: auto !important;
    padding: 14px 14px 16px !important;
    box-sizing: border-box !important;
    align-content: start !important;
  }

  .mobile-menu::after,
  nav.mobile-menu::after {
    content: none !important;
    display: none !important;
  }

  .mobile-menu a[href*="billing-payments"],
  .mobile-menu a[href*="book-appointment-1"] {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: var(--aim-navy, #042249) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(4, 34, 73, 0.08) !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    width: 100% !important;
  }

  .mobile-menu a[href*="billing-payments"]::before,
  .mobile-menu a[href*="book-appointment-1"]::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 16px;
    border-radius: 999px;
    background: var(--aim-olive, #7e8b6a);
    flex: 0 0 auto;
  }

  .mobile-menu a[href*="billing-payments"]:hover,
  .mobile-menu a[href*="billing-payments"]:focus-visible,
  .mobile-menu a[href*="book-appointment-1"]:hover,
  .mobile-menu a[href*="book-appointment-1"]:focus-visible {
    background: rgba(234, 245, 251, 0.9) !important;
    outline: none !important;
  }

  .mobile-menu a[href*="book-appointment-1"] {
    border-bottom: 0 !important;
  }

  /* Override prior pill button rules even if stale classes remain somewhere. */
  .mobile-menu-book-button,
  .mobile-menu-billing-button {
    margin: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }
}
