/* ==========================================================================
   Component — Service Cards
   A single .wu-card skeleton serves all four services. Service identity comes
   from data-service on the card, which sets --wu-service (see style.css §8).

     <article class="wu-card" data-service="hotel"> … </article>

   Layout modifiers: .wu-card-list (horizontal) · .wu-card-mini (compact)
   ========================================================================== */

.wu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--wu-surface);
  border: 1px solid var(--wu-border);
  border-radius: var(--wu-radius-lg);
  overflow: hidden;
  transition: transform var(--wu-duration) var(--wu-ease),
              box-shadow var(--wu-duration) var(--wu-ease),
              border-color var(--wu-duration) var(--wu-ease);
}
.wu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wu-shadow);
  border-color: transparent;
}

/* --- Media --------------------------------------------------------------- */
.wu-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--wu-surface-sunken);
  flex: 0 0 auto;
}
.wu-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wu-duration-lg) var(--wu-ease-out);
}
.wu-card:hover .wu-card-media img { transform: scale(1.06); }

/* Badge stack, top-left */
.wu-card-badges {
  position: absolute;
  top: var(--wu-space-3);
  left: var(--wu-space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--wu-space-2);
  z-index: 2;
}

/* On a photograph a translucent tint is no ground at all: the 12-16% primary
   and secondary badges let the picture through and the text sank into it
   ("Adults only", "Bestseller", "Early start"). Over the media they get the
   same tint mixed onto an opaque surface, so they read exactly as they do on
   a white card - the contrast the badge rules in style.css were measured
   against. The status tones already sit on opaque *-bg tokens. */
.wu-card-badges .wu-badge-primary   { background-color: color-mix(in srgb, var(--wu-primary) 12%, var(--wu-surface)); }
.wu-card-badges .wu-badge-secondary { background-color: color-mix(in srgb, var(--wu-secondary) 16%, var(--wu-surface)); }
.wu-card-badges .wu-badge { box-shadow: 0 1px 3px rgba(12, 21, 18, .18); }

/* Wishlist heart, top-right */
.wu-card-wish {
  position: absolute;
  top: var(--wu-space-3);
  right: var(--wu-space-3);
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--wu-text-muted);
  cursor: pointer;
  transition: color var(--wu-duration-sm) var(--wu-ease),
              transform var(--wu-duration-sm) var(--wu-ease);
}
.wu-card-wish:hover { color: var(--wu-danger); transform: scale(1.1); }
.wu-card-wish.is-active { color: var(--wu-danger); }
.wu-card-wish.is-active svg { fill: currentColor; }
.wu-card-wish svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* A flight card has no media panel, so its heart sits on the card itself and
   lands over the first line of the body. In a wide column that line ends long
   before the corner; in the map rail it runs straight under the button. */
.wu-card:not(:has(.wu-card-media)) .wu-card-eyebrow { padding-inline-end: 40px; }

/* Price chip over the image */
.wu-card-price-tag {
  position: absolute;
  left: var(--wu-space-3);
  bottom: var(--wu-space-3);
  z-index: 2;
  padding: 0.35rem 0.75rem;
  border-radius: var(--wu-radius);
  background: rgba(255, 255, 255, .95);
  font-size: var(--wu-fs-sm);
  font-weight: var(--wu-fw-bold);
  color: var(--wu-heading);
}

/* --- Body ---------------------------------------------------------------- */
.wu-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--wu-space-2);
  padding: var(--wu-space-4);
  flex: 1 1 auto;
}

.wu-card-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

.wu-card-title {
  margin: 0;
  font-size: var(--wu-fs-lg);
  line-height: var(--wu-lh-snug);
}
.wu-card-title a { color: var(--wu-heading); }
.wu-card-title a:hover { color: var(--wu-service); }

.wu-card-location {
  display: flex;
  align-items: center;
  gap: var(--wu-space-1);
  font-size: var(--wu-fs-sm);
  color: var(--wu-text-muted);
}
.wu-card-location svg { width: 14px; height: 14px; flex: 0 0 auto; }

.wu-card-text {
  font-size: var(--wu-fs-sm);
  color: var(--wu-text-muted);
  margin: 0;
}

/* Feature pills — amenities, inclusions, vehicle specs, baggage */
.wu-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wu-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}
.wu-card-features li {
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-1);
}
.wu-card-features svg { width: 14px; height: 14px; }

.wu-card-rating {
  display: flex;
  align-items: center;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-sm);
}
.wu-card-rating .wu-reviews { color: var(--wu-text-muted); font-size: var(--wu-fs-xs); }

/* --- Footer -------------------------------------------------------------- */
.wu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wu-space-3);
  padding: var(--wu-space-3) var(--wu-space-4);
  margin-top: auto;
  border-top: 1px solid var(--wu-border);
  background: var(--wu-surface);
}

/* --- Modifier: horizontal list layout ------------------------------------ */
.wu-card-list { flex-direction: row; }
.wu-card-list .wu-card-media { width: 300px; aspect-ratio: auto; }
.wu-card-list .wu-card-body { padding: var(--wu-space-5); }
.wu-card-list .wu-card-footer {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: 220px;
  flex: 0 0 auto;
  border-top: 0;
  border-inline-start: 1px solid var(--wu-border);
  text-align: end;
}

/* --- Modifier: compact (sidebars, "recently viewed") --------------------- */
.wu-card-mini {
  flex-direction: row;
  gap: var(--wu-space-3);
  padding: var(--wu-space-3);
  border-radius: var(--wu-radius);
}
.wu-card-mini:hover { transform: none; }
.wu-card-mini .wu-card-media {
  width: 84px;
  height: 68px;
  aspect-ratio: auto;
  border-radius: var(--wu-radius-sm);
  flex: 0 0 auto;
}
.wu-card-mini .wu-card-body { padding: 0; gap: var(--wu-space-1); }
.wu-card-mini .wu-card-title { font-size: var(--wu-fs-sm); }

/* --- Flight card: route strip -------------------------------------------- */
.wu-route {
  display: flex;
  align-items: center;
  gap: var(--wu-space-3);
  width: 100%;
}
.wu-route-point { text-align: center; flex: 0 0 auto; }
.wu-route-time { font-size: var(--wu-fs-lg); font-weight: var(--wu-fw-bold); color: var(--wu-heading); line-height: 1.2; }
.wu-route-code { font-size: var(--wu-fs-xs); color: var(--wu-text-muted); text-transform: uppercase; letter-spacing: .06em; }

.wu-route-path {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}
.wu-route-path::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--wu-border-strong);
}
.wu-route-path span {
  position: relative;
  padding: 0 var(--wu-space-2);
  background: var(--wu-surface);
  /* The connector is ruled behind this label. A wrapped label would be struck
     through on every line, because the background only masks each line box. */
  white-space: nowrap;
}

/* --- Transfer card: vehicle spec row ------------------------------------- */
.wu-vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wu-space-4);
  padding: var(--wu-space-3) 0;
  margin: 0;
  list-style: none;
  font-size: var(--wu-fs-sm);
  color: var(--wu-text-muted);
}
.wu-vehicle-specs li { display: inline-flex; align-items: center; gap: var(--wu-space-2); }
.wu-vehicle-specs svg { width: 16px; height: 16px; color: var(--wu-service); }

/* --- Tour card: duration & group ----------------------------------------- */
.wu-tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wu-space-3);
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

/* --- Narrow results rails -------------------------------------------------
   A card has to adapt to the column it sits in, not to the viewport. The map
   view's results rail is about 410px wide at EVERY viewport width, which no
   media query can express — and there the list card's fixed 220px footer left
   the flight route strip 43px, wrapping "2h 45m - Direct" onto three lines
   with the connector ruled straight through it.

   Container queries are the right tool: the rail declares itself a sizing
   context and the card responds to that.
   -------------------------------------------------------------------------- */
[data-results] {
  container-type: inline-size;
  container-name: results;
}

@container results (max-width: 560px) {
  .wu-card-list { flex-direction: column; }

  .wu-card-list .wu-card-media { width: 100%; aspect-ratio: 16 / 9; }

  .wu-card-list .wu-card-footer {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    border-inline-start: 0;
    border-top: 1px solid var(--wu-border);
  }
}

/* --- Hotel "stay" card ----------------------------------------------------
   The accommodation card the booking sites converged on: artwork, then the
   property and the room it is quoting, then a column that carries the guest
   score at the top and the money at the bottom.

   It is ONE piece of markup. Horizontal is its natural shape, and the two
   places that cannot hold three columns - the grid/masonry views and the
   narrow map rail - restack it in CSS. Rendering a second card for those
   would mean two templates to keep honest instead of one.
   -------------------------------------------------------------------------- */
.wu-card-stay { flex-direction: row; align-items: stretch; }
.wu-card-stay .wu-card-media { width: 240px; aspect-ratio: 1 / 1; }
.wu-card-stay .wu-card-body { padding: var(--wu-space-4) var(--wu-space-5); }

.wu-card-stay .wu-card-footer {
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;   /* score to the top, price to the foot */
  width: 232px;
  flex: 0 0 auto;
  padding: var(--wu-space-4);
  border-top: 0;
  border-inline-start: 1px solid var(--wu-border);
  text-align: end;
}

/* Title + official star rating. The stars are the property's classification;
   the score in the footer is what guests thought of it. */
.wu-card-stay .wu-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-lg);
}
.wu-card-stay .wu-card-title a { color: var(--wu-service); }
.wu-card-stay .wu-card-title a:hover { text-decoration: underline; }

.wu-card-stars { display: inline-flex; gap: 1px; color: var(--wu-star); line-height: 1; }
.wu-card-stars svg { width: 13px; height: 13px; }

.wu-card-place {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wu-space-2);
  margin: 0;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}
.wu-card-place a {
  color: var(--wu-service);
  font-weight: var(--wu-fw-semibold);
  text-decoration: underline;
}

.wu-card-room { margin-top: var(--wu-space-1); }
.wu-card-room strong {
  display: block;
  font-size: var(--wu-fs-sm);
  color: var(--wu-heading);
}
.wu-card-room span { font-size: var(--wu-fs-xs); color: var(--wu-text-muted); }

/* What the rate actually includes - the reason a guest picks one card. */
.wu-card-perks {
  display: flex;
  flex-direction: column;
  gap: var(--wu-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  /* The perks list is the "free cancellation / breakfast included" copy on a
     stay card: 12px on a white card, and the raw success green measured
     3.12:1 there against a 4.5:1 requirement. Darkened only as text; the
     token stays as it is wherever it is a fill. */
  color: color-mix(in srgb, var(--wu-success) 78%, black);
}
.wu-card-perks li { display: flex; align-items: flex-start; gap: var(--wu-space-1); }
.wu-card-perks svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.wu-card-perks li span span { font-weight: var(--wu-fw-normal); }

.wu-card-urgency {
  margin: 0;
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  color: var(--wu-danger);
}

.wu-card-score { display: flex; align-items: center; gap: var(--wu-space-2); }
.wu-card-score strong {
  display: block;
  font-size: var(--wu-fs-sm);
  color: var(--wu-heading);
}
.wu-card-score > div span { font-size: var(--wu-fs-xs); color: var(--wu-text-muted); }
/* The score itself is a span too - it must keep its own colour, not inherit
   the muted grey the review count uses. */
/* Set large and bold on purpose. White on the brand colour lands near 4.1:1 in
   the warmer palettes, which clears WCAG AA at 3:1 for large text but not the
   4.5:1 small text needs - and this number is the one thing on the card that
   must stay legible in all eight schemes. */
.wu-card-score .wu-score {
  font-size: var(--wu-fs-xl);
  line-height: 1.1;
  min-width: 44px;
  padding: 0.35rem 0.5rem;
  color: var(--wu-on-primary);
}

.wu-card-money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
}
.wu-card-stay-note { font-size: var(--wu-fs-xs); color: var(--wu-text-muted); }
.wu-card-money .wu-price { justify-content: flex-end; }
.wu-card-money .wu-price-amount { font-size: var(--wu-fs-2xl); }
.wu-card-money .wu-btn {
  margin-top: var(--wu-space-3);
  width: 100%;
  justify-content: center;
  gap: var(--wu-space-1);
}

/* Restacked: grid and masonry have no room for a third column. */
.wu-grid .wu-card-stay,
.wu-masonry .wu-card-stay { flex-direction: column; }

.wu-grid .wu-card-stay .wu-card-media,
.wu-masonry .wu-card-stay .wu-card-media { width: 100%; aspect-ratio: 4 / 3; }

/* Stacked, the score and the money each get their own full-width row: side by
   side they need ~330px and a grid column is under 300px, so they would spill
   rather than shrink (a flex item will not go below its min-content width). */
.wu-grid .wu-card-stay .wu-card-footer,
.wu-masonry .wu-card-stay .wu-card-footer {
  width: auto;
  flex-direction: column;
  align-items: stretch;
  gap: var(--wu-space-3);
  padding: var(--wu-space-3) var(--wu-space-4);
  border-top: 1px solid var(--wu-border);
  border-inline-start: 0;
  text-align: start;
}
.wu-grid .wu-card-stay .wu-card-score,
.wu-masonry .wu-card-stay .wu-card-score { justify-content: space-between; }

.wu-grid .wu-card-stay .wu-card-money,
.wu-masonry .wu-card-stay .wu-card-money { align-items: flex-start; }
.wu-grid .wu-card-stay .wu-card-money .wu-price,
.wu-masonry .wu-card-stay .wu-card-money .wu-price { justify-content: flex-start; }

/* --- Masonry (CSS columns; JS-free) -------------------------------------- */
.wu-masonry {
  column-count: 3;
  column-gap: var(--wu-space-5);
}
.wu-masonry > * {
  break-inside: avoid;
  margin-bottom: var(--wu-space-5);
  display: block; /* columns + flex don't mix; the card body keeps its own flex */
}

/* The stay card in a narrow rail - the map view's results column, and every
   listing on a phone. This block has to come AFTER the base stay rules: a
   container query adds no specificity, so source order is what decides. */
@container results (max-width: 620px) {
  .wu-card-stay { flex-direction: column; }
  /* Shallower than the 4:3 the grid uses: in the map rail the card competes
     with the map for height, and four 660px cards make the rail unscannable. */
  .wu-card-stay .wu-card-media { width: 100%; aspect-ratio: 2 / 1; }
  .wu-card-stay .wu-card-body { padding: var(--wu-space-4); }
  .wu-card-stay .wu-card-footer {
    width: auto;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--wu-space-3);
    padding: var(--wu-space-3) var(--wu-space-4);
    text-align: start;
    border-inline-start: 0;
    border-top: 1px solid var(--wu-border);
  }
  .wu-card-stay .wu-card-money { width: auto; align-items: flex-end; }
  .wu-card-stay .wu-card-money .wu-price-amount { font-size: var(--wu-fs-xl); }
}

/* Under ~400px the score and the price no longer fit on one line - a flex item
   will not shrink below its min-content width, so they must stack instead. */
@container results (max-width: 400px) {
  .wu-card-stay .wu-card-footer { flex-direction: column; align-items: stretch; }
  .wu-card-stay .wu-card-score { justify-content: space-between; }
  .wu-card-stay .wu-card-money { align-items: flex-start; }
  .wu-card-stay .wu-card-money .wu-price { justify-content: flex-start; }
}

/* --- Tour and transfer cards ----------------------------------------------
   One piece of markup each for every view, like the stay card. In the grid
   and masonry they are the familiar tall card. In a .wu-stack - the list view
   - the footer becomes a right-hand column and the .wu-card-listonly detail
   comes out; the narrow map rail puts them back to the tall card.

   Laid out unlike the stay card and unlike each other. A hotel's column
   leads with the guest score; a tour's with its rating and cancellation
   terms, the price at the foot; a transfer's with the fixed price, the terms
   at the foot. js/services/tour-service.js, transfer-service.js.
   -------------------------------------------------------------------------- */
.wu-card-tour .wu-card-listonly,
.wu-card-ride .wu-card-listonly { display: none; }

/* A glyph and a value: group size, languages, seats, bags. */
.wu-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wu-space-2) var(--wu-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}
.wu-card-facts li { display: inline-flex; align-items: center; gap: var(--wu-space-2); }

.wu-card-facts svg,
.wu-card-where svg,
.wu-card-pill svg,
.wu-card-slots-label svg,
.wu-card-route-leg svg,
.wu-card-confirm svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--wu-service);
}

/* The eyebrow is a flex row; the "· model" part is its own item, so the row
   gap would open a second space before the dot. */
.wu-card-ride .wu-card-eyebrow > .wu-card-gridonly,
.wu-card-ride .wu-card-eyebrow > .wu-card-listonly { margin-inline-start: -4px; }

.wu-card-where {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

/* Duration or free waiting time, on the photo. */
.wu-card-pill {
  position: absolute;
  inset-inline-start: var(--wu-space-3);
  bottom: var(--wu-space-3);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--wu-space-1);
  padding: 4px 10px;
  border-radius: var(--wu-radius-pill);
  background: rgba(255, 255, 255, .94);
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  color: var(--wu-heading);
}

/* What is included - the same darkened green as the stay card's perks. */
.wu-card-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--wu-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text);
}
.wu-card-includes li { display: inline-flex; align-items: center; gap: 4px; }
.wu-card-includes svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--wu-success) 78%, black);
}

/* Start times, as pills. */
.wu-card-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-xs);
}
.wu-card-slots-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-end: 2px;
  color: var(--wu-text-muted);
}
.wu-card-slot {
  padding: 1px 8px;
  border: 1px solid var(--wu-border-strong);
  border-radius: var(--wu-radius-pill);
  font-variant-numeric: tabular-nums;
  color: var(--wu-heading);
}
.wu-card-slot-more { color: var(--wu-text-muted); }

/* A transfer's pickup and drop-off on a dotted line. */
.wu-card-route {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 0;
  padding-inline-start: 24px;
  list-style: none;
  font-size: var(--wu-fs-sm);
}
.wu-card-route::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 14px;
  bottom: 14px;
  border-inline-start: 2px dotted var(--wu-border-strong);
}
.wu-card-route-stop { position: relative; line-height: 1.3; }
.wu-card-route-stop::before {
  content: "";
  position: absolute;
  inset-inline-start: -23px;
  top: 2px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--wu-service);
  border-radius: 50%;
  background: var(--wu-surface);
}
.wu-card-route-stop:last-child::before { background: var(--wu-service); }
.wu-card-route-stop span {
  display: block;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}
.wu-card-route-stop strong { font-weight: var(--wu-fw-semibold); color: var(--wu-heading); }
.wu-card-route-leg {
  display: flex;
  align-items: center;
  gap: var(--wu-space-2);
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

/* The column pieces. */
.wu-card-review { display: flex; align-items: center; gap: var(--wu-space-3); }
.wu-card-review-score {
  font-size: var(--wu-fs-2xl);
  font-weight: var(--wu-fw-bold);
  line-height: 1;
  color: var(--wu-heading);
}
.wu-card-review-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: var(--wu-fs-xs);
  color: var(--wu-text-muted);
}

.wu-card-policy {
  display: flex;
  align-items: flex-start;
  gap: var(--wu-space-2);
  margin: 0;
  font-size: var(--wu-fs-xs);
  line-height: 1.35;
  color: var(--wu-text-muted);
}
.wu-card-policy svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--wu-success) 78%, black);
}
.wu-card-policy strong {
  display: block;
  font-weight: var(--wu-fw-semibold);
  color: color-mix(in srgb, var(--wu-success) 78%, black);
}
.wu-card-policy span span { display: block; }

.wu-card-deal { display: flex; flex-direction: column; gap: 2px; }
.wu-card-from,
.wu-card-deal-note { font-size: var(--wu-fs-xs); color: var(--wu-text-muted); }

.wu-card-confirm {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: var(--wu-fs-xs);
  font-weight: var(--wu-fw-semibold);
  color: var(--wu-heading);
}

/* --- The list view --------------------------------------------------------- */
.wu-stack > .wu-card-tour,
.wu-stack > .wu-card-ride { flex-direction: row; align-items: stretch; }

.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-media,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-skeleton-media {
  width: 280px;
  min-height: 232px;
  aspect-ratio: auto;
  flex: 0 0 auto;
}
.wu-stack > .wu-card-ride > .wu-card-media { width: 250px; }
.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-media img {
  position: absolute;
  inset: 0;
}
.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-body {
  min-width: 0;
  padding: var(--wu-space-4) var(--wu-space-5);
}

.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-gridonly { display: none; }
.wu-stack > .wu-card-ride .wu-card-text { display: none; }

.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-includes,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-slots,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-review,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-policy,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-confirm { display: flex; }
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-route { display: grid; }
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-facts .wu-card-listonly { display: inline-flex; }
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-eyebrow .wu-card-listonly,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-from,
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-deal-note { display: block; }

.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-footer {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--wu-space-3);
  width: 236px;
  flex: 0 0 auto;
  margin-top: 0;
  padding: var(--wu-space-4) var(--wu-space-5);
  border-top: 0;
  border-inline-start: 1px solid var(--wu-border);
  text-align: start;
}
.wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-footer .wu-btn {
  width: 100%;
  justify-content: center;
}
.wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-deal .wu-price-amount { font-size: var(--wu-fs-2xl); }

/* Tour column: rating and terms at the top, the price and the button sink. */
.wu-stack > .wu-card-tour > .wu-card-footer .wu-card-deal { margin-top: auto; }

/* Transfer column: the price leads, the terms sink under a rule. */
.wu-stack > .wu-card-ride > .wu-card-footer .wu-card-policy {
  margin-top: auto;
  padding-top: var(--wu-space-3);
  border-top: 1px dashed var(--wu-border);
}

/* Narrow results rail - the map view and phones. Back to the tall card. Has
   to follow the list rules: a container query adds no specificity. */
@container results (max-width: 620px) {
  .wu-stack > .wu-card-tour,
  .wu-stack > .wu-card-ride { flex-direction: column; }

  .wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-media,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-skeleton-media {
    width: 100%;
    min-height: 0;
    aspect-ratio: 2 / 1;
  }

  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-includes,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-slots,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-review,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-policy,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-confirm,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-route,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-facts .wu-card-listonly,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-eyebrow .wu-card-listonly,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-from,
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-deal-note { display: none; }

  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-rating.wu-card-gridonly { display: flex; }
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-eyebrow .wu-card-gridonly { display: inline; }
  .wu-stack > .wu-card-ride .wu-card-text { display: -webkit-box; }

  .wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-footer {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--wu-space-3) var(--wu-space-4);
    border-inline-start: 0;
    border-top: 1px solid var(--wu-border);
  }
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) > .wu-card-footer .wu-btn { width: auto; }
  .wu-stack > .wu-card-tour > .wu-card-footer .wu-card-deal { margin-top: 0; }
  .wu-stack > :is(.wu-card-tour, .wu-card-ride) .wu-card-deal .wu-price-amount { font-size: var(--wu-fs-xl); }
}
