/* The site's sandbox hotel pages (server/views/hotels.js, hotelBooking.js), over flights.css's page, label and booking
   classes and site.css's tokens, cards, fields and alerts. */
.ht-list { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.ht-hotel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.ht-hotel h2, .ht-hotel h3 { font-size: 20px; }
/* The price column is `auto`: capped so a long "paid at the hotel" line wraps inside it instead of widening it and
   squeezing the hotel's details to a sliver. */
.ht-hotel-price { display: grid; text-align: right; gap: 2px; min-width: 0; max-width: 17rem; }
.ht-hotel-price strong { font-size: 21px; color: var(--ink); }
.ht-hotel-price small, .ht-meta { font-size: 14px; color: var(--muted); }
/* A result's row (audit UX-5): its photo beside its words, the per-night average under the total, and the sort bar
   and filter panel that public/js/hotel-results.js shows (hidden in the markup, so nothing shows without it). */
.ht-hotel-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; min-width: 0; }
.ht-hotel-main > div { min-width: 0; }
.ht-thumb-box { position: relative; display: block; width: 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.ht-thumb-box .ht-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ht-thumb-none { display: none; height: 100%; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.ht-thumb-box:not(:has(img)) .ht-thumb-none { display: flex; }
.ht-night { font-weight: 600; color: var(--ink); }
.ht-fees { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ht-sort button { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy-800); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.ht-sort button[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.ht-sort[hidden], .ht-filters[hidden], .ht-none[hidden], .ht-list > li[hidden] { display: none; }
.ht-clear { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--blue-600); cursor: pointer; text-decoration: underline; }
.ht-more[hidden] { display: none; }
.ht-more { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.ht-none { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ht-gallery { display: grid; gap: 10px; margin: 12px 0; min-width: 0; }
.ht-gallery-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 520px; max-width: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.ht-gallery-main { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .92); color: var(--navy-800); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, .25); }
.ht-gallery-nav[hidden] { display: none; }
.ht-gallery-prev { left: 10px; }
.ht-gallery-next { right: 10px; }
.ht-gallery-count { position: absolute; left: 10px; bottom: 10px; margin: 0; padding: 3px 10px; border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 13px; font-weight: 600; }
.ht-gallery-thumbs { display: flex; gap: 8px; margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; }
.ht-gallery-thumbs[hidden] { display: none; }
.ht-gallery-thumb { flex: none; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--bg-soft); cursor: pointer; overflow: hidden; }
.ht-gallery-thumb img { display: block; width: 96px; height: 72px; object-fit: cover; }
.ht-gallery-thumb[aria-current="true"] { border-color: var(--navy-800); }
.ht-about p + p { margin-top: 8px; }
.ht-facilities { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ht-facilities li { padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); font-size: 14px; }
.ht-rooms { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.ht-room { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.ht-room h3 { font-size: 17px; }
.ht-room ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ht-room-price { display: grid; gap: 6px; text-align: right; justify-items: end; min-width: 0; max-width: 17rem; }
.ht-room-price strong { font-size: 20px; color: var(--ink); }
.ht-confirm { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 2px dashed #b7791f; border-radius: var(--radius-sm); font-weight: 600; color: var(--ink); }
.ht-confirm input { flex: none; width: 20px; height: 20px; margin-top: 2px; }
/* Live pages (HOTEL_MODE=live): real rooms and prices wear none of the dashed amber test-data styling. */
.ht-live.fl-journey, .ht-live.fl-detail { border: 1px solid var(--line); }
.ht-confirm.ht-live { border: 2px solid var(--navy-800); }
/* The guest form's error summary (server/views/hotelBooking.js errorSummary): it takes the focus, so it shows it. */
.ht-errors:focus { outline: 3px solid var(--navy-800); outline-offset: 2px; }
.ht-errors ul { margin: 6px 0 0; padding-left: 18px; }
.ht-errors a { color: inherit; }
/* The payment page (server/views/hotelBooking.js payView): the prompt above the payment form and the one line that says
   who charges the card (live mode's merchant-of-record disclosure). */
.fl-bk-facts .ht-pay-lead { margin: 0 0 4px; color: var(--ink); }
.fl-bk-facts .ht-merchant { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-soft); font-size: 14px; color: var(--ink); }
.fl-bk-facts .ht-merchant svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

@media (max-width: 760px) {
  .ht-hotel { grid-template-columns: 1fr; }
  .ht-hotel-price { text-align: left; max-width: none; }
  .ht-hotel-main { grid-template-columns: 1fr; }
  .ht-hotel-main .ht-thumb-box { width: 100%; height: 160px; }
  .ht-sort button { padding: 6px 10px; font-size: 13px; }
  .ht-room { grid-template-columns: 1fr; }
  .ht-room-price { text-align: left; justify-items: start; max-width: none; }
}

/* The stay's length under the dates (public/js/flights.js fills it; nothing shows without dates). */
.ht-nights { margin: -4px 0 12px; font-size: 14px; color: var(--muted); }
.ht-nights:empty { display: none; }
/* A search or price check on its way: the button says so and takes no second press. */
.fl-submit[aria-busy="true"], .ht-room-price .btn[aria-busy="true"] { opacity: .75; cursor: progress; }
/* The booking page's line under "You're booked": the reference the guest keeps (UX-3). */
.fl-lede { margin: -8px 0 18px; font-size: 18px; color: var(--muted); }
.fl-lede strong { color: var(--ink); }


/* The folded search on a results page (server/views/hotels.js foldedSearch, audit UX-14): one bar that says the
   search, "Edit search" opens the same form under it. The details element does the folding; no script. */
.ht-fold { padding: 0; overflow: hidden; }
/* Open, the form's rooms and travelers panel lies over the results instead of being cut off at the fold's edge. */
.ht-fold[open] { overflow: visible; }
.ht-fold-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 56px; padding: 8px 16px 8px 22px; list-style: none; cursor: pointer; color: var(--ink); font-size: 15px; }
.ht-fold-bar::-webkit-details-marker { display: none; }
.ht-fold-bar::marker { content: ''; }
.ht-fold-bar:focus-visible { outline: 3px solid var(--navy-800); outline-offset: -3px; }
.ht-fold-what { min-width: 0; line-height: 1.4; }
.ht-fold-what strong { color: var(--ink); }
.ht-fold-edit { flex: none; min-height: 40px; padding: 0 16px; pointer-events: none; }
.ht-fold-close, .ht-fold[open] .ht-fold-open { display: none; }
.ht-fold[open] .ht-fold-close { display: inline; }
.ht-fold .fl-search { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
@media (max-width: 760px) {
  .ht-fold-bar { padding: 10px 14px 10px 16px; font-size: 14px; }
  .ht-fold-sep { display: none; }
  .ht-fold-what { display: grid; gap: 2px; }
  .ht-fold-what > strong, .ht-fold-dates, .ht-fold-stay { display: block; }
  .ht-fold-what strong { font-size: 16px; }
}

/* The filter panel on a phone (audit UX-14): it opens folded to its head, "Show filters" opens the body, so the
   hotels follow the search line at once. On a desktop the panel is the open sidebar it was. */
.ht-filters-actions { display: inline-flex; align-items: center; gap: 12px; }
.ht-filters-toggle { display: none; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 14px; min-height: 40px; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy-800); cursor: pointer; }
.ht-filters-toggle .ht-filters-hide, .ht-filters[data-ht-open="yes"] .ht-filters-toggle .ht-filters-show { display: none; }
.ht-filters[data-ht-open="yes"] .ht-filters-toggle .ht-filters-hide { display: inline; }
@media (max-width: 760px) {
  .ht-filters-toggle { display: inline-block; }
  .ht-filters:not([data-ht-open="yes"]) .ht-filters-body { display: none; }
  .ht-filters:not([data-ht-open="yes"]) { gap: 0; }
  .ht-filters:not([data-ht-open="yes"]) form { gap: 0; }
}

/* The room's guests (travelForms.js guestFields): the children's ages, as many fields as the count, under the row. */
/* The rooms and travelers field (the homepage's: search-box.css .sb-lone) */
.ht-guests { grid-template-columns: minmax(0, 22rem); }
.ht-trav-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ht-trav .field-error { margin-bottom: 0; }
/* The nearby-dates strip over the results (server/views/hotels.js nearbyStrip, public/js/hotel-flex.js): one cell per
   stay of the same nights, the searched one in blue. Every cell is drawn by the server at its final size and only its
   words change as it fills, so nothing on the page moves; on a phone the row scrolls sideways. */
.ht-flex { display: grid; gap: 10px; margin: 0 0 16px; padding: 16px 18px 14px; }
.ht-flex-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; min-width: 0; }
.ht-flex-head h2 { margin: 0; font-size: 18px; color: var(--ink); }
.ht-flex-head h2 small { margin-left: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.ht-flex-seen { flex: 0 1 auto; min-width: 0; height: 20px; margin: 0; font-size: 13.5px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-flex-cells { display: flex; gap: 10px; margin: 0; padding: 3px 3px 8px; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ht-flex-cell { position: relative; flex: 0 0 158px; display: grid; grid-template-rows: minmax(0, 1fr) 34px; height: 160px; border: 1px solid #d9e0e8; border-radius: 12px; background: #fff; scroll-snap-align: start; }
.ht-flex-cell:hover { border-color: var(--blue-300); }
.ht-flex-link { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 10px 12px 0; color: var(--ink); text-decoration: none; }
/* The whole cell opens its search; the Check button sits above that. */
.ht-flex-link::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.ht-flex-link:focus-visible { outline: 0; }
.ht-flex-link:focus-visible::after { outline: 3px solid var(--blue-600); outline-offset: 1px; }
.ht-flex-shift { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
/* The two dates on two lines ("Mon, Nov 9 –" over "Wed, Nov 11"), so neither is cut. */
.ht-flex-dates { display: grid; font-size: 14px; line-height: 18px; font-weight: 600; }
.ht-flex-dates > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* "from" over the amount (two lines kept for every state, so a long amount is never cut and nothing moves). */
.ht-flex-price { display: grid; align-content: start; height: 38px; margin-top: 4px; font-size: 14px; line-height: 18px; color: var(--muted); }
.ht-flex-price strong { font-size: 16px; line-height: 20px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-flex-price small { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.ht-flex-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 12px 8px; pointer-events: none; }
.ht-flex-foot > * { pointer-events: auto; }
.ht-flex-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; background: var(--blue-50); color: var(--blue-600); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ht-flex-check { height: 26px; padding: 0 12px; border: 1px solid var(--blue-600); border-radius: 13px; background: #fff; color: var(--blue-600); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ht-flex-check:hover { background: var(--blue-50); }
.ht-flex-check:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.ht-flex-cell.is-current { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue-600); }
.ht-flex-cell.is-current .ht-flex-shift { color: var(--blue-600); }
.ht-flex-cell.is-current .ht-flex-tag { background: #fff; }
.ht-flex-cell[data-ht-state="checking"] .ht-flex-price { color: var(--muted); }
.ht-flex-cell[data-ht-state="past"] { background: var(--bg-soft); }
.ht-flex-cell[data-ht-state="past"] .ht-flex-link { color: var(--muted); }
.ht-flex-note { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
@media (max-width: 760px) {
  .ht-flex { padding: 14px 14px 12px; }
  .ht-flex-head { display: grid; gap: 2px; }
  .ht-flex-head h2 small { display: block; margin: 2px 0 0; }
  .ht-flex-cells { margin: 0 -14px; padding: 3px 14px 8px; scroll-padding: 0 14px; }
  .ht-flex-cell { flex-basis: 150px; }
}
@media (forced-colors: active) {
  .ht-flex-cell.is-current { outline: 2px solid Highlight; }
}
