/* ==========================================================================
   Component — Unified Search Widget
   One widget, four service panels. The tab strip switches [data-service] on
   the widget root, which re-tints the whole component through --wu-service.

   Markup contract (see includes/search-widget.html):
     .wu-search[data-service="hotel"]
       > .wu-search-tabs > button[data-service-tab="hotel"].is-active
       > .wu-search-panels
           > .wu-search-panel[data-service-panel="hotel"].is-active
   ========================================================================== */

/* Frosted-glass panel.
   The blur is what makes this readable — plain alpha would let the hero
   gradient show through as noise directly behind the labels. saturate() puts
   back the colour that blurring washes out, which is what stops it looking
   like grey fog.

   Tokens are re-pointed rather than each child being restyled, so the tabs,
   fields, swap button and popovers all pick up the same glass system. */
.wu-search {
  /* Fields stay more solid than the panel: their borders and placeholder text
     have to survive against whatever the widget floats over. */
  --wu-surface:     rgba(255, 255, 255, .72);
  --wu-surface-alt: rgba(255, 255, 255, .45);
  /* The muted token clears 4.5:1 on pure white (5.71:1) but drops below
     AA the moment the surface goes translucent. Muted text is darkened inside
     the widget to keep inactive tab labels legible over the hero. */
  --wu-text-muted:  #33403A;
  position: relative;
  z-index: var(--wu-z-base);
  background: rgba(255, 255, 255);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 20px 50px rgba(17, 24, 39, .18);
  overflow: visible;
}

/* Floating over a hero image.
   The overlap is deliberately deep: glass only reads against something
   colourful, and below the hero the page is plain white — where a translucent
   white panel is indistinguishable from a solid one. Reduce this and the
   effect fades with it. */
.wu-search-floating {
  position: relative;
  z-index: var(--wu-z-base);
  margin-top: calc(var(--wu-search-overlap) * -1);
}

/* --- Service tabs -------------------------------------------------------- */
.wu-search-tabs {
  display: flex;
  gap: var(--wu-space-1);
  /* The four tabs need 411px and a phone has 286-356, so the row scrolls and
     says so the same way the type chips do. No padding under them: the bar
     takes its own 6px only on the widths where it is drawn, and the active
     tab's marker keeps sitting on the divider everywhere else. */
  padding: var(--wu-space-2) var(--wu-space-2) 0;
  overflow-x: auto;
}
@supports not selector(::-webkit-scrollbar) {
  .wu-search-tabs {
    scrollbar-width: thin;
    scrollbar-color: var(--wu-border-strong) transparent;
  }
}
.wu-search-tabs::-webkit-scrollbar { height: 6px; }
.wu-search-tabs::-webkit-scrollbar-track { background: transparent; }
.wu-search-tabs::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--wu-border-strong);
}

.wu-search-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  padding: 0.85rem 1.35rem;
  border: 0;
  /* The active tab carries a tint, so without this it was a square block
     sitting on a panel where everything else is rounded. Top corners only:
     the bottom edge meets the divider the active marker sits on. */
  border-radius: var(--wu-radius) var(--wu-radius) 0 0;
  background: transparent;
  color: var(--wu-text-muted);
  font-family: inherit;
  font-size: var(--wu-fs-sm);
  font-weight: var(--wu-fw-semibold);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--wu-duration-sm) var(--wu-ease),
              background-color var(--wu-duration-sm) var(--wu-ease);
}
.wu-search-tab svg { width: 18px; height: 18px; }
.wu-search-tab:hover { color: var(--wu-heading); background: var(--wu-surface-alt); }

.wu-search-tab.is-active {
  color: var(--wu-service);
  background: color-mix(in srgb, var(--wu-service) 10%, transparent);
  position: relative;
}
.wu-search-tab.is-active::after {
  content: "";
  position: absolute;
  left: var(--wu-space-3);
  right: var(--wu-space-3);
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--wu-service);
}

/* --- Panels -------------------------------------------------------------- */
.wu-search-panels { padding: var(--wu-space-5); border-top: 1px solid var(--wu-border); }

.wu-search-panel { display: none; }
.wu-search-panel.is-active { display: block; animation: wu-fade-in var(--wu-duration) var(--wu-ease-out); }

/* Field row — collapses to one column on mobile (responsive.css) */
.wu-search-row {
  display: grid;
  gap: var(--wu-space-3);
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

/* Submit cell keeps its intrinsic width on desktop */
.wu-search-row .wu-search-submit { grid-column: span 1; }
/* 48px against the row's 45px fields is deliberate, not drift: .wu-search-row
   aligns to `end`, so both bottoms sit on the same line and the submit simply
   stands 3px taller — the one control on the page that should. A consistency
   sweep will flag it as a third button height; it is a documented variant. */
.wu-search-submit .wu-btn { height: 48px; }

/* Trip-type radios (one-way / round-trip / multi-city) */
.wu-search-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wu-space-4);
  margin-bottom: var(--wu-space-4);
}
.wu-search-option {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-sm);
  cursor: pointer;
}
.wu-search-option input { accent-color: var(--wu-service); }

/* Swap origin/destination button — flights & transfers.
   Lives inside the SECOND field's .wu-autocomplete wrapper, whose box is
   exactly the input: top:50% is then the input's true vertical centre, not the
   field's (which would drift with the label above and the error slot below).
   Horizontally it is pulled back half the grid gap, so it straddles the seam
   between the two inputs. */
.wu-swap-btn {
  position: absolute;
  top: 50%;
  left: calc(var(--wu-space-3) / -2);
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wu-border);
  border-radius: 50%;
  background: var(--wu-surface);
  color: var(--wu-text-muted);
  cursor: pointer;
  transition: color var(--wu-duration-sm) var(--wu-ease),
              border-color var(--wu-duration-sm) var(--wu-ease),
              transform var(--wu-duration-sm) var(--wu-ease);
}
.wu-swap-btn:hover {
  color: var(--wu-service);
  border-color: var(--wu-service);
  transform: translate(-50%, -50%) rotate(180deg);
}
.wu-swap-btn svg { width: 16px; height: 16px; }

/* --- Autocomplete -------------------------------------------------------- */
.wu-autocomplete { position: relative; }

.wu-autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: var(--wu-z-dropdown);
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
  padding: var(--wu-space-2);
  list-style: none;
  background: var(--wu-surface);
  border: 1px solid var(--wu-border);
  border-radius: var(--wu-radius);
  box-shadow: var(--wu-shadow);
  display: none;
}
.wu-autocomplete-list.is-open { display: block; }

.wu-autocomplete-item {
  display: flex;
  align-items: center;
  gap: var(--wu-space-3);
  padding: var(--wu-space-2) var(--wu-space-3);
  border-radius: var(--wu-radius-sm);
  font-size: var(--wu-fs-sm);
  cursor: pointer;
}
.wu-autocomplete-item:hover,
.wu-autocomplete-item.is-highlighted { background: var(--wu-surface-alt); }
.wu-autocomplete-item svg { width: 16px; height: 16px; color: var(--wu-text-muted); flex: 0 0 auto; }
.wu-autocomplete-item mark { background: none; color: var(--wu-service); font-weight: var(--wu-fw-semibold); padding: 0; }
.wu-autocomplete-meta { margin-inline-start: auto; font-size: var(--wu-fs-xs); color: var(--wu-text-muted); }

.wu-autocomplete-group {
  padding: var(--wu-space-2) var(--wu-space-3) var(--wu-space-1);
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--wu-text-muted);
}

/* --- Guest / passenger popover ------------------------------------------- */
.wu-popover-field { position: relative; }

.wu-popover-trigger {
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: start;
  background: var(--wu-surface);
  border: 1px solid var(--wu-border);
  /* It stands in for .wu-input in the search row, so it takes the field's
     radius too — .wu-room-search already overrode it to this on the detail
     page, which is the look the rest of the item was missing. */
  border-radius: var(--wu-radius);
  font-family: inherit;
  font-size: var(--wu-fs-sm);
  color: var(--wu-text);
  cursor: pointer;
  /* Matches .wu-input, which this control stands in for. */
  transition: border-color var(--wu-duration-sm) var(--wu-ease),
              box-shadow var(--wu-duration-sm) var(--wu-ease),
              background-color var(--wu-duration-sm) var(--wu-ease);
}
.wu-popover-trigger:hover { border-color: var(--wu-border-strong); }

.wu-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: var(--wu-z-dropdown);
  min-width: 280px;
  padding: var(--wu-space-4);
  background: var(--wu-surface);
  border: 1px solid var(--wu-border);
  border-radius: var(--wu-radius);
  box-shadow: var(--wu-shadow);
  display: none;
}
.wu-popover.is-open { display: block; animation: wu-fade-in var(--wu-duration-sm) var(--wu-ease-out); }

/* Floating layers sit over arbitrary page content, not over the hero, so they
   get their own blur and a higher alpha than the panel — at .72 the text
   underneath would compete with the counter labels. */
.wu-search .wu-popover,
.wu-search .wu-autocomplete-list {
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}

/* --- Advanced filters, inline in the widget -------------------------------
   A compact extra row per panel, hidden until the toggle is pressed. The full
   filter set lives in the sidebar — see components/filters.css. */
.wu-search-more {
  display: flex;
  align-items: center;
  gap: var(--wu-space-2);
  margin-top: var(--wu-space-3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--wu-service);
  font-family: inherit;
  font-size: var(--wu-fs-sm);
  font-weight: var(--wu-fw-semibold);
  cursor: pointer;
}
.wu-search-more svg {
  width: 14px;
  height: 14px;
  transition: transform var(--wu-duration-sm) var(--wu-ease);
}
.wu-search-more[aria-expanded="true"] svg { transform: rotate(180deg); }

.wu-search-advanced { display: none; }
.wu-search-advanced.is-open {
  display: block;
  margin-top: var(--wu-space-4);
  padding-top: var(--wu-space-4);
  border-top: 1px solid var(--wu-border);
  animation: wu-fade-in var(--wu-duration-sm) var(--wu-ease-out);
}

/* Listing pages and the filter sidebar live in components/filters.css. */

/* --- Type chips ------------------------------------------------------------
   One row per service, above the fields: what kind of stay, experience or
   car. They are real radios in a fieldset, not buttons with a click handler,
   so arrow keys move between them, the group is announced by its legend, and
   the checked one submits with the rest of the panel.

   Each radio carries data-search-field (the widget collects it) and a name
   that matches the listing filter (propertyType, activity, vehicleType), so
   the chosen chip arrives ticked in the sidebar of the results page - and a
   plain GET without JavaScript filters the same way.

   The input sits over its label at opacity 0 rather than display:none: it has
   to stay focusable and clickable.
   -------------------------------------------------------------------------- */
.wu-search-types {
  min-width: 0;
  margin: 0 0 var(--wu-space-4);
  padding: 0;
  border: 0;
}

.wu-search-types-list {
  display: flex;
  gap: var(--wu-space-2);
  /* 3px of breathing room so the focus ring is not clipped by the scroller,
     and 8px under the chips for the scrollbar to sit in. */
  padding: 3px 3px 8px;
  margin: -3px -3px 0;
  overflow-x: auto;
  /* Six vehicle types do not fit the 500px panel of the single-image hero, and
     a fade alone does not say "this row moves". A thin bar does, and the
     browser only draws it when there is something to scroll. */
  /* Two mask layers: the chips fade out on the right, the 8px strip the bar
     lives in does not - a bar that dissolves at one end looks like a bug. */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent),
                      linear-gradient(#000, #000);
  -webkit-mask-size: 100% calc(100% - 8px), 100% 8px;
  -webkit-mask-position: 0 0, 0 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent),
              linear-gradient(#000, #000);
  mask-size: 100% calc(100% - 8px), 100% 8px;
  mask-position: 0 0, 0 100%;
  mask-repeat: no-repeat;
}
/* Chrome and Safari get a 6px bar with no arrow buttons; the native "thin"
   bar there is taller and carries them. Firefox has no ::-webkit-scrollbar, so
   @supports hands it the standard properties instead - setting both in one
   place would make Chrome ignore the pseudo-elements. */
@supports not selector(::-webkit-scrollbar) {
  .wu-search-types-list {
    scrollbar-width: thin;
    scrollbar-color: var(--wu-border-strong) transparent;
  }
}
.wu-search-types-list::-webkit-scrollbar { height: 6px; }
.wu-search-types-list::-webkit-scrollbar-track { background: transparent; }
.wu-search-types-list::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--wu-border-strong);
}

.wu-type-chip {
  position: relative;
  flex: none;
}
.wu-type-chip input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.wu-type-chip span {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  padding: .5rem .9rem .5rem .7rem;
  border: 1px solid var(--wu-border-strong);
  border-radius: var(--wu-radius-sm);
  background: #fff;
  font-size: var(--wu-fs-sm);
  font-weight: var(--wu-fw-medium);
  white-space: nowrap;
  color: var(--wu-text);
  transition: background-color var(--wu-duration-sm) var(--wu-ease),
              border-color var(--wu-duration-sm) var(--wu-ease),
              color var(--wu-duration-sm) var(--wu-ease);
}
.wu-type-chip svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--wu-service-text);
}

.wu-type-chip input:hover + span { border-color: var(--wu-service-text); }
.wu-type-chip input:focus-visible + span {
  outline: 2px solid var(--wu-service-text);
  outline-offset: 2px;
}

/* Checked: the chip takes the service colour, the same fill the active tab
   above it is tinted with - one hue per service, top to bottom. */
.wu-type-chip input:checked + span {
  border-color: var(--wu-service-text);
  background: var(--wu-service-text);
  color: #fff;
}
.wu-type-chip input:checked + span svg { color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .wu-type-chip span { transition: none; }
}

/* --- Providers under the search --------------------------------------------
   Who supplies the service in the active tab. One strip per service, all in
   the markup; js/pages/home.js shows the one that matches the tab.

   A ruled band rather than a floating card of logos: a label column that
   says how many partners and why it matters, then the wordmarks sliding in a
   row divided by hairlines. Each strip is a slider.js carousel.

   The provider names are invented. Replace a wordmark with your partner's
   logo file - an <img> inside .wu-provider picks up the same sizing.
   -------------------------------------------------------------------------- */
.wu-providers { margin-top: var(--wu-space-5); }

.wu-providers-strip {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  align-items: center;
  gap: var(--wu-space-5);
  padding-block: var(--wu-space-3);
  border-block: 1px solid var(--wu-border);
}
.wu-providers-strip[hidden] { display: none; }

.wu-providers-label {
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: 1.3;
}
.wu-providers-label b {
  font-family: var(--wu-font-display);
  font-size: var(--wu-fs-lg);
  font-weight: var(--wu-fw-normal);
  color: var(--wu-heading);
}
.wu-providers-label span {
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

.wu-providers-slider {
  display: flex;
  align-items: center;
  gap: var(--wu-space-2);
  min-width: 0;
}
.wu-providers-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.wu-providers-track {
  display: flex;
  transition: transform var(--wu-duration-lg) var(--wu-ease);
}
/* slider.js writes --wu-per-view on the slider; the width rule is all CSS. */
.wu-providers-track > [data-slide] {
  display: flex;
  flex: 0 0 calc(100% / var(--wu-per-view, 4));
  justify-content: center;
  min-width: 0;
  /* A wordmark wider than its slot is clipped inside it, never drawn over the
     neighbouring one. The per-view breakpoints on the markup keep slots wide
     enough that this is a safety net, not the look. */
  overflow: hidden;
  border-inline-start: 1px solid var(--wu-border);
}

.wu-provider {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  height: 48px;
  padding-inline: var(--wu-space-3);
  font-size: var(--wu-fs-base);
  white-space: nowrap;
  color: var(--wu-text-muted);
  transition: color var(--wu-duration-sm) var(--wu-ease);
}
.wu-provider svg { flex: none; width: 20px; height: 20px; }
.wu-provider img { max-height: 32px; width: auto; }
.wu-providers-track > [data-slide]:hover .wu-provider { color: var(--wu-heading); }

/* Four lettering styles, so eight invented names still read as eight
   different companies rather than one font repeated. */
.wu-provider-serif { font-family: var(--wu-font-display); font-size: var(--wu-fs-lg); font-style: italic; }
.wu-provider-caps  { font-size: var(--wu-fs-xs); font-weight: var(--wu-fw-semibold); letter-spacing: .16em; text-transform: uppercase; }
.wu-provider-bold  { font-size: var(--wu-fs-lg); font-weight: var(--wu-fw-bold); letter-spacing: -.02em; }
.wu-provider-thin  { font-weight: var(--wu-fw-normal); letter-spacing: .06em; }

.wu-providers-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--wu-border-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--wu-heading);
  cursor: pointer;
  transition: border-color var(--wu-duration-sm) var(--wu-ease),
              color var(--wu-duration-sm) var(--wu-ease);
}
.wu-providers-arrow:hover { border-color: var(--wu-primary); color: var(--wu-primary); }
.wu-providers-arrow:focus-visible { outline: 2px solid var(--wu-primary); outline-offset: 2px; }
.wu-providers-arrow svg { width: 16px; height: 16px; }

/* Inside the ink column of the split editorial hero the band sits on ink,
   so every colour flips to its on-ink counterpart. */
.wu-hero-split-search .wu-providers-strip { border-color: rgba(255, 255, 255, .14); }
.wu-hero-split-search .wu-providers-label b { color: var(--wu-on-ink-strong); }
.wu-hero-split-search .wu-providers-label span { color: var(--wu-on-ink); }
.wu-hero-split-search .wu-providers-track > [data-slide] { border-color: rgba(255, 255, 255, .14); }
.wu-hero-split-search .wu-provider { color: var(--wu-on-ink); }
.wu-hero-split-search .wu-providers-track > [data-slide]:hover .wu-provider { color: var(--wu-on-ink-strong); }
.wu-hero-split-search .wu-providers-arrow {
  border-color: rgba(255, 255, 255, .3);
  background: transparent;
  color: var(--wu-on-ink-strong);
}
/* The column is narrow: the label stacks over the slider. */
.wu-hero-split-search .wu-providers-strip { grid-template-columns: minmax(0, 1fr); gap: var(--wu-space-2); }

/* Below 992px the slider shows two wordmarks; beside a 15rem label column
   that left each one under 200px. Stacking gives them the full width. */
@media (max-width: 991.98px) {
  .wu-providers-strip { grid-template-columns: minmax(0, 1fr); gap: var(--wu-space-2); }
}

@media (prefers-reduced-motion: reduce) {
  .wu-providers-track,
  .wu-provider,
  .wu-providers-arrow { transition: none; }
}

/* --- Multi-city legs --------------------------------------------------------
   The flight panel's own row is flight 1; every further flight is a row
   cloned from the <template> in the markup (js/core/search-service.js,
   FlightLegs). The panel carries data-trip with the checked trip type, which
   is all these rules key off:

     data-trip-show="multi"   only visible on a multi-city trip ("Flight 1")
     data-trip-hide="multi"   hidden on one (the Return field)
   -------------------------------------------------------------------------- */
[data-trip-show] { display: none; }
[data-trip="multi"] [data-trip-show~="multi"] { display: block; }
[data-trip="multi"] [data-trip-hide~="multi"] { display: none; }

.wu-legs { margin-top: var(--wu-space-4); }
.wu-legs[hidden] { display: none; }

.wu-legs-list {
  /* The legs scroll inside a capped height instead of pushing the form down
     the page: about two flights show, the rest scroll. Set the cap here. */
  --wu-legs-max: 19rem;
  display: grid;
  gap: var(--wu-space-4);
  max-height: var(--wu-legs-max);
  /* Room inside the scroller for focus rings, which it would otherwise clip;
     the negative margin keeps the rows where they were. */
  margin: -3px -8px -3px -3px;
  padding: 3px 8px 3px 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  list-style: none;
  transition: box-shadow var(--wu-duration-sm) var(--wu-ease);
}
/* Edge shadows say there is more to scroll to. Inset box-shadows, not a
   mask: a mask would also hide the airport suggestions, which are drawn
   outside the list's box. */
.wu-legs-list.has-more-below { box-shadow: inset 0 -14px 12px -12px rgba(17, 24, 39, .18); }
.wu-legs-list.has-more-above { box-shadow: inset 0 14px 12px -12px rgba(17, 24, 39, .18); }
.wu-legs-list.has-more-above.has-more-below {
  box-shadow: inset 0 14px 12px -12px rgba(17, 24, 39, .18),
              inset 0 -14px 12px -12px rgba(17, 24, 39, .18);
}

/* Inside the scrolling legs an absolutely placed suggestion list would be
   clipped by the scroller, so it is placed as fixed there
   (Autocomplete.place() in js/core/search-service.js writes the position). */
.wu-autocomplete-list.is-floating {
  position: fixed;
  right: auto;
}

/* Each flight is divided from the one above by a dashed rule: the same
   dashed line the add button draws, so the rows read as things that button
   made. */
.wu-leg {
  padding-top: var(--wu-space-4);
  border-top: 1px dashed var(--wu-border-strong);
}

.wu-leg-num {
  margin: 0 0 var(--wu-space-2);
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  letter-spacing: var(--wu-tracking-label);
  text-transform: uppercase;
  color: var(--wu-service-text);
}

.wu-leg-actions {
  display: flex;
  align-items: flex-end;
}
.wu-leg-remove {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  height: 48px;
  padding: 0 var(--wu-space-4);
  border: 1px solid var(--wu-border-strong);
  border-radius: var(--wu-radius);
  background: #fff;
  font: inherit;
  font-size: var(--wu-fs-sm);
  color: var(--wu-text);
  cursor: pointer;
  transition: border-color var(--wu-duration-sm) var(--wu-ease),
              color var(--wu-duration-sm) var(--wu-ease);
}
.wu-leg-remove:hover { border-color: var(--wu-danger); color: var(--wu-danger); }
.wu-leg-remove:focus-visible { outline: 2px solid var(--wu-service-text); outline-offset: 2px; }
.wu-leg-remove svg { width: 16px; height: 16px; }
.wu-leg-remove[hidden] { display: none; }

.wu-legs-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wu-space-3) var(--wu-space-4);
  margin-top: var(--wu-space-4);
}
.wu-legs-add {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-2);
  padding: .7rem 1.1rem;
  border: 1px dashed var(--wu-service-text);
  border-radius: var(--wu-radius);
  background: transparent;
  font: inherit;
  font-size: var(--wu-fs-sm);
  font-weight: var(--wu-fw-semibold);
  color: var(--wu-service-text);
  cursor: pointer;
  transition: background-color var(--wu-duration-sm) var(--wu-ease);
}
.wu-legs-add:hover { background: color-mix(in srgb, var(--wu-service) 10%, transparent); border-style: solid; }
.wu-legs-add:focus-visible { outline: 2px solid var(--wu-service-text); outline-offset: 2px; }
.wu-legs-add:disabled { border-style: dashed; background: transparent; opacity: .5; cursor: not-allowed; }
.wu-legs-add svg { width: 18px; height: 18px; }

.wu-legs-hint {
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

@media (max-width: 991.98px) {
  /* A leg stacks its fields on a phone and is far taller, so the cap grows
     with it - but never past most of the screen. */
  .wu-legs-list { --wu-legs-max: min(26rem, 60vh); }
}

@media (min-width: 992px) {
  /* One set of tracks for the panel's row and every leg below it, so From,
     To and the date line up down the form. Five tracks where the panel has
     the passengers field, four on the compact listing search. */
  [data-trip="multi"] .wu-search-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  [data-trip="multi"]:has(.wu-popover-field) .wu-search-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .wu-leg-actions { grid-column: 4 / -1; }

  /* The ink column of the split hero is too narrow for that; it keeps the
     auto-fit row it already has. */
  .wu-hero-split-search [data-trip="multi"] .wu-search-row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .wu-hero-split-search .wu-leg-actions { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .wu-leg-remove,
  .wu-legs-add,
  .wu-legs-list { transition: none; }
}
