/* Public mobile pages keep privacy in the document flow, outside the booking dock. */
.analytics-compact-privacy[hidden],
.analytics-consent-close[hidden] {
  display: none !important;
}

@media (max-width: 1120px), (hover: none) and (pointer: coarse) {
  .analytics-compact-privacy {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    width: min(calc(100% - 24px), 760px);
    margin: 8px auto;
    padding: 6px 10px;
    border: 1px solid rgba(214, 175, 108, .55);
    background: #101316;
    color: #fff;
    font: 12px/1.35 Arial, sans-serif;
  }

  .analytics-compact-privacy-copy { display: grid; gap: 2px; }
  .analytics-compact-privacy-copy span { color: #d0d0d0; }
  .analytics-compact-privacy-actions { display: flex; flex-wrap: wrap; gap: 6px; }

  .analytics-compact-privacy button,
  .analytics-consent.analytics-consent-inline button {
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .38);
    color: #fff;
    background: transparent;
    font: 700 12px/1.25 Arial, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
  }

  .analytics-compact-privacy button:focus-visible,
  .analytics-consent-inline button:focus-visible {
    outline: 2px solid #e2c57f;
    outline-offset: 2px;
  }

  .analytics-consent.analytics-consent-inline {
    box-sizing: border-box;
    position: static;
    inset: auto;
    z-index: auto;
    transform: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: min(calc(100% - 24px), 760px);
    max-height: none;
    margin: 8px auto;
    padding: 10px;
    overflow: visible;
    box-shadow: none;
  }

  .analytics-consent-inline .analytics-consent-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0;
  }

  .analytics-consent-inline .analytics-consent-actions {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    gap: 6px;
  }

  .analytics-consent-inline .analytics-consent-actions button { width: auto; }

  :is(.hero-copy, .quote-layout) > .analytics-compact-privacy,
  :is(.hero-copy, .quote-layout) > .analytics-consent.analytics-consent-inline {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 8px;
  }
}

@media (max-width: 960px) and (max-height: 520px) {
  /* Keep the package entry available until the actual planner is in view. */
  body.package-page:not(.package-planner-active) .mobile-contact-actions {
    display: grid !important;
  }
}

/* Keep open compact navigation within the viewport and scroll the menu itself. */
@media (max-width: 1120px) {
  .site-header .mobile-menu.is-open {
    --mobile-menu-reserved-height: 90px;
    max-height: calc(100vh - var(--mobile-menu-reserved-height) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--mobile-menu-reserved-height) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  /* Leave room for the promotion strip above these sticky headers. */
  .promo-bar + .site-header .mobile-menu.is-open {
    --mobile-menu-reserved-height: 180px;
  }
}

/* Fit the full shared desktop header just above the compact menu breakpoint. */
@media (min-width: 1121px) and (max-width: 1240px) {
  .site-header .nav-wrap:has(> .nav-whatsapp) > .desktop-nav:has(> a:nth-child(7)) {
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 3px;
  }
}

/* The home header groups reservations and booking in one action cluster. */
@media (min-width: 1121px) and (max-width: 1280px) {
  .site-header .nav-wrap:has(> .nav-actions) { gap: 20px; }
  .site-header .nav-wrap:has(> .nav-actions) > .desktop-nav {
    min-width: 0;
    flex-wrap: wrap;
    gap: 2px 12px;
  }
  .site-header .nav-wrap:has(> .nav-actions) > .desktop-nav a {
    padding: 10px 0;
    white-space: nowrap;
  }
  .site-header .nav-wrap:has(> .nav-actions) > .desktop-nav a::after { bottom: 4px; }
}
