/* JTT Operations Engine — customer runtime
 * v0.5.5 principle: TravelWP owns the native primary booking button and its DOM.
 * JTT adds only a secondary My Trip CTA, availability decoration and status blocks.
 */
.jtt-oe-language-picker{margin:12px 0}
.jtt-oe-language-picker label{display:block;font-weight:600;margin-bottom:5px}
.jtt-oe-language-picker select{width:100%;min-height:44px}
.jtt-ticket-select{min-height:42px}

/* Product conversion row: Add to Trip is the low-friction secondary action
 * immediately LEFT of TravelWP's native Booking Now. Both keep one consistent
 * pill geometry; the secondary uses a warmer/lighter orange so the hierarchy is
 * obvious without looking like a disabled utility button. */
#tourBookingForm .jtt-oe-add-to-trip,
#tourBookingForm .btn-booking.jtt-oe-booking-now{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  vertical-align:top!important;
  width:auto!important;
  min-width:0!important;
  min-height:48px!important;
  box-sizing:border-box!important;
  margin:10px 0 8px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  font-weight:750!important;
  line-height:1.1!important;
  text-align:center!important;
  box-shadow:none!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
#tourBookingForm .jtt-oe-add-to-trip{
  width:42%!important;
  transition:none!important;
  margin-right:8px!important;
  background:#ff7d59!important;
  border:1px solid #ff7d59!important;
  color:#fff!important;
}
#tourBookingForm .jtt-oe-add-to-trip:not(:disabled):hover,
#tourBookingForm .jtt-oe-add-to-trip:not(:disabled):focus-visible{
  background:#ff6c45!important;
  border-color:#ff6c45!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(255,92,54,.18)!important;
  transform:translateY(-1px);
}
#tourBookingForm .btn-booking.jtt-oe-booking-now{
  width:calc(58% - 8px)!important;
  margin-right:0!important;
  max-width:none!important;
}
#tourBookingForm .jtt-oe-add-to-trip.jtt-oe-trip-saved{
  opacity:1!important;
  background:#e9f7f2!important;
  color:#176b60!important;
  border-color:#b9dfd5!important;
  cursor:default!important;
  transform:none!important;
}
/* A real unavailable state may look disabled. Short preflight/save work stays
 * full-opacity so selected-date transitions do not produce a pale 1-second blink. */
#tourBookingForm .jtt-oe-booking-disabled{opacity:.46!important;cursor:not-allowed!important;box-shadow:none!important;pointer-events:none!important}
#tourBookingForm .jtt-oe-preflight-pending,
#tourBookingForm .jtt-oe-trip-saving{opacity:1!important;filter:none!important;box-shadow:none!important}
#tourBookingForm .jtt-oe-add-to-trip.jtt-oe-preflight-pending:disabled,
#tourBookingForm .jtt-oe-add-to-trip.jtt-oe-trip-saving:disabled{
  background:#ff7d59!important;
  border-color:#ff7d59!important;
  color:#fff!important;
  opacity:1!important;
}
#tourBookingForm .btn-booking.jtt-oe-booking-now.jtt-oe-preflight-pending:disabled,
#tourBookingForm .btn-booking.jtt-oe-booking-now.jtt-oe-trip-saving:disabled{
  background:#fc4522!important;
  border-color:#fc4522!important;
  color:#fff!important;
  opacity:1!important;
}
#tourBookingForm .jtt-oe-preflight-pending:disabled,
#tourBookingForm .jtt-oe-trip-saving:disabled{cursor:progress!important;pointer-events:none!important}


/* No CTA blink during an already-valid Add transaction. Disabled is not used
 * for the Add button while saving, but this also neutralizes theme :disabled
 * transitions during the initial unavailable -> selectable handoff. */
#tourBookingForm .jtt-oe-add-to-trip{
  animation:none!important;
  filter:none!important;
  -webkit-filter:none!important;
}
#tourBookingForm .jtt-oe-add-to-trip.jtt-oe-trip-saving{
  opacity:1!important;
  pointer-events:none!important;
  cursor:progress!important;
  transform:none!important;
}
/* Desktop booking-card persistence — 0.5.5 stable soft rail.
 * The original #form-booking remains in its own column. JS uses a stable
 * document-space anchor, clamps Safari elastic overscroll, and eases only the
 * final few pixels of vertical translation. No re-parenting, clone, or modal
 * overlay is used, so TravelWP's form/button DOM contract remains unchanged. */
@media(min-width:1025px){
  .jtt-oe-booking-rail-context{
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
  }
  #form-booking.jtt-oe-booking-rail{
    position:relative!important;
    top:auto!important;
    bottom:auto!important;
    left:auto!important;
    right:auto!important;
    align-self:flex-start!important;
    height:auto!important;
    min-height:0!important;
    max-height:var(--jtt-oe-booking-rail-max-height,calc(100vh - 188px))!important;
    overflow-y:auto!important;
    overflow-x:visible!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable;
    z-index:18!important;
    transform:translate3d(0,var(--jtt-oe-booking-rail-y,0px),0)!important;
    /* Theme/Elementor transitions on transform would make the composited visual
     * position lag behind the JS rail value and can create feedback/bounce. The
     * 0.5.5 rail performs its own monotonic easing, so CSS animation is disabled. */
    transition:none!important;
    animation:none!important;
    will-change:transform;
  }
  #form-booking.jtt-oe-booking-rail.is-jtt-oe-rail-active{
    isolation:isolate;
  }
}


/* Status is a separate block BELOW TravelWP's primary CTA. */
.jtt-oe-trip-message{display:block;width:100%;box-sizing:border-box;margin:9px 0 0;padding:9px 11px;border:1px solid #cfe5dd;border-radius:7px;background:#fff;line-height:1.45;font-size:13px;color:#4b5551}
.jtt-oe-trip-message[hidden]{display:none!important}
.jtt-oe-trip-message.is-error{border-color:#e2b8b8;background:#fffafa;color:#6f3939}

/* Calendar semantics.
 * JTT UX lock:
 * - available + unselected/resting = SOLID green circle (discoverability)
 * - hover/focus = white/light center + green ring/text
 * - selected/clicked = white/light center + green ring/text
 * - conflict = amber; held/checkout = unavailable/owned states.
 */
.flatpickr-day.jtt-oe-available:not(.flatpickr-disabled):not(:hover):not(:focus):not(.selected):not(.startRange):not(.endRange){
  background:#43a047!important;
  border-color:#43a047!important;
  color:#fff!important;
  border-radius:50%!important;
  font-weight:700!important;
  box-shadow:none!important;
}
.flatpickr-day.jtt-oe-available:not(.flatpickr-disabled):hover,
.flatpickr-day.jtt-oe-available:not(.flatpickr-disabled):focus,
.flatpickr-day.jtt-oe-available.selected:not(.flatpickr-disabled),
.flatpickr-day.jtt-oe-available.startRange:not(.flatpickr-disabled),
.flatpickr-day.jtt-oe-available.endRange:not(.flatpickr-disabled){
  background:#f7fff8!important;
  border-color:#43a047!important;
  color:#2f7d32!important;
  border-radius:50%!important;
  font-weight:700!important;
  box-shadow:0 0 0 1px rgba(67,160,71,.18)!important;
}
.flatpickr-day.jtt-oe-in-trip:not(.flatpickr-disabled){box-shadow:inset 0 0 0 1px rgba(46,125,50,.20)}
.flatpickr-day.jtt-oe-in-trip.selected:not(.flatpickr-disabled),
.flatpickr-day.jtt-oe-in-trip:hover:not(.flatpickr-disabled),
.flatpickr-day.jtt-oe-in-trip:focus:not(.flatpickr-disabled){box-shadow:0 0 0 1px rgba(67,160,71,.18)!important}
.flatpickr-day.jtt-oe-temporarily-held{opacity:.42!important;cursor:not-allowed!important}
.flatpickr-day.jtt-oe-in-checkout{box-shadow:inset 0 0 0 2px rgba(39,140,88,.55);opacity:.65!important;cursor:not-allowed!important}
.flatpickr-day.jtt-oe-my-trip-conflict{box-shadow:inset 0 0 0 2px rgba(180,125,16,.62);background:rgba(218,166,48,.10)!important}

.jtt-oe-owned-checkout{margin:12px 0;padding:12px 14px;border:1px solid #b9ddc9;border-radius:7px;background:#fff}
.jtt-oe-owned-checkout p{margin:5px 0 10px}
.jtt-oe-continue-checkout{display:inline-block}
.jtt-oe-conflict-panel{margin-top:12px;padding:14px;border:1px solid #dfc476;border-radius:7px;background:#fffdf7;line-height:1.45}
.jtt-oe-conflict-panel p{margin:6px 0 8px}
.jtt-oe-conflict-panel ul{margin:6px 0 12px 20px}
.jtt-oe-conflict-actions{display:flex;gap:8px;flex-wrap:wrap}
.jtt-oe-replace-trip{font-weight:700}
.jtt-oe-keep-trip{background:#fff}

/* Checkout / Checkout Blocks */
.jtt-oe-checkout-runtime{width:100%!important;max-width:none;margin:28px 0 20px;padding:0;box-sizing:border-box}
.jtt-oe-checkout-hold{width:100%;box-sizing:border-box;padding:18px 20px;margin:0 0 22px;border:1px solid #d9e2df;border-radius:9px;background:#fff;color:#33413d;font-family:inherit;line-height:1.48;box-shadow:0 1px 0 rgba(24,54,47,.025)}
.jtt-oe-checkout-hold strong{display:block;color:#176b60;font-weight:650;letter-spacing:-.01em}
.jtt-oe-checkout-hold p{margin:3px 0 0;color:#66736f;font-size:14px;line-height:1.48}
.jtt-oe-hold-timer{font-size:21px;font-weight:650;line-height:1.25;letter-spacing:-.018em;margin-top:8px;font-variant-numeric:tabular-nums}
.jtt-oe-hold-timer--blue{color:#315bd6}
.jtt-oe-hold-timer--green{color:#18755f}
.jtt-oe-hold-timer--yellow{color:#a86f12}
.jtt-oe-hold-timer--red{color:#b42318}
.jtt-oe-checkout-hold.is-expired{border-color:#e2b8b8}
.jtt-oe-recheck-hold{margin-top:10px}
.jtt-oe-recovery{padding:20px 22px;margin:0 0 20px;border:1px solid #e4d7a7;border-radius:10px;background:#fffaf0}
.jtt-oe-recovery h3{margin:0 0 6px;color:#6d470c}
.jtt-oe-recovery>p{margin:0;color:#66706f;line-height:1.52}
.jtt-oe-recovery-item{padding:14px 15px;margin-top:13px;border:1px solid #eadfbb;border-radius:9px;background:#fff}
.jtt-oe-recovery-item>strong{display:inline-block;color:#8a5b11;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.jtt-oe-recovery-item h4{margin:5px 0;color:#263b37;font-size:16px}
.jtt-oe-recovery-item p{margin:4px 0 0;color:#66706f;font-size:13px;line-height:1.5}
.jtt-oe-recovery-item.is-available{border-color:#b9ddc9;background:#f7fcfa}
.jtt-oe-recovery-item.is-available>strong{color:#176b60}
.jtt-oe-recovery-status{color:#8a5b11!important;font-weight:650}
.jtt-oe-recovery-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

/* V4 mobile calendar is intentionally explicit and self-contained. Earlier
 * builds created the mobile DOM but omitted its CSS, leaving the visual result
 * dependent on TravelWP/theme accidents. */
.jtt-oe-mobile-date-display{display:none}
.jtt-oe-mobile-calendar-overlay{display:none}

@media(max-width:1024px){
  #form-booking,#form-booking.jtt-oe-booking-rail{position:static!important;top:auto!important;transform:none!important;max-height:none!important;height:auto!important;overflow:visible!important;will-change:auto!important}
}



/* 0.5.24 — TranslatePress server-to-JS label bridge on Tour pages. */
.jtt-oe-translatable-sources{
  position:fixed!important;
  left:-10000px!important;
  top:0!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}

@media(max-width:767px){
  #tourBookingForm .jtt-oe-add-to-trip,
  #tourBookingForm .btn-booking.jtt-oe-booking-now{width:calc(50% - 6px)!important;min-height:46px!important;padding:0 10px!important;font-size:12px!important}
  #tourBookingForm .jtt-oe-add-to-trip{margin-right:8px!important}
  .jtt-oe-checkout-runtime{margin-top:20px;padding:0 16px}
  .jtt-oe-checkout-hold,.jtt-oe-recovery{padding:16px}
  .jtt-oe-recovery-actions .button{max-width:100%;white-space:normal;text-align:center}
  .jtt-oe-hold-timer{font-size:19px}

  .jtt-oe-mobile-original-date{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    opacity:0!important;
    pointer-events:none!important;
    overflow:hidden!important;
  }
  .jtt-oe-mobile-date-display{
    display:flex!important;
    width:100%!important;
    min-height:48px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
    padding:0 16px!important;
    border:1px solid #ff4b2b!important;
    border-radius:28px!important;
    background:#f3f5f5!important;
    color:#555!important;
    font:inherit!important;
    text-align:left!important;
  }
  .jtt-oe-mobile-calendar-overlay{
    position:fixed;
    inset:0;
    z-index:999999;
    padding:18px;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.38);
    box-sizing:border-box;
  }
  .jtt-oe-mobile-calendar-overlay.is-open{display:flex}
  body.jtt-oe-calendar-lock{overflow:hidden!important}
  .jtt-oe-mobile-calendar-modal{
    width:min(100%,420px);
    max-height:calc(100vh - 36px);
    overflow:auto;
    box-sizing:border-box;
    padding:18px;
    border-radius:16px;
    background:#fff;
    box-shadow:0 18px 50px rgba(0,0,0,.20);
  }
  .jtt-oe-mobile-calendar-header{
    display:grid;
    grid-template-columns:44px 1fr 44px;
    align-items:center;
    gap:8px;
    margin-bottom:12px;
  }
  .jtt-oe-mobile-calendar-header strong{text-align:center;font-size:17px}
  .jtt-oe-mobile-prev,.jtt-oe-mobile-next{
    width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#f5f5f5;font-size:28px;line-height:1;cursor:pointer
  }
  .jtt-oe-mobile-weekdays,.jtt-oe-mobile-days{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:6px;
  }
  .jtt-oe-mobile-weekdays{margin-bottom:6px;color:#777;font-size:12px;text-align:center;font-weight:600}
  .jtt-oe-mobile-weekdays span{padding:5px 0}
  .jtt-oe-mobile-day,.jtt-oe-mobile-empty{aspect-ratio:1/1;min-width:0}
  .jtt-oe-mobile-day{
    display:flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:50%;background:transparent;color:#555;font:inherit;cursor:pointer
  }
  .jtt-oe-mobile-day:disabled{opacity:.25;cursor:not-allowed}
  .jtt-oe-mobile-day[data-state="available"]:not(.is-selected),
  .jtt-oe-mobile-day[data-state="in_trip"]:not(.is-selected){
    background:#43a047;border-color:#43a047;color:#fff;font-weight:700
  }
  .jtt-oe-mobile-day[data-state="available"]:not(:disabled):hover,
  .jtt-oe-mobile-day[data-state="available"]:not(:disabled):focus,
  .jtt-oe-mobile-day[data-state="in_trip"]:not(:disabled):hover,
  .jtt-oe-mobile-day[data-state="in_trip"]:not(:disabled):focus,
  .jtt-oe-mobile-day.is-selected[data-state="available"],
  .jtt-oe-mobile-day.is-selected[data-state="in_trip"]{
    background:#f7fff8;border-color:#43a047;color:#2f7d32;box-shadow:0 0 0 1px rgba(67,160,71,.18);font-weight:700
  }
  .jtt-oe-mobile-day.is-conflict{background:#fffaf0!important;border-color:#c39120!important;color:#8b650d!important}
  .jtt-oe-mobile-close{width:100%!important;margin-top:16px!important}
}


/* 0.5.4 Add-to-Trip commerce sheet.
 * One existing JS drawer only: desktop = right side sheet, mobile = bottom sheet.
 * It is intentionally non-modal so Continue Exploring remains the dominant next
 * behavior and the underlying page is not trapped behind a center popup. */
.jtt-oe-trip-drawer-overlay{
  position:fixed;
  inset:0;
  z-index:999998;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(90deg,rgba(12,39,36,0) 52%,rgba(12,39,36,.08) 100%);
  transition:opacity .22s ease;
}
.jtt-oe-trip-drawer-overlay.is-open{opacity:1}
.jtt-oe-trip-drawer{
  position:absolute;
  right:24px;
  bottom:24px;
  width:min(430px,calc(100vw - 48px));
  height:auto;
  max-height:calc(100vh - 48px);
  box-sizing:border-box;
  overflow:auto;
  overscroll-behavior:contain;
  pointer-events:auto;
  padding:24px;
  background:#fff;
  color:#24312f;
  border:1px solid rgba(21,81,75,.12);
  border-radius:20px;
  box-shadow:0 22px 60px rgba(20,38,38,.18);
  opacity:0;
  transform:translate3d(0,22px,0) scale(.985);
  transform-origin:100% 100%;
  transition:transform .24s cubic-bezier(.22,.8,.28,1),opacity .18s ease;
}
.jtt-oe-trip-drawer-overlay.is-open .jtt-oe-trip-drawer{opacity:1;transform:translate3d(0,0,0) scale(1)}
.jtt-oe-trip-drawer-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.jtt-oe-trip-drawer-success{display:flex;align-items:flex-start;gap:11px}
.jtt-oe-trip-drawer-success strong{display:block;font-size:17px;line-height:1.25;color:#174f49}
.jtt-oe-trip-drawer-success p{margin:4px 0 0;font-size:13px;line-height:1.45;color:#6a7472}
.jtt-oe-trip-check{display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:#e9f7f2;color:#176b60;font-weight:900}
.jtt-oe-trip-drawer-close{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:0;border:1px solid #e3e8e7;border-radius:50%;background:#fff;color:#46514f;font-size:24px;line-height:1;cursor:pointer}
.jtt-oe-trip-drawer-close:hover,.jtt-oe-trip-drawer-close:focus-visible{border-color:#176b60;color:#176b60;outline:2px solid rgba(23,107,96,.16);outline-offset:2px}
.jtt-oe-trip-current-card{display:grid;gap:4px;padding:16px 17px;margin-bottom:12px;border:1px solid rgba(21,81,75,.12);border-radius:14px;background:#f8fbfa}
.jtt-oe-trip-current-card>strong{font-size:15px;line-height:1.35;color:#233c38}
.jtt-oe-trip-current-card>span{font-size:13px;color:#65716f}
.jtt-oe-trip-current-card .jtt-oe-trip-current-price{margin-top:2px;font-size:15px;font-weight:800;color:#176b60}
.jtt-oe-trip-drawer-count{margin:10px 0 14px;font-size:13px;color:#5f6a68}
.jtt-oe-view-trip{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:46px!important;box-sizing:border-box!important;margin:0 0 22px!important;border-radius:999px!important;background:#155b53!important;border-color:#155b53!important;color:#fff!important;font-weight:750!important;text-decoration:none!important}
.jtt-oe-trip-recommendations{display:grid;gap:12px;margin:0 0 18px}
.jtt-oe-trip-rec-heading{padding-top:4px}
.jtt-oe-trip-rec-heading>span{display:block;margin-bottom:4px;font-size:10px;font-weight:850;letter-spacing:.13em;color:#9a7b37}
.jtt-oe-trip-rec-heading h3{margin:0 0 6px;font-size:20px;line-height:1.2;color:#263b38}
.jtt-oe-trip-rec-card{display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;align-items:stretch;padding:9px;border:1px solid #e5eae9;border-radius:13px;background:#fff;color:inherit;text-decoration:none;cursor:pointer}
.jtt-oe-trip-rec-card img{width:92px;height:78px;object-fit:cover;border-radius:9px}
.jtt-oe-trip-rec-body{display:grid;align-content:center;gap:4px;min-width:0}
.jtt-oe-trip-rec-body strong{font-size:14px;line-height:1.3;color:#293b38}
.jtt-oe-trip-rec-body>span{font-size:11.5px;line-height:1.35;color:#737d7b}
.jtt-oe-trip-rec-link{justify-self:start;margin-top:2px;color:#176b60;font-size:12.5px;font-weight:800;text-decoration:underline;text-underline-offset:3px}
.jtt-oe-continue-exploring{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;box-sizing:border-box;padding:0 16px;border:1px solid #dde4e2;border-radius:999px;background:#fff;color:#40504d;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}
.jtt-oe-continue-exploring:hover,.jtt-oe-continue-exploring:focus-visible{border-color:#176b60;color:#176b60;outline:none}

@media(max-width:767px){
  .jtt-oe-trip-drawer-overlay{background:linear-gradient(0deg,rgba(12,39,36,.08) 0,rgba(12,39,36,0) 48%)}
  .jtt-oe-trip-drawer{
    top:auto;
    right:0;
    bottom:0;
    width:100%;
    height:auto;
    max-height:min(82vh,760px);
    padding:20px 18px max(20px,env(safe-area-inset-bottom));
    border-left:0;
    border-top:1px solid rgba(21,81,75,.12);
    border-radius:22px 22px 0 0;
    box-shadow:0 -18px 46px rgba(20,38,38,.16);
    transform:translate3d(0,102%,0);
  }
  .jtt-oe-trip-rec-card{grid-template-columns:78px minmax(0,1fr)}
  .jtt-oe-trip-rec-card img{width:78px;height:70px}
}




@media (hover:hover) and (pointer:fine){
  .jtt-oe-trip-rec-card:hover,.jtt-oe-trip-rec-card:focus-visible{border-color:#b9d8d2;box-shadow:0 8px 22px rgba(20,38,38,.08);outline:none}
}

@media(prefers-reduced-motion:reduce){
  .jtt-oe-trip-drawer-overlay,.jtt-oe-trip-drawer{transition:none!important}
}
