/* Shared mobile navigation fixes for the institutional 2026 header. */
body:has(#mainMenuMobile:is(.show,.showing,.hiding)) #hubspot-messages-iframe-container {
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 991.98px) {
  .home-2026 .um-mobile-panel {
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
  }

  .home-2026 .um-mobile-panel.show:not(.hiding),
  .home-2026 .um-mobile-panel.showing {
    display: flex;
    visibility: visible;
    transform: none !important;
  }

  .home-2026 .um-mobile-panel .offcanvas-header {
    gap: 16px;
    padding: 14px 24px 10px;
  }

  .home-2026 .um-mobile-panel .offcanvas-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Match the space below the last item with the space above the first. */
  .home-2026 .home-mobile details[open] > summary {
    margin-bottom: 16px;
  }

  .home-mobile-close {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 0 0 auto;
    padding: 0;
    flex: 0 0 48px;
    border: 1px solid #d5e2eb;
    border-radius: 50%;
    background: #eef5fa;
    color: var(--um-blue);
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
  }

  .home-mobile-close:hover {
    border-color: #b8cddd;
    background: #e2eef6;
  }

  .home-mobile-close:active {
    transform: scale(.96);
  }

  .home-mobile-close:focus-visible {
    outline: 3px solid var(--um-yellow);
    outline-offset: 3px;
  }

  .home-mobile-close .home-icon {
    width: 26px;
    height: 26px;
    stroke-width: 2.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-mobile-close {
    transition: none;
  }
}
