/* ==========================================================================
   Tropic Booking Widget — streamlined layout
   Scoped entirely to form #gform_wrapper_3. Safe to load alongside the
   existing theme/GF styles — nothing here is a global override.
   ========================================================================== */

/* Also declared on :root (not just #gform_wrapper_3 below): the mobile
   Travelers popover (#tbw-pax-popover) gets moved to be a direct child
   of <body> when it opens at ≤767px - see tropic-booking-widget.js - so
   it can escape the theme's own fixed header, which sits in a different
   part of the DOM with a z-index (99999) high enough that no z-index on
   an element still nested inside #gform_wrapper_3 could ever out-stack
   it. CSS custom properties only cascade to descendants of whichever
   element defines them, so once the popover is a sibling of
   #gform_wrapper_3 instead of a descendant, var(--tbw-ink) etc. would
   otherwise resolve to nothing there - confirmed live (the header bar
   and Continue button went invisible: white text with no fallback
   background is exactly what an unresolved var() produces here). */
:root,
#gform_wrapper_3 {
  --tbw-gold: #ce9f59;
  --tbw-gold-deep: #b6874a;
  --tbw-teal: #16a4ad;
  --tbw-ink: #131729;
  --tbw-line: #e2ded2;
}

/* ---- row 1: Trip Type + Passengers — compact, left aligned, no labels ----
   NOTE: the live theme lays these fields out as plain inline-block boxes
   inside a block-level #gform_fields_3 container (not flexbox) - each
   .gfield just flows left-to-right and wraps like text. Anything we insert
   between them has to be inline-block too, or being block-level forces a
   line break and pushes everything after it onto its own row. */
#gform_wrapper_3 #field_3_16 { flex: 0 0 auto !important; min-width: 0 !important; position: relative; }
#gform_wrapper_3 #field_3_16 .gfield_label,
#gform_wrapper_3 #field_3_1 .gfield_label,
#gform_wrapper_3 #field_3_3 .gfield_label,
#gform_wrapper_3 #field_3_5 .gfield_label,
#gform_wrapper_3 #field_3_4 .gfield_label {
  display: none !important;
}
/* Kept in the DOM for submission, but visually replaced by the
   tbw-trigger + tbw-triptype-popover built in
   tropic-booking-widget.js (a native <select>'s own open dropdown
   can't be restyled to match the rest of the widget - no rounded
   corners, no custom highlight color, no shadow - same reason Flying
   From/To's real <select>s are hidden this same way). */
#gform_wrapper_3 #field_3_16 select.gfield_select {
  position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}

/* Adults / Children / Infants selects are replaced by the Passengers widget below */
#gform_wrapper_3 #field_3_6,
#gform_wrapper_3 #field_3_7,
#gform_wrapper_3 #field_3_8 {
  display: none !important;
}

.tbw-passengers {
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin-left: 22px;
}
.tbw-trigger {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: "Raleway", Arial, sans-serif;
  font-size: 15px;
  color: var(--tbw-ink);
  white-space: nowrap;
  font-weight: 600;
}
/* A drawn chevron (not a unicode glyph) so it renders the same crisp
   "v" shape, weight, and color as the browser's own native <select>
   arrow on Trip Type - a font-glyph triangle looked thinner/smaller
   than that native arrow, which is what prompted this. Shared by the
   Passengers trigger and the From/To triggers below. */
.tbw-chev {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.tbw-trigger:focus-visible { outline: 2px solid var(--tbw-teal); outline-offset: 2px; border-radius: 2px; }

.tbw-popover {
  position: absolute; top: calc(100% + 10px); left: 0; background: #fff;
  border: 1px solid var(--tbw-line); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(19,23,41,0.14);
  padding: 14px; z-index: 40; display: none; min-width: 270px;
}
.tbw-popover.tbw-open { display: block; }

.tbw-stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 2px; }
.tbw-stepper-row + .tbw-stepper-row { border-top: 1px solid #eee; }
.tbw-stepper-label strong { display: block; font-family: "Open Sans", Arial, sans-serif; font-size: 14px; color: var(--tbw-ink); font-weight: 700; }
.tbw-stepper-label span { display: block; font-family: "Open Sans", Arial, sans-serif; font-size: 11.5px; color: #8a8a8a; }
.tbw-stepper-controls { display: flex; align-items: center; gap: 12px; }
.tbw-step-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d8d5cc; background: #fff;
  color: var(--tbw-ink); font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.tbw-step-btn:hover:not(:disabled) { border-color: var(--tbw-teal); color: var(--tbw-teal); }
.tbw-step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tbw-step-val { min-width: 16px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-family: "Open Sans", Arial, sans-serif; font-size: 14px; }
.tbw-stepper-note { font-family: "Open Sans", Arial, sans-serif; font-size: 11px; color: #999; border-top: 1px solid #eee; margin-top: 6px; padding-top: 8px; }

/* Full-screen-only head/summary/footer for the Travelers popover - built
   into the markup always (see tropic-booking-widget.js), but only ever
   shown at the ≤767px breakpoint further down, where #tbw-pax-popover
   itself switches from a small anchored dropdown to a full-screen
   takeover. Hidden here so they never appear above that width. */
.tbw-pax-mobile-head, .tbw-pax-mobile-summary, .tbw-pax-mobile-foot { display: none; }

/* ---- row 2: From / To / Departure / Return / Search — each field is
   its OWN bordered box (not one merged strip). The row itself mirrors
   the reference booking widget's actual layout: the
   whole row is a flex container with From+To grouped as a flex:1 pair
   that absorbs any leftover width, while Departure, Return, and Search
   stay a fixed size - see the .tbw-fromto-group / .tbw-search-row rules
   below, and the wrapAll calls in tropic-booking-widget.js that build
   those two wrapper groups. Every field box gets the same height so
   From/To (two lines: a small label + the value) and Departure/Return
   (one line) line up evenly regardless of content. ---- */
#gform_wrapper_3 #field_3_1,
#gform_wrapper_3 #field_3_3,
#gform_wrapper_3 #field_3_5,
#gform_wrapper_3 #field_3_4 {
  box-sizing: border-box !important;
  border: 1px solid var(--tbw-line) !important;
  background: #fff !important;
  padding: 9px 14px !important;
  /* !important + both height and min-height: the theme has its own
     height rule for the (much shorter, single-line) native date fields
     that otherwise wins the cascade, which is why Departure/Return were
     rendering visibly shorter than From/To. */
  height: 56px !important;
  min-height: 56px !important;
  /* Sizing inside the flex row - From/To share whatever space is left
     equally, Departure/Return stay fixed (matching the reference, where
     the date fields don't grow either). !important beats the theme's
     own native width class. */
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
}
#gform_wrapper_3 .tbw-fromto-group #field_3_1,
#gform_wrapper_3 .tbw-fromto-group #field_3_3 {
  flex: 1 1 0;
  min-width: 0;
}
#gform_wrapper_3 .tbw-search-row #field_3_5,
#gform_wrapper_3 .tbw-search-row #field_3_4 {
  flex: 0 0 150px;
}
#field_3_5, #field_3_4 {margin-left: -2px !important;}

/* One-way trips have no return leg - Return disappears entirely instead
   of just sitting there dimmed (that's the separate "no departure chosen
   yet" state, handled in JS via opacity/pointer-events further down).
   Plain display: none - three earlier attempts at faking that with
   visibility: hidden + a zeroed-out box (so the calendar popover, once
   nested inside #field_3_4, would keep working) chased a new layout
   artifact each time: first a doubled flex `gap` next to the collapsed
   field, then that same gap forcing it onto a phantom wrapped line below
   1024px, then a residual dead strip once Depart's own basis was shrunk
   to make room for it. All three were symptoms of the same root cause -
   a visibility:hidden flex item, even at zero width/height, still
   COUNTS as a flex item and keeps drawing gap around itself, something
   only display:none actually avoids (confirmed live: manually forcing
   display:none in DevTools was the one thing that closed every version
   of the gap at once). display: none was avoided originally because the
   calendar popover (shared between Depart and Return) used to be
   appended inside #field_3_4's own .ginput_container_date, and display:
   none on an ancestor has no override for any descendant - it would
   have made the calendar unopenable from Depart the instant One Way was
   selected. tropic-booking-widget.js now appends the popover into
   .tbw-search-row directly instead (a sibling of #field_3_4, not a
   descendant), which sidesteps that problem entirely and is what makes
   plain display:none safe to use here. Toggled by
   tropic-booking-widget.js adding/removing .tbw-oneway on
   #gform_wrapper_3 whenever Trip Type changes - never via jQuery's own
   show()/hide(), which wouldn't know #field_3_4 needs `display:
   inline-flex` (not the browser's default guess) restored when switching
   back to Round Trip; a CSS class plus this rule's cascade handles that
   automatically instead. */
#gform_wrapper_3.tbw-oneway #field_3_4 {
  display: none !important;
}
#gform_wrapper_3 #field_3_1,
#gform_wrapper_3 #field_3_3 {
  position: relative;
}
#gform_wrapper_3 #field_3_1 select.gfield_select,
#gform_wrapper_3 #field_3_3 select.gfield_select {
  /* kept in the DOM for submission, but visually replaced by the tbw trigger */
  position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}
#gform_wrapper_3 #field_3_1 .ginput_container_select,
#gform_wrapper_3 #field_3_3 .ginput_container_select,
#gform_wrapper_3 #field_3_5 .ginput_container_date,
#gform_wrapper_3 #field_3_4 .ginput_container_date {
  width: 100%; min-width: 0;
}

.tbw-field-inner {display: flex;flex-direction: column;gap: 0;min-width: 0;width: 100%;}
.tbw-field-tag {
  font-family: "Open Sans", Arial, sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px; color: #8d8a80; text-transform: none;
}

.tbw-airport-trigger {
  all: unset; display: flex; align-items: center; gap: 6px; cursor: pointer; width: 100%;
  font-family: "Raleway", Arial, sans-serif; font-size: 15px; color: var(--tbw-ink);
}
.tbw-airport-trigger .tbw-chev {margin-top: -24px;}
.tbw-airport-trigger span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.tbw-airport-trigger .tbw-chev { margin-left: auto; }
.tbw-airport-trigger:focus-visible { outline: 2px solid var(--tbw-teal); outline-offset: 2px; }

/* Sits on the seam between the From and To boxes - sized and margined
   to match the reference's own swap control exactly (24px circle, -10px
   overlap into each neighbor), confirmed by inspecting it directly. */
.tbw-swap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--tbw-line);
  background: #fff;
  color: var(--tbw-teal);
  cursor: pointer;
  font-size: 12px;
  flex: 0 0 auto;
  margin: -18px -17px 0 -9px;
  z-index: 1;
  transition: transform 0.2s ease;
}
.tbw-swap-btn:hover { transform: rotate(180deg); border-color: var(--tbw-teal); }

/* ---- Layout groups built by tropic-booking-widget.js: From+To flex to
   fill leftover width, Departure/Return/Search stay fixed size - the
   same split the reference uses. Neither wrapper has its own visible
   background or border; they're pure layout, so each field still reads
   as its own individual box. ---- */
.tbw-fromto-group {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
}
.tbw-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  /* The calendar popover (tropic-booking-widget.js appends it here
     directly, as a sibling of Depart/Return rather than nested inside
     either one - see the .tbw-cal-popover rule further below) positions
     itself relative to whichever element is its nearest positioned
     ancestor. Making the row itself that ancestor, unconditionally
     rather than only below the mobile breakpoint, keeps that anchor
     point stable and predictable at every width. */
  position: relative;
}
/* The real Search button lives in the theme as position:absolute with a
   large negative top offset (a fixed-pixel hack to visually float it
   beside the fields, unrelated to their actual width) - now that it's a
   normal flex child of .tbw-search-row, that positioning is cleared so
   it sits where the row actually places it. */
#gform_wrapper_3 .tbw-search-row #gform_submit_button_3 {
  position: static !important;
  top: auto !important;
  margin: -21px 0 0 0 !important;
  flex: 0 0 auto;
  height: 56px;
}

.tbw-airport-list { max-height: 260px; overflow-y: auto; }
.tbw-airport-opt {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 4px; padding: 8px 8px;
  cursor: pointer; font-family: "Open Sans", Arial, sans-serif;
}
.tbw-airport-opt:hover { background: #f7f5ef; }
.tbw-airport-opt.tbw-selected { background: #faf3e8; }
.tbw-airport-opt .tbw-name { font-size: 13.5px; color: var(--tbw-ink); font-weight: 600; }

/* Trip Type's dropdown - a tighter list than the default .tbw-popover
   padding (a couple of short one-line choices, not a scrolling list of
   airports), with the currently-picked option shown as a solid filled
   row rather than the airport list's subtle tint - closer to the
   reference's own styling for this particular dropdown, using the
   widget's own ink/navy instead of copying its blue. */
.tbw-triptype-popover { min-width: 170px; padding: 6px; }
.tbw-triptype-opt {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 6px;
  padding: 10px 14px; margin-bottom: 2px;
  cursor: pointer; font-family: "Raleway", Arial, sans-serif;
  font-size: 14.5px; font-weight: 600; color: var(--tbw-ink);
}
.tbw-triptype-opt:last-child { margin-bottom: 0; }
.tbw-triptype-opt:hover:not(.tbw-selected) { background: #f7f5ef; }
.tbw-triptype-opt.tbw-selected { background: var(--tbw-ink); color: #fff; }

/* Date inputs: keep the real field (so it still submits + validates normally),
   just strip GF's default chrome and hide the calendar icon / keyboard hint */
#gform_wrapper_3 #field_3_5 .ginput_container_date,
#gform_wrapper_3 #field_3_4 .ginput_container_date {
  position: relative;
}
#gform_wrapper_3 input.datepicker.gform-datepicker {
  border: none !important; background: transparent !important; padding: 0 !important;
  font-family: "Raleway", Arial, sans-serif; font-size: 15px; color: var(--tbw-ink);
  cursor: pointer; caret-color: transparent;
  width: 100% !important; box-sizing: border-box;
}
#gform_wrapper_3 input.datepicker.gform-datepicker::placeholder { color: #9a9a9a; }
#gform_wrapper_3 input.datepicker.gform-datepicker:focus-visible { outline: 2px solid var(--tbw-teal); outline-offset: 2px; }
#gform_wrapper_3 .gform-datepicker-toggle,
#gform_wrapper_3 kbd[id^="keyboardHint_"] {
  display: none !important;
}

.tbw-cal-popover {
  position: absolute; top: calc(100% + 10px); right: 0; background: #fff;
  border: 1px solid var(--tbw-line); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(19,23,41,0.14);
  padding: 16px 18px 14px; z-index: 40; display: none; min-width: 540px;
  /* Explicit rather than relying on the default: this popover is a
     sibling of Return inside .tbw-search-row (see the append call in
     tropic-booking-widget.js), not nested inside it, so it no longer
     inherits pointer-events from Return's own "parked" (no departure
     chosen yet) dimmed state the way it would if it were still a
     descendant - kept anyway as an explicit, no-surprises default rather
     than leaving it implicit. */
  pointer-events: auto;
}
.tbw-cal-popover.tbw-open { display: block; }
.tbw-cal-months { display: flex; gap: 26px; }
.tbw-cal-month { flex: 1; }
.tbw-cal-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tbw-cal-month-head h4 { margin: 0; font-family: "Open Sans", Arial, sans-serif; font-size: 13.5px; font-weight: 700; color: var(--tbw-ink); }
.tbw-cal-nav {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ddd; background: #fff;
  color: #888; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.tbw-cal-nav:hover:not(:disabled) { border-color: var(--tbw-teal); color: var(--tbw-teal); }
.tbw-cal-nav:disabled { opacity: 0.25; cursor: not-allowed; }
.tbw-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-variant-numeric: tabular-nums; }
.tbw-cal-dow { font-family: "Open Sans", Arial, sans-serif; font-size: 10px; color: #999; text-align: center; font-weight: 700; padding-bottom: 4px; }
.tbw-cal-day {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 5px; font-size: 12.5px;
  color: var(--tbw-ink); cursor: pointer; font-family: "Raleway", Arial, sans-serif; font-weight: 600;
}
.tbw-cal-day:hover:not(:disabled) { background: #f7f5ef; }
.tbw-cal-day:disabled { color: #ccc; cursor: not-allowed; }
.tbw-cal-day.tbw-empty { visibility: hidden; }
.tbw-cal-day.tbw-selected { background: var(--tbw-gold); color: #fff; }
.tbw-cal-day.tbw-in-range { background: #f3e6d0; }
.tbw-cal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
.tbw-cal-hint { font-family: "Open Sans", Arial, sans-serif; font-size: 11.5px; color: #999; }
.tbw-btn-done {
  background: var(--tbw-ink); color: #fff; border: none; border-radius: 3px; padding: 8px 18px;
  font-family: "Open Sans", Arial, sans-serif; font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.tbw-btn-done:hover { opacity: 0.9; }

@media (max-width: 782px) {
  /* Popover left/right/width is handled for the whole ≤1023px range
     below (it needs the same fix at every width once Depart/Return
     share a row) - this just stacks the two months at very narrow
     widths, where they no longer fit side by side. */
  .tbw-cal-months { flex-direction: column; gap: 16px; }
}

/* ==========================================================================
   Mobile card layout — matches the reference's mobile widget: From/To on
   its own full-width row, Departure/Return sharing the row below that, and
   Search as a full-width centered pill beneath both (instead of the
   desktop's single wide row with Search squeezed in beside the dates).

   No DOM changes needed for this: tropic-booking-widget.js already groups
   the fields into .tbw-fromto-group and .tbw-search-row for the desktop
   layout (see the wrapAll calls there) - this just lets that same flex
   row wrap onto multiple lines below 1024px instead of forcing everything
   onto one, and restyles whatever ends up on each line.
   ========================================================================== */
@media (max-width: 1023px) {
  #gform_wrapper_3 .tbw-search-row {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  /* From/To (plus the swap button between them) fills its own line first -
     matches the reference, where Departure/Return/Search never share a
     row with From/To on a narrow screen. */
  #gform_wrapper_3 .tbw-search-row .tbw-fromto-group {
    flex: 1 1 100% !important;
    width: 100%;
  }

  /* Departure + Return share the next line, 50/50. The desktop -2px
     overlap (there only to remove a double border between boxes that sit
     directly beside each other) doesn't apply once Depart/Return are no
     longer adjacent to From/To - the row's own gap handles spacing here
     instead, so it's reset to 0. */
  #gform_wrapper_3 .tbw-search-row #field_3_5,
  #gform_wrapper_3 .tbw-search-row #field_3_4 {
    flex: 1 1 calc(50% - 6px);
    margin-left: 0 !important;
  }

  /* On a one-way trip, Return is gone (display:none - see the .tbw-oneway
     rule above) and Depart would otherwise sit alone at half width with
     empty space beside it - let it take the full line instead. Now that
     Return is display:none rather than merely zero-sized, it's a true
     non-participant in the row's flex layout: no width, no wrapped line
     of its own, and no `gap` drawn around it, so this one rule is all
     Depart needs (the extra gap-cancellation rules earlier versions of
     this fix needed here are gone along with the layout artifacts that
     made them necessary). */
  #gform_wrapper_3.tbw-oneway .tbw-search-row #field_3_5 {
    flex: 1 1 100%;
  }

  /* Search drops to its own full-width line as a centered pill. The
     desktop version's -21px top margin only existed to line the button
     up beside 56px-tall neighbors sharing its row - irrelevant now that
     it's alone on its own line, so it's replaced with normal spacing.
     The bottom margin is what keeps it from touching the promo-code
     strip directly below (that strip is a separate field, not part of
     this row, so the row itself has to carry the spacing). */
  #gform_wrapper_3 .tbw-search-row #gform_submit_button_3 {
    flex: 1 1 100% !important;
    width: 100%;
    margin: 4px 0 18px 0 !important;
    height: 52px;
    border-radius: 999px;
    text-align: center;
  }

  /* Every .gfield carries a theme/Gravity-Forms-default bottom margin
     (confirmed via live inspection of the actual staging site - it's
     what was creating a large gap between the From/To line and the
     Depart/Return line below it once the row started wrapping). It's
     invisible on desktop, where nothing sits below these fields inside
     the single-row .tbw-search-row, but once wrapped onto separate
     lines here it inflates each line's own height. Zeroed out for all
     four row fields so the row-gap above is the only spacing between
     wrapped lines. */
  #gform_wrapper_3 .tbw-search-row #field_3_1,
  #gform_wrapper_3 .tbw-search-row #field_3_3,
  #gform_wrapper_3 .tbw-search-row #field_3_5,
  #gform_wrapper_3 .tbw-search-row #field_3_4 {
    margin-bottom: 0 !important;
  }

  /* Removing that margin shrinks .tbw-fromto-group down to exactly the
     fields' own 56px height (it was previously being stretched taller
     by the margin baked into field_3_1/field_3_3's box) - which also
     shifts where "vertically centered" lands inside it. Re-centered here
     against the corrected (shorter) row height; see the swap-btn rule
     above for the desktop version this is overriding. */
  #gform_wrapper_3 .tbw-search-row .tbw-swap-btn {
    margin: 4px -17px 0 -9px;
  }

  /* The calendar popover is a direct child of .tbw-search-row (see that
     rule's own position:relative, set unconditionally further up, and
     the append call in tropic-booking-widget.js), so it's always
     anchored to the row itself rather than to Return specifically - on
     desktop that leaves it free to overflow left as needed since there's
     no shortage of horizontal room, but below this breakpoint the row is
     only as wide as the phone screen, so it needs to actually fill that
     width edge-to-edge instead of hanging off the default desktop
     min-width. */
  #gform_wrapper_3 .tbw-cal-popover {
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
  }

  /* The live theme also carries its own long-standing legacy responsive
     rule - `.hmb-form #field_3_16 { width: 100% !important; }` below
     567px - left over from before this plugin existed, meant to stack
     the old native layout's fields at very narrow widths. It collides
     with the new header row here: it stretches Trip Type to the full
     card width, which pushes the Passengers trigger down onto its own
     line instead of sitting beside it. Two IDs beats their one class +
     one ID, so this wins without needing to touch the theme's own CSS. */
  #gform_wrapper_3 #field_3_16 {
    width: auto !important;
  }
}

/* ==========================================================================
   Travelers popover — full-screen takeover on phones (matches the
   reference's mobile "Travelers" screen: a dark header bar with a close
   button, a summary line, the same stepper rows already used on
   desktop/tablet, and a full-width Continue pinned to the bottom that
   just closes the screen - it doesn't submit anything, the stepper
   buttons already write into the real fields as they're clicked).

   No structural changes needed to the steppers themselves - only
   #tbw-pax-popover's own position/size changes, plus the mobile-only
   head/summary/foot (already in the markup, hidden above this
   breakpoint by the base .tbw-pax-mobile-* rule above) become visible.
   ========================================================================== */
@media (max-width: 767px) {
  #tbw-pax-popover {
    display: none;
  }
  #tbw-pax-popover.tbw-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    /* Confirmed live against the actual staging site: both the theme's
       own fixed header AND the WordPress admin bar (visible while
       logged in, which is how this gets tested) sit at z-index: 99999.
       Reparenting to <body> (see tropic-booking-widget.js) escapes the
       stacking CONTEXT problem - an ancestor here otherwise caps
       anything nested inside it regardless of that element's own
       z-index - but the popover still needs to outrank those two
       elements directly once it's a sibling of them, hence this. */
    z-index: 999999;
    overflow-y: auto;
    background: #fff;
  }

  .tbw-pax-mobile-head {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    background: var(--tbw-ink);
    color: #fff;
    padding: 18px 48px;
    font-family: "Open Sans", Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    z-index: 2;
  }
  .tbw-pax-mobile-close {
    all: unset;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
  }

  .tbw-pax-mobile-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 20px 16px;
  }
  .tbw-pax-mobile-summary-label {
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 12.5px;
    color: #8a8a8a;
  }
  .tbw-pax-mobile-summary-value {
    font-family: "Raleway", Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--tbw-teal);
  }

  /* The stepper rows/note need no layout changes at this breakpoint -
     just a bit more side padding now that they're flush against a
     full-screen edge instead of a small anchored popover's own 14px
     padding, plus a top divider under the summary line (matching the
     reference's rule under "Travelers" / "1 Adult"). */
  #tbw-pax-popover .tbw-stepper-row {
    padding: 16px 20px;
  }
  #tbw-pax-popover .tbw-stepper-row:first-of-type {
    border-top: 1px solid #eee;
  }
  #tbw-pax-popover .tbw-stepper-note {
    padding: 14px 20px 20px;
    margin-top: 0;
  }

  .tbw-pax-mobile-foot {
    display: block;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    margin-top: auto;
  }
  .tbw-pax-mobile-continue {
    display: block;
    width: 100%;
    background: var(--tbw-ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 0;
    font-family: "Open Sans", Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
  }
  .tbw-pax-mobile-continue:hover {
    opacity: 0.92;
  }

  /* Stops the page underneath from scrolling while the full-screen
     Travelers takeover is open (tropic-booking-widget.js toggles this
     class on <body> alongside opening/closing the popover itself). */
  body.tbw-pax-open {
    overflow: hidden;
  }
}


@media (max-width: 479px) {
    #gform_wrapper_3 .tbw-search-row .tbw-swap-btn {
        margin: 0px -8px 0 -8px;
    }
}