/**
 * Flight search form (v3 design).
 *
 * Moved here verbatim from public/styles/home-v3.css, which is <link>ed only
 * when NEXT_PUBLIC_DESIGN_VERSION is "v3". The form is now the only flight
 * search there is, so its styling cannot depend on that flag — colocated and
 * imported by the component, it travels wherever the form is rendered. The
 * block was already marked "self-contained" in its old home.
 *
 * Rules below the moved block are new, for the parts the original design
 * mockup had no data for: a field that becomes its own search input, nearby
 * airports, and the traveller limit notice.
 */

/* ============ Flight / Cruise search fields (self-contained) ============ */
.fs-controls .fs-radio,
.fs-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-black);
}

.fs-controls input[type="radio"],
.fs-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-first, #f15a6a);
    margin: 0;
}

.fs-cabin-wrap .fs-cabin {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-black);
    padding: 2px 24px 2px 4px;
    min-width: 150px;
    width: auto;
    cursor: pointer;
    box-shadow: none;
}

.fs-cabin-wrap .fs-cabin:focus {
    box-shadow: none;
    outline: none;
}

.fs-fields {
    position: relative;
}

.fs-col {
    position: relative;
}

.fs-field {
    position: relative;
    height: 100%;
}

.fs-trigger {
    padding: 10px 16px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.fs-col:not(.fs-swap-col):not(:last-child) > .fs-field::after {
    content: none;
}
.fs-col:not(.fs-swap-col):not(:first-child) > .fs-field::after {
    content: '';
    position: absolute;
    right: 0;
    top: 18%;
    height: 64%;
    width: 1px;
    background: #e4e4e4;
}
.fs-fields .col-12:last-child .fs-field::after {content: none;}

.fs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.fs-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-black);
}

.fs-ic {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--color-second, #2f6271);
}

.fs-chevron {
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--color-text-content, #7a7a7a);
    transition: transform 0.25s ease;
}

.fs-field.open .fs-chevron {
    transform: rotate(180deg);
}

.fs-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-black);
    line-height: 1.2;
}

.fs-sub {
    font-size: 12px;
    color: var(--color-text-content, #7a7a7a);
    margin-top: 2px;
}

/*
 * Cabin Class as its own boxed field next to Travellers (one way / round
 * trip only — multi-city keeps the plain .fs-cabin-wrap select up in the
 * trip-type row, see FlightSearchFormV3). Reuses .fs-value's typography via
 * a shared className, so this only needs to strip the native <select>
 * chrome — .fs-head's own ChevronIcon is the dropdown affordance, matching
 * every other field, so the select must not draw a second arrow of its own.
 */
.fs-cabin-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
}

.fs-cabin-select:focus {
    box-shadow: none;
    outline: none;
}

/* Swap button */
.fs-swap-col {
    padding: 0 2px;
    flex: 0 0 auto;
    width: auto;
}

.fs-swap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #dfe3e4;
    background: var(--color-white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-second, #2f6271);
    transition: 0.2s ease;
}

.fs-swap:hover {
    background: var(--color-second, #2f6271);
    color: #fff;
    border-color: var(--color-second, #2f6271);
}

.fs-swap svg {
    width: 18px;
    height: 18px;
}

/* Dropdowns */
.fs-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 8px;
    min-width: 280px;
    max-width: 340px;
    background: var(--color-white, #fff);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
    padding: 10px;
    z-index: 1200;
    max-height: 360px;
    overflow-y: auto;
}
.fs-dropdown.fs-traveler-dd {min-width: 250px;}
.fs-field.open .fs-dropdown {
    display: block;
}

.fs-traveler-dd {
    right: 8px;
    left: auto;
    min-width: 300px;
}

/* ── CORP-ONLY (LEIS-934) ──────────────────────────────────────────────────
 * Cabin class, folded into the travellers panel as "Travellers & Class".
 * Chips rather than a native <select>: this sits inside an open popup, and a
 * select would open a second layer over it on mobile.
 */
.fs-cabin-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ececec;
}

.fs-cabin-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-black, #1f2933);
    margin-bottom: 8px;
}

.fs-cabin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fs-cabin-chip {
    border: 1px solid #e4e4e4;
    background: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text-content, #5a5a5a);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fs-cabin-chip:hover {
    border-color: #c9c9c9;
}

.fs-cabin-chip.is-selected {
    border-color: var(--fra-coral, #f45d6b);
    background: #fdecef;
    color: var(--fra-coral-dark, #d9434f);
}

.fs-cabin-chip:focus-visible,
.fs-bookingfor-field button:focus-visible {
    outline: 2px solid var(--fra-coral, #f45d6b);
    outline-offset: 2px;
}

/*
 * The Booking For panel. Wider than the travellers one: every row carries a
 * name AND a work email, and an email that ellipsises is an email nobody can
 * tell apart from their colleague's.
 */
.fs-bookingfor-dd {
    right: 8px;
    left: auto;
    min-width: 320px;
    max-width: 360px;
}

/* The trigger fills its cell so the whole box opens the panel, not just the
   text — the same reason the Cabin Class field wrapped its select in a label. */
.fs-bookingfor-field > button {
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
}

.fs-bookingfor-field > button[disabled] {
    cursor: default;
}

@media (max-width: 575.98px) {
    /* A 320px panel cannot sit inside a 320px viewport with a side offset. */
    .fs-bookingfor-dd {
        left: 8px;
        right: 8px;
        min-width: 0;
        max-width: none;
    }
}

/* Airport list */
.fs-airport-item,
.fs-airport-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    border-radius: 10px;
    cursor: pointer;
}

.fs-airport-item:hover,
.fs-airport-main:hover,
.fs-list-item:hover {
    background: var(--neutral-50, #f4f6f6);
}

.fs-code {
    min-width: 54px;
    height: 46px;
    border-radius: 8px;
    background: #f2f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-black);
    flex: none;
}

.fs-ap-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-black);
}

.fs-ap-city {
    color: var(--color-second, #2f6271);
}

.fs-ap-sub {
    font-size: 12px;
    color: var(--color-text-content, #7a7a7a);
}

.fs-corner {
    width: 18px;
    height: 18px;
    color: #b8bcbd;
    flex: none;
}

/* Generic list */
.fs-list-item {
    padding: 10px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-black);
}

/* Travelers counter */
.fs-counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 6px;
}

.fs-counter-row + .fs-counter-row {
    border-top: 1px solid #eee;
}

.fs-c-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-black);
}

.fs-c-sub {
    font-size: 12px;
    color: var(--color-text-content, #7a7a7a);
}

.fs-stepper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fs-step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #dcdfe0;
    background: var(--color-white, #fff);
    font-size: 18px;
    line-height: 1;
    color: var(--color-second, #2f6271);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fs-step:hover:not(:disabled) {
    background: var(--color-second, #2f6271);
    color: #fff;
    border-color: var(--color-second, #2f6271);
}

.fs-step:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fs-num {
    min-width: 18px;
    text-align: center;
    font-weight: 600;
    color: var(--color-text-black);
}

/* Date field (uses hotel calendar) */
.fs-date-box {
    position: relative;
    padding: 10px 16px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

/*
 * The cross that clears a return date, in the corner the chevron would have.
 *
 * Sits in `.fs-head`'s flow rather than absolutely in the box, so it can never
 * land on top of the date below it — the head row is its own line in both the
 * hero panel and the sticky bar, and `space-between` already puts a trailing
 * child hard against the right edge.
 *
 * Small on a pointer, where the click is precise and a 44px square in a 140px
 * sticky-bar cell would swallow presses meant to open the calendar. Below the
 * breakpoint where the fields stack full-width there is room for the real touch
 * target, and the rule at the bottom of this file gives it one.
 */
.fs-date-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    /* `--color-content`, not the `--color-text-content` the chevron above asks
       for: that name is not defined anywhere, so it has always been the #7a7a7a
       fallback and has always been that grey in dark mode too. A control the
       traveller has to find should not inherit a typo, and the real token
       carries its own light-dark() pair. */
    color: var(--color-content);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fs-date-clear:hover,
.fs-date-clear:focus-visible {
    background: var(--color-blue-light);
    color: var(--color-first);
}

.fs-date-clear:focus-visible {
    outline: 2px solid var(--color-first);
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .fs-date-clear { transition: none; }
}

.fs-date-val {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

/* Multi-city segments */
.fs-multi-rows .fs-seg,
.fs-seg-template {
    border: 1px solid #dfe4e6;
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
}

.fs-seg-x-col {
    width: 56px;
    flex: 0 0 56px;
}

/* The rule above never actually applied: the element also carries Bootstrap's
   `.col-auto`, which sets `width: auto` at the same (0,1,0) specificity and won
   on load order — so the column collapsed onto the button and the remove
   control ended up 0-1px from the segment card's border. Two classes deep here
   so it beats `.col-auto` outright.
   Confined to >=768px because the max-width:767px block further down
   deliberately gives this column its own full-width row on mobile, and a media
   query adds no specificity of its own to protect it. */
@media (min-width: 768px) {
    .fs-multi-rows .fs-seg .fs-seg-x-col,
    .fs-seg-template .fs-seg-x-col {
        width: 56px;
        flex: 0 0 56px;
    }
}

/* Previously #e2c6c6 / #d85a5a — a muddy red that belongs to no part of the
   palette, sitting next to the real accent (--color-second) and reading as a
   mistake. Removing a leg is also not a destructive-red action at rest: it is a
   quiet secondary control that only needs to look dangerous once you are
   actually pointing at it. So: neutral at rest, accent on hover. */
/* 28px, not 34px: the column is 56px wide, so a 34px circle left only 11px a
   side and its edge landed flush against the segment card's border and the
   field divider next to it — it read as crowded rather than centred. At 28px
   there is 14px of air on each side. */
.fs-seg-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--review-flight-border, #dfe7ea);
    background: var(--color-white, #fff);
    color: var(--color-content, #474646);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.fs-seg-remove:hover:not(:disabled) {
    background: var(--color-second-light, #ffe3e5);
    color: var(--color-second, #f45d6b);
    border-color: var(--color-second, #f45d6b);
}

.fs-seg-remove:focus-visible {
    outline: 2px solid var(--color-first, #2f6271);
    outline-offset: 2px;
}

.fs-seg-remove:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.fs-seg-remove svg {
    width: 13px;
    height: 13px;
}

.fs-add-flight {
    border: none;
    background: transparent;
    color: var(--color-second, #2f6271);
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    margin-left: 6px;
    cursor: pointer;
}

.fs-add-flight:hover {
    text-decoration: underline;
}

/* Compact traveler in multi top bar */
.fs-trav-inline {
    position: relative;
}

.fs-trav-inline-trg {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    min-height: auto;
}

.fs-trav-inline-trg .fs-value {
    font-size: 14px;
    font-weight: 500;
}

.fs-trav-inline-trg .fs-sub {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-content, #7a7a7a);
}

.fs-trav-inline-trg .fs-chevron {
    margin-left: 2px;
}

.fs-trav-inline .fs-traveler-dd {
    top: calc(100% + 6px);
}

/* Responsive */
@media (max-width: 991px) {
    .fs-dropdown {
        left: 8px;
        right: 8px;
        min-width: auto;
        max-width: none;
    }

    .fs-traveler-dd {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 767px) {
    /* Neutralise the legacy hotel-form mobile rule for flight/cruise rows */
    .search-form-wrap form .fs-fields > div:not(:last-child) {
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .fs-col:not(.fs-swap-col):not(:last-child) > .fs-field::after {
        display: none;
    }

    .fs-col:not(.fs-swap-col):not(:last-child) > .fs-field {
        border-bottom: 1px solid #e8eef1;
    }

    .fs-swap-col {
        width: 100%;
        padding: 4px 14px !important;
        justify-content: flex-end !important;
    }

    .fs-swap {
        width: 30px;
        height: 30px;
    }

    .fs-swap svg {
        transform: rotate(90deg);
    }

    .fs-cabin-wrap .fs-cabin {
        min-width: auto;
        max-width: 180px;
    }

    .fs-controls {
        gap: 12px 16px !important;
    }

    .fs-dropdown,
    .fs-traveler-dd {
        left: 8px;
        right: 8px;
        min-width: auto;
        max-width: none;
    }

    /* Multi-city: remove button on its own row.
       Two classes deep for the same reason as the desktop rule above — as a
       bare `.fs-seg-x-col` this lost to Bootstrap's `.col-auto { width: auto }`
       on load order, so the intended full-width row never happened and the
       button sat collapsed against the left edge of the card instead of at its
       right. */
    .fs-multi-rows .fs-seg .fs-seg-x-col,
    .fs-seg-template .fs-seg-x-col {
        width: 100%;
        flex: 0 0 100%;
        justify-content: flex-end !important;
        padding: 6px 14px;
    }
}
/* ============ Live-data additions ============ */

/*
 * The value line doubles as the search box once the field is open, so it has to
 * shed every input default and inherit the type it is replacing — otherwise the
 * text visibly jumps size and weight on the click that opens it.
 */
/* ---- Search box inside the airport dropdown ----
   The field's trigger keeps showing the chosen airport; typing happens here.
   Sticky so it survives the panel's own scroll, with a matching background so
   rows pass behind it rather than showing through. */
.fs-dd-search {
  position: sticky;
  top: -10px; /* cancels .fs-dropdown's 10px padding so nothing peeks above */
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px -10px 6px;
  padding: 12px 14px;
  background: var(--color-white, #fff);
  border-bottom: 1px solid var(--color-light1, #e5e7eb);
  border-radius: 14px 14px 0 0;
}

.fs-dd-search-icon {
  flex: none;
  color: var(--color-text-content, #7a7a7a);
}

.fs-dd-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-black);
  outline: none;
}

.fs-dd-input::placeholder {
  font-weight: 400;
  color: var(--color-text-content, #9aa0a6);
}

.fs-dd-search-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 28px plus the row's 12px padding clears the 44px touch target without
     making the search row taller than the input needs. */
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-content, #7a7a7a);
  cursor: pointer;
}

.fs-dd-search-clear:hover {
  background: var(--neutral-50, #f4f6f6);
}

.fs-dd-search-clear:focus-visible,
.fs-dd-input:focus-visible {
  outline: 2px solid var(--color-first);
  outline-offset: 2px;
  border-radius: 6px;
}


/* An unfilled field reads as a prompt, not as a value. */
.fs-placeholder {
  color: var(--color-content, #6b7280);
  opacity: 0.65;
  font-weight: 400;
}

/*
 * The one placeholder that is a sentence rather than a field name — the
 * one-way return field's "Tap to add a return date & save more".
 *
 * Every other placeholder is a word or two and sits comfortably at .fs-value's
 * 16px. This one is sell copy in a fixed-width cell, where 16px forces a wrap
 * and makes a hint shout louder than the values around it. Scoped to the
 * placeholder span alone: the moment a date is picked it is replaced by
 * .fs-value's own typography, unchanged, and so is the short "Return" prompt
 * once the search is already a round trip.
 *
 * 13px, not smaller — below 12px stops being small copy and starts being hard
 * to read.
 */
.fs-placeholder--sentence {
  font-size: 13px;
  line-height: 1.35;
}

/* Heading over the airports grouped under a city result. */
.fs-nearby-label {
  padding: 6px 14px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-content, #6b7280);
}

.fs-nearby-radius {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

/* Searching / no results / type-to-search — informational, never clickable. */
.fs-list-note {
  color: var(--color-content, #6b7280);
  font-size: 13px;
  cursor: default;
}

.fs-list-note:hover {
  background: transparent;
}

/*
 * Names whichever traveller limit the current selection is sitting on. Sits
 * under the counters, inside the same panel, so the explanation is next to the
 * "+" it explains.
 */
.fs-traveler-notice {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--color-light1, #e5e7eb);
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-content, #6b7280);
}

/*
 * The one problem a field can hold without the traveller having done anything
 * wrong yet: a destination equal to the origin. Coloured rather than shouted —
 * it is guidance for a search not yet submitted, not a failure.
 */
.fs-sub-warning,
.fs-list-note-warning {
  color: var(--color-second, #f45d6b);
}

/* ============ Calendar ============ */

/*
 * The calendar is rendered through a portal onto <body> (portalId
 * "v3-datepicker-portal"), so it sits outside .fs-form and outside
 * .search-form-wrap — nothing scoped to the form can reach it. Everything it
 * needs is scoped to the portal instead.
 */
#v3-datepicker-portal .react-datepicker {
  /*
   * react-datepicker lays months out by floating them inside an inline-block
   * parent, and that parent shrink-wraps to the width of ONE month — so a
   * two-month calendar folded into a vertical column, with the second month
   * below the fold of the popup. A flex row is what actually puts them side by
   * side.
   */
  display: flex;
  font-family: var(--font-family-content), sans-serif;
  border: 1px solid var(--color-light1, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

/* Separates the two months without a heavy rule between them. */
#v3-datepicker-portal .react-datepicker__month-container + .react-datepicker__month-container {
  border-left: 1px solid var(--color-light1, #e5e7eb);
}

#v3-datepicker-portal .react-datepicker-popper {
  z-index: 1100;
}

/*
 * Keeps the popup on screen near the right-hand edge — the Return field is the
 * last one in the row, and a two-month calendar opening from it would otherwise
 * run past the viewport.
 */
#v3-datepicker-portal .react-datepicker__month-container {
  padding: 2px 4px 6px;
}

/*
 * Phantom selection markers in the adjacent month.
 *
 * With monthsShown={2}, react-datepicker still renders the days that overlap
 * the neighbouring month, but blanks their label (monthShowsDuplicateDaysStart
 * / End) so the same date is not printed twice. It does NOT stop applying the
 * selection classes to them — so picking 30 Sep painted a coral dot in the
 * empty leading cell of October, and in round-trip mode the return range
 * painted dots into September's empty trailing cells too. Verified in the DOM:
 * the cell is `textContent: ""`, `childNodes.length: 0`, `--selected`,
 * `background: rgb(244, 93, 107)`.
 *
 * `:empty` is what separates the two kinds of outside-month day. The first
 * month's leading days are real, labelled dates (30, 31 of the previous month)
 * and must keep rendering; only the deliberately blanked duplicates match
 * `:empty`, and a cell with nothing in it has nothing to legitimately paint.
 *
 * `visibility` rather than `display: none` so the cell still occupies its slot
 * and the week grid does not reflow.
 */
#v3-datepicker-portal .react-datepicker__day--outside-month:empty {
  visibility: hidden;
  pointer-events: none;
}

/*
 * Two dates, not a block of twelve.
 *
 * A flight has a departure and a return — the days between them are not
 * travelled, not chosen, and not bookable from this calendar. react-datepicker
 * paints them anyway: giving it `startDate`/`endDate` (which this form must, to
 * mark both ends at once) also stamps `--in-range` on every day between, and the
 * library's own stylesheet fills those solid #216ba5. Picking 13 -> 24 October
 * therefore coloured all twelve days, reading as twelve selected dates.
 *
 * A hotel stay IS the whole span, so the range fill is right there and is left
 * alone: hotels use <ui/DatePicker> and render into the default popper, while
 * every flight calendar renders into #v3-datepicker-portal. The id prefix is
 * what keeps the two apart, which is why these rules carry it.
 *
 * Ordering is load-bearing. The endpoints also carry `--in-range`, so the rule
 * that strips the fill has to come first and the one that puts it back on the
 * two ends second; the same applies to the hover pair below it.
 */
#v3-datepicker-portal .react-datepicker__day--in-range,
#v3-datepicker-portal .react-datepicker__day--in-selecting-range {
  background-color: transparent;
  color: inherit;
}

#v3-datepicker-portal .react-datepicker__day--range-start,
#v3-datepicker-portal .react-datepicker__day--range-end,
#v3-datepicker-portal .react-datepicker__day--selecting-range-start {
  background-color: var(--color-second, #f45d6b);
  color: #fff;
}

/*
 * Hover, restated because the rules above outrank custom-fixes.css's
 * `.react-datepicker__day:hover` — an id beats two classes — and a day that
 * stops responding to the pointer reads as disabled.
 */
#v3-datepicker-portal .react-datepicker__day--in-range:hover,
#v3-datepicker-portal .react-datepicker__day--in-selecting-range:hover {
  background-color: var(--color-second-light, #f9a8b0);
  color: inherit;
}

#v3-datepicker-portal .react-datepicker__day--range-start:hover,
#v3-datepicker-portal .react-datepicker__day--range-end:hover,
#v3-datepicker-portal .react-datepicker__day--selecting-range-start:hover {
  background-color: var(--color-second, #f45d6b);
  color: #fff;
}


@media (max-width: 767.98px) {
  /*
   * One month below this width (FlightDateFieldV3 drops monthsShown to 1), so
   * the row rule is moot; what matters is that the popup cannot be wider than
   * the screen it is sitting on.
   */
  #v3-datepicker-portal .react-datepicker {
    max-width: calc(100vw - 24px);
  }
}

/* ---------------------------------------------------------------------------
   Flight SRP hero spacing

   The shared `.hero-banner-section` is tuned for the home page, where the band
   is the whole viewport and a generous run-out below it is the point. On a
   search results page the band is just the form, and the same values stacked up
   to a measured 156px of empty space between the form and the first result:

       48px  .hero-banner-section padding-bottom (the py-5 utility)
     + 60px  .hero-banner-section margin-bottom
     + 48px  the results section's own padding-top
     = 156px

   The results are what the page is for, so they should not start most of a
   screen down. Scoped to this class rather than changed on
   `.hero-banner-section` itself, which the home hero and the hotel SRP also
   use. Specificity is two classes so it beats Bootstrap's `.py-5` utility
   without needing !important.
   --------------------------------------------------------------------------- */
.hero-banner-section.flight-srp-hero {
    padding-bottom: 2rem;
    margin-bottom: 0;
}

/* ============ Suggestions (empty airport dropdown) ============
   Shown before anything is typed: recent picks, then a curated list. Shares
   .fs-airport-main / .fs-code / .fs-ap-* with the search results so typing
   filters the panel rather than replacing it with a different-looking one. */

/* Same treatment as .fs-nearby-label, which names the rows grouped under a
   city result — both are "here is what the next few rows are". Kept separate
   because that one's name describes nearby airports specifically. */
.fs-section-label {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-content, #6b7280);
}

.fs-section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fs-section-clear {
  padding: 0;
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-second, #f45d6b);
  cursor: pointer;
}

.fs-section-clear:hover {
  text-decoration: underline;
}

.fs-section-clear:focus-visible {
  outline: 2px solid var(--color-first);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================================
   Compact variant — the results page's sticky search bar.

   Everything below is scoped under .fs-compact so the hero panel's layout is
   untouched. The field components themselves (.fs-field, .fs-dropdown,
   .fs-trigger) are shared verbatim; only the arrangement changes.
   ========================================================================== */

.fs-compact {
    padding: 8px 0;
}

.fs-compact-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

/* Each cell is a bordered box, like MakeMyTrip's. The shared .fs-field inside
   carries its own label and value, so the box only has to size it. */
/*
 * One height for every cell.
 *
 * `align-items: stretch` alone was not enough: the date fields wrap a shared
 * `.fs-trigger`, whose 64px min-height is sized for the hero panel, so they
 * drove the row taller than the cells that carry only a label and a value —
 * which is why Cabin Class and Travellers looked short next to Depart. The
 * override below neutralises that min-height inside compact cells, and this
 * min-height then sets the row's rhythm explicitly rather than leaving it to
 * whichever child happens to be tallest.
 */
.fs-compact-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /*
     * An explicit height, not a minimum.
     *
     * `align-items: stretch` was supposed to equalise these, but three of the
     * cells are also `.fs-field`, which carries `height: 100%` — and a
     * percentage height against a row with no definite height of its own is not
     * something to reason about at a glance, let alone rely on. The cells also
     * hold different line counts (From/To show city *and* country; Depart and
     * Cabin show one value), so any emergent height is whatever the tallest
     * child happened to be that render.
     *
     * Pinning it makes the row's rhythm a decision rather than a side effect.
     * Content is centred and already truncates, so a cell cannot outgrow it.
     */
    height: 60px;
    padding: 4px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--color-white);
}

/* The hero's tall trigger padding does not belong in a pinned bar. */
.fs-compact-cell .fs-trigger {
    min-height: 0;
    height: 100%;
    padding: 4px 10px;
}

/*
 * Date cells need the same reset, and were never getting it.
 *
 * The note above `.fs-compact-cell` says the date fields wrap a shared
 * `.fs-trigger`. They do not — FlightDateFieldV3's custom input renders
 * `.fs-date-box`, which carries its own `min-height: 64px` and `10px 16px`
 * padding. So inside a 60px cell the box stood 4px taller than the cell that
 * was meant to size it, and ate 26px of side padding where every other cell
 * uses 10px. With ~52px of padding in a fixed-width cell, "Thu, Sep 24 2026"
 * had nowhere to go and ellipsised to "Thu, Sep 24 ...".
 */
.fs-compact-cell .fs-date-box {
    min-height: 0;
    height: 100%;
    padding: 4px 10px;
}

/* The compact bar's own type scale, which the date cells were also missing:
   `.fs-compact-grow` sets it for From/To, but the date cells are not grow
   cells, so their value rendered at the hero's 16px beside a 14px "Mumbai". */
.fs-compact-date .fs-value {
    font-size: 14px;
    line-height: 1.25;
}

.fs-compact-date .fs-label {
    font-size: 10px;
    line-height: 1.3;
}

/* From / To grow to share whatever the fixed-width cells leave. */
.fs-compact-grow {
    flex: 1 1 0;
    padding: 0;
}

.fs-compact-trip { flex: 0 0 118px; }
.fs-compact-cabin { flex: 0 0 148px; }
/*
 * CORP-ONLY (LEIS-934): Booking For, in the column the separate Cabin Class
 * cell used to hold — cabin moved into the Travellers panel to free it.
 *
 * Wider than that cell was, because this one carries a person's name rather
 * than one of four known words. It still truncates, so the full name and email
 * stay in the panel and on the chip above the results.
 */
.fs-compact-bookingfor { flex: 0 0 168px; }
/*
 * Both date cells, sized to their content with a shared floor.
 *
 * Not a fixed width. A date is the one value in this bar whose length is set
 * by the format string rather than by anything we control, and a basis chosen
 * to fit "Thu, Sep 24 2026" today truncates the moment the format, the font or
 * the locale moves — which is exactly how it came to read "Thu, Sep 24 ...".
 * Letting the cell size itself means the date always fits by construction.
 *
 * `0 0 auto` rather than `0 1 auto`: shrinking is what produces the ellipsis,
 * and there is nothing to shrink for — below 1200px the row wraps instead of
 * competing for width. The floor keeps Depart and Return the same width in the
 * common case, since "Select Return" is shorter than any date it stands in for.
 */
.fs-compact-date {
    flex: 0 0 auto;
    min-width: 140px;
}

/* Wide enough for "2 Adults, 2 Children" without the companions line escaping
   the box — the old 134px is what pushed it onto Cabin Class. */
.fs-compact-travelers { flex: 0 0 172px; }

/*
 * Overflowing TEXT is clipped, the cell itself is not.
 *
 * `overflow: hidden` on the cell would be the obvious fix for a label escaping
 * its box — and it would also make the cell a clipping context, trapping the
 * airport, traveller and calendar panels that open out of it. That is the same
 * mistake that trapped them inside the sticky bar. So the clip goes on the text
 * that overflows, never on the box that has to let a panel out.
 */
.fs-compact-cell .fs-value,
.fs-compact-cell .fs-sub,
.fs-compact-cell .fs-label,
.fs-compact-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.fs-compact-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-content, #7a7a7a);
}

.fs-compact-select {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-black);
    outline: none;
    /* The cell is the control; a second native arrow inside it reads as a
       nested widget. */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.fs-compact-select:focus-visible {
    outline: 2px solid var(--color-first);
    outline-offset: 2px;
    border-radius: 4px;
}

/* The shared field fills its cell rather than keeping the hero's tall padding. */
.fs-compact-grow .fs-field {
    height: 100%;
}

/* Travellers stacks label over value like every other cell, instead of the
   hero's side-by-side row. */
.fs-compact-travelers {
    position: relative;
    padding: 4px 10px;
    cursor: pointer;
}

.fs-compact-trav-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.fs-compact-trav-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-compact-trav-trigger:focus-visible {
    outline: 2px solid var(--color-first);
    outline-offset: 2px;
    border-radius: 4px;
}

/* The panel has to escape the cell's own clip, so it is positioned against the
   row instead. */
.fs-compact-travelers .fs-dropdown {
    left: auto;
    right: 0;
}

/* Trip type / cabin class: a short list, so the panel only needs to be as wide
   as its longest option rather than the 280px an airport search needs. */
.fs-choice-dd {
    min-width: 168px;
    max-width: none;
    left: 0;
}

.fs-choice-dd .fs-list-item.is-selected {
    background: var(--color-blue-light3);
    color: var(--color-first);
    font-weight: 600;
}

/*
 * The caret is positioned, not laid out.
 *
 * Making `.fs-compact-trav-value` a flex row to sit the caret beside the text
 * would have cost the ellipsis: `text-overflow` needs the overflowing text in
 * a block, and there is no element wrapping it to move the truncation onto.
 * Taking the caret out of flow keeps the value a plain truncating block, and
 * the padding below reserves the space it occupies.
 */
.fs-compact-caret {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--color-text-content, #7a7a7a);
    pointer-events: none;
}

.fs-compact-trip .fs-compact-trav-value,
.fs-compact-cabin .fs-compact-trav-value {
    padding-right: 20px;
}

.fs-compact-cell.fs-field.open .fs-compact-caret {
    transform: translateY(-50%) rotate(180deg);
}
.fs-compact-grow .fs-trigger {
    min-height: 0;
    padding: 4px 10px;
}
.fs-compact-grow .fs-value { font-size: 14px; line-height: 1.25; }
.fs-compact-grow .fs-label { font-size: 10px; line-height: 1.3; }
/* Three lines (label, city, country) have to sit inside the same 60px as every
   two-line cell, so the country line is tightened rather than the box grown. */
.fs-compact-grow .fs-sub { font-size: 11px; line-height: 1.25; }

.fs-compact-swap {
    flex: 0 0 auto;
    align-self: center;
}

/* ---- Multi-city: every leg folded into one route summary ----
   Sized like the From + To pair it stands in for, rather than `flex: 1 1 0`,
   which let one cell swallow the whole bar and left a route name floating in
   several hundred pixels of empty box. It still shrinks below this on a narrow
   viewport, and truncates when the chain outgrows it. */
.fs-compact-multi {
    flex: 1 1 auto;
    min-width: 200px;
}

.fs-compact-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-black);
    cursor: pointer;
    text-align: left;
}

/* A six-leg chain is longer than its cell; truncate rather than wrap, which
   would change the bar's height and move everything pinned below it. */
.fs-compact-summary-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-compact-summary-caret {
    display: inline-flex;
    flex: none;
    transition: transform .2s ease;
}
.fs-compact-summary-caret.is-open { transform: rotate(180deg); }

.fs-compact-summary:focus-visible {
    outline: 2px solid var(--color-first);
    outline-offset: 2px;
    border-radius: 4px;
}

.fs-compact-search {
    flex: 0 0 auto;
    /* Centred in the band rather than stretched to it: a button as tall as a
       two-line field reads as a panel, not a control. */
    align-self: center;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 116px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: var(--color-second);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white-same);
    cursor: pointer;
}

.fs-compact-search:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.fs-compact-search:focus-visible {
    outline: 2px solid var(--color-first);
    outline-offset: 2px;
}

/* Second line — where MakeMyTrip puts fare type. */
.fs-compact-second {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 2px 0;
}

/* The leg editor that drops out of the route summary. Not a scroll container:
   the same `overflow` that would cap it also clips the airport dropdowns
   inside it. */
.fs-compact-legs {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--bs-border-color);
}

.fs-compact-legs .fs-seg + .fs-seg { margin-top: 8px; }

/* Below lg the row cannot hold nine cells; wrap into a grid instead of
   squeezing every field past legibility. */
@media (max-width: 1199.98px) {
    .fs-compact-row { flex-wrap: wrap; }
    .fs-compact-grow { flex: 1 1 200px; }
    .fs-compact-search { flex: 1 1 100%; min-height: 40px; }
}

@media (max-width: 575.98px) {
    .fs-compact-trip,
    .fs-compact-cabin,
    .fs-compact-travelers,
    /* Full width here like every other fixed cell — a 154px date box stranded
       beside full-width neighbours reads as a layout bug rather than a choice,
       and the one-way prompt gets a whole line to itself. */
    .fs-compact-date { flex: 1 1 100%; }
    .fs-compact-grow { flex: 1 1 100%; }
    .fs-compact-swap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fs-compact-summary-caret { transition: none; }
}

/*
 * Touch target for the return-date cross.
 *
 * Only below 768px, where `.fs-col` and `.fs-compact-date` are full-width rows
 * rather than cells competing for a line — there the 44px square fits beside a
 * label with room to spare, while on a desktop row it would cover the part of
 * the field a pointer uses to open the calendar. The icon inside keeps its
 * size; only the area that answers a finger grows.
 */
@media (max-width: 767.98px) {
    .fs-date-clear {
        width: 44px;
        height: 44px;
        /* Pulled back out of the head row so the taller button does not add
           30px to a field whose height the grid depends on. */
        margin: -11px -11px -11px 0;
    }
}
