/*
 * Sticky anchor nav with Enquire Now and the phone button (Figma 536:585
 * desktop, 536:599 mobile). A tour template change, separate from the booking
 * section: it styles the live anchor nav (.ot-section.anchors) and the two
 * buttons added to it. Needs sticky-nav.js, which pins the bar once it reaches
 * the top of the window and keeps --ot-anchors-height up to date.
 *
 * Layout: links on the left, buttons on the right from 1200px; below that the
 * links sit in one row that scrolls sideways inside the bar, with the buttons
 * underneath. The mobile layout is Aung's proposal (536:599); the breakpoint
 * and spacing are the variables below, so it is easy to change.
 */

:root {
  /* Height of the pinned bar; sticky-nav.js measures it. Used for scroll-margin-top and the buy box. */
  --ot-anchors-height: 0px;
}

.ot-section.anchors {
  --ot-anchors-pinned-pad: 18px;
  --ot-anchors-link-gap: 2.5rem;
  --ot-anchors-row-gap: 14px;
}

/* Links and buttons share the bar. */
.ot-section.anchors .ot-section__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ot-anchors-row-gap) 24px;
  min-width: 0;
}

.ot-section.anchors nav {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

.ot-section.anchors ul {
  justify-content: flex-start;
  column-gap: var(--ot-anchors-link-gap);
}

/* The two buttons (536:592) */
.ot-anchors-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex: none;
}

.ot-section.anchors .ot-anchors-actions__enquire,
.ot-section.anchors .ot-anchors-actions__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin: 0;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s linear, color 0.2s linear, border-color 0.2s linear;
}

/* Button/Primary: the live .button gold pill */
.ot-section.anchors .ot-anchors-actions__enquire {
  padding: 15px 30px;
  border: 1px solid var(--ast-global-color-0);
  background-color: var(--ast-global-color-0);
  color: var(--ast-global-color-4);
  cursor: pointer;
}

/* Button/Phone: white outline on the navy bar */
.ot-section.anchors .ot-anchors-actions__phone {
  padding: 14px 24px;
  border: 1px solid var(--ast-global-color-4);
  background-color: transparent;
  color: var(--ast-global-color-4);
  line-height: 18px;
}

.ot-section.anchors .ot-anchors-actions__enquire:hover,
.ot-section.anchors .ot-anchors-actions__enquire:focus,
.ot-section.anchors .ot-anchors-actions__phone:hover,
.ot-section.anchors .ot-anchors-actions__phone:focus {
  border-color: var(--ast-global-color-4);
  background-color: var(--ast-global-color-4);
  color: var(--ast-global-color-1);
}

.ot-anchors-actions__phone svg {
  flex: none;
}

/* The live theme removes outlines; the bar sets its own, white on navy. */
.ot-section.anchors a:focus-visible,
.ot-section.anchors button:focus-visible {
  outline: 2px solid var(--ast-global-color-4);
  outline-offset: 2px;
}

/* ---------- Pinned ---------- */

/* Holds the bar's place while it is pinned, so the page does not jump. */
.ot-anchors-holder {
  position: relative;
}

/* Above the page content, below the header (z-index 99) and its menus, and below the popup (9999). */
.ot-section.anchors.is-pinned {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.18);
}

.ot-section.anchors.is-pinned .ot-section__container {
  --section-padding-y: var(--ot-anchors-pinned-pad);
}

/* Anchored sections land below the pinned bar, not under it. */
.product-content-version .ot-section[id],
.product-content-version .ot-dep-slot[id] {
  scroll-margin-top: var(--ot-anchors-height);
}

/* ---------- Below 1200: links scroll sideways in one row, buttons underneath (536:599) ---------- */

@media (max-width: 1199px) {
  .ot-section.anchors {
    --ot-anchors-pinned-pad: 14px;
    --ot-anchors-link-gap: 22px;
  }

  .ot-section.anchors .ot-section__content {
    flex-direction: column;
    align-items: stretch;
  }

  .ot-section.anchors nav {
    width: 100%;
  }

  .ot-section.anchors ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .ot-anchors-actions {
    gap: 10px;
  }
}

@media (max-width: 921px) {
  .ot-section.anchors .ot-anchors-actions__phone {
    flex: 1 1 0;
    min-width: 0;
    gap: 6px;
    padding: 14px 10px;
    font-size: 14px;
  }
}

/* Small phones: both buttons and the full number fit on one row at 320px. */
@media (max-width: 374px) {
  .ot-section.anchors .ot-anchors-actions__enquire {
    padding: 15px 16px;
    font-size: 14px;
  }

  .ot-section.anchors .ot-anchors-actions__phone {
    gap: 4px;
    padding: 14px 8px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ot-section.anchors .ot-anchors-actions__enquire,
  .ot-section.anchors .ot-anchors-actions__phone {
    transition: none;
  }
}
