/**
 * WE Custourcore - Single Tour Booking Sidebar + Mobile Sticky Shell
 * Step 3K / Step 3M asset ownership split
 *
 * Scroll pinning is JavaScript-controlled. Native CSS sticky positioning is
 * intentionally not used. Full Tour uses an absolute bounded end state. A
 * standalone shortcode may optionally use `sticky_stop_id`, which keeps the
 * card fixed but anchors its top to that document stop point as scrolling
 * continues.
 */

.wecustourcore-single-tour-booking-shell--sidebar {
  width: 100%;
}

/* Marker inserted by the scroll controller to preserve the original slot. */
.wecustourcore-single-tour-booking-shell__sticky-placeholder {
  width: 100%;
  height: 0;
  pointer-events: none;
}

/* Active only while the viewport is inside the sidebar scroll range. */
.wecustourcore-single-tour-booking-shell--sidebar.is-sticky {
  position: fixed;
  z-index: 1020;
  top: var(--wecustourcore-booking-sticky-top, 96px);
  left: var(--wecustourcore-booking-sticky-left, auto);
  width: var(--wecustourcore-booking-sticky-width, auto);
}

/* Stop the card at the bottom of the full Single Tour content rail. */
.wecustourcore-single-tour-content-layout__sidebar--js-sticky >
.wecustourcore-single-tour-booking-shell--sidebar.is-sticky-ended {
  position: absolute;
  z-index: 2;
  right: auto;
  bottom: 0;
  left: var(--wecustourcore-booking-sticky-end-left, 0);
  width: var(--wecustourcore-booking-sticky-width, 100%);
}


/*
 * Standalone explicit-stop mode remains fixed so it does not require an
 * Elementor/theme ancestor to become a positioning context. JavaScript updates
 * only the top coordinate after the stop threshold, anchoring the card above
 * the requested document element without overlap.
 */
.wecustourcore-single-tour-booking-shell--sidebar.is-sticky-ended-standalone {
  position: fixed;
  z-index: 1020;
  top: var(--wecustourcore-booking-sticky-top, 96px);
  left: var(--wecustourcore-booking-sticky-left, auto);
  width: var(--wecustourcore-booking-sticky-width, auto);
}

/* `sticky="no"` always remains normal document flow. */
.wecustourcore-single-tour-booking-shell--sidebar.wecustourcore-single-tour-booking-shell--static {
  position: static;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__card {
  position: static;
  overflow: hidden;
  border: 1px solid var(--dt-border, #e4e8ef);
  border-radius: var(--dt-radius-lg, 20px);
  background: #fff;
  box-shadow: var(--dt-shadow-md, 0 12px 34px rgba(7, 27, 66, 0.12));
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__head {
  padding: 28px 28px 20px;
  background: var(--dt-primary-900, #071b42);
  color: #fff;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__eyebrow {
  color: #f4c868;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__price {
  margin-top: 4px;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__price small,
.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__head p {
  color: #d8e4f5;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__head p {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__body {
  padding: 28px;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__label {
  display: block;
  margin: 0 0 7px;
  font-weight: 700;
  color: var(--dt-primary-900, #071b42);
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__control {
  width: 100%;
  min-height: 46px;
  margin-bottom: 16px;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__action {
  margin-top: 8px;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__sidebar-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.wecustourcore-single-tour-booking-shell--sidebar .wecustourcore-single-tour-booking-shell__benefits {
  display: grid;
  gap: 8px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--dt-border, #e4e8ef);
  color: var(--dt-text-muted, #667085);
  font-size: 0.88rem;
}

.wecustourcore-single-tour-booking-shell--mobile {
  display: none;
}

@media (max-width: 991.98px) {
  .wecustourcore-single-tour-booking-shell--sidebar {
    display: none;
  }

  .wecustourcore-single-tour-booking-shell--mobile {
    position: fixed;
    z-index: 1025;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px 16px;
    border: 1px solid var(--dt-border, #e4e8ef);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--dt-shadow-lg, 0 18px 48px rgba(7, 27, 66, 0.18));
  }

  .wecustourcore-single-tour-booking-shell--mobile .wecustourcore-single-tour-booking-shell__mobile-price {
    min-width: 0;
  }

  .wecustourcore-single-tour-booking-shell--mobile .wecustourcore-single-tour-booking-shell__mobile-price small {
    display: block;
    color: var(--dt-text-muted, #667085);
    font-size: 0.65rem;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .wecustourcore-single-tour-booking-shell--mobile .wecustourcore-single-tour-booking-shell__mobile-price strong {
    display: block;
    overflow: hidden;
    color: var(--dt-primary-900, #071b42);
    font-size: 0.9rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wecustourcore-single-tour-booking-shell--mobile .wecustourcore-single-tour-booking-shell__mobile-cta {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .wecustourcore-single-tour-booking-shell--mobile {
    gap: 8px;
    padding-left: 12px;
  }

  .wecustourcore-single-tour-booking-shell--mobile .wecustourcore-single-tour-booking-shell__mobile-cta {
    padding-right: 14px;
    padding-left: 14px;
    font-size: 0.84rem;
  }
}
