/**
 * SurgeryBD header — mobile fixed bar (loads last; overrides Tailwind .sticky)
 */

#dentify-header-spacer {
  display: none;
  pointer-events: none;
}

@media (max-width: 1023px) {
  #dentify-header-spacer {
    display: block;
    height: var(--surgerybd-header-height, 60px);
    flex-shrink: 0;
  }

  #dentify-site-header {
    position: fixed !important;
    top: var(--dentify-admin-top, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    z-index: 99990 !important;
    margin: 0 !important;
  }

  #dentify-header-bar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    z-index: 1 !important;
  }

  #mobile-menu:not(.hidden) {
    position: relative !important;
    z-index: 1 !important;
    max-height: min(
      70vh,
      calc(100vh - var(--surgerybd-header-offset, 60px))
    ) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.dentify-mobile-menu-open {
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  #dentify-site-header {
    position: relative !important;
  }

  #dentify-header-bar {
    position: sticky !important;
    top: var(--dentify-admin-top, 0px) !important;
    z-index: 100 !important;
  }
}
