/* StaySaver Day-Use Discovery — shared + Surface A (home section).
   Scoped under .ssd so it cannot affect existing pages.
   Reuses theme buttons/grid/icons; only fills genuine gaps. */

/* Self-contained palette aligned to the PUBLIC SITE theme (style.css /
   custom.css) — NOT the Angular admin tokens. Brand = navy + gold. */
.ssd {
  /* fixed-header clearance — fallback; ssd-home-discovery.js measures the real
     header and overwrites this on load + resize (no CLS pre-JS). Scoped to .ssd,
     not :root. .ssd-detail overrides with its own value. */
  --ssd-header-h: 104px;
  --ssd-gap: 16px;
  --ssd-radius: 14px;
  --ssd-border: #d9e1e6;
  --ssd-muted: #6c757d;
  --ssd-ink: #333333;
  --ssd-dark: #292b33;
  /* Accent now maps to the primary navy too (old teal #56c6d2 retired) so
     field icons, stars, slot chips, etc. follow the navy-first system. */
  --ssd-accent: var(--ss-navy);
  --ssd-accent-ink: var(--ss-navy);
  --ssd-accent-tint: rgba(30, 58, 95, 0.10);
  /* Navy-first hierarchy: primary CTAs (See hotels/Search/Book on app/View
     Rooms) use the brand navy (from superadmin --navy-color). White text = AAA.
     Teal (--ssd-accent) is demoted to accent-only (badges/stars/highlights). */
  --ssd-btn: var(--ss-navy);
  --ssd-btn-hover: var(--ss-navy-hover);
  --ssd-slate: #292b33;          /* dark slate for emphasis (price/distance) */
  --ssd-gold: #e6aa37;
  /* star ratings use gold so they read as decorative — never the same as the
     navy primary CTA (keeps a clear action vs. rating hierarchy) */
  --ssd-star: #e6aa37;
  --ssd-ok: #34a853;
  --ssd-danger: #d64545;
  --ssd-page: #faf8f5;
  --ssd-page-0: rgba(250, 248, 245, 0);   /* --ssd-page at 0 alpha (edge fades) */
  --ssd-section: #f4f6f9;         /* subtle hover/section fill (menus, chips) */
  --ssd-card-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  --ssd-white: #fff;              /* surface fill (cards, popovers, arrows) */
  --ssd-placeholder: #eef1f4;     /* image/thumb placeholder fill */
  --ssd-pop-shadow: 0 2px 10px rgba(0, 0, 0, .14);  /* raised control (arrows) */
}

/* ---------- "Our hotel selection" home rail ---------- */
.ssd-home-rail__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.ssd-rail-seemore {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-weight: 600; font-size: 14px; color: var(--ssd-btn);
  text-decoration: none; white-space: nowrap;
}
.ssd-rail-seemore:hover { color: var(--ssd-btn-hover); text-decoration: underline; }
.ssd-rail-seemore-m { display: none; margin-top: 18px; }

.ssd-rail {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px 2px 12px;
  min-height: 264px;   /* reserve a card row → no layout shift (CLS) on load */
}
.ssd-rail::-webkit-scrollbar { height: 0; width: 0; }

.ssd-rail-card {
  flex: 0 0 260px; width: 260px; display: block; text-decoration: none;
  background: #fff; border: 1px solid var(--ssd-border); border-radius: var(--ssd-radius);
  overflow: hidden; box-shadow: var(--ssd-card-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ssd-rail-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.ssd-rail-card__media { position: relative; height: 170px; background: #eef1f4; }
.ssd-rail-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ssd-rail-card__save {
  position: absolute; top: 10px; left: 10px;
  background: var(--ssd-ok); color: #fff; font-weight: 700; font-size: 12px;
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.ssd-rail-card__body { padding: 12px 14px 14px; }
.ssd-rail-card__name {
  font-size: 16px; font-weight: 700; color: var(--ssd-ink); margin: 0 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ssd-rail-card__stars { color: var(--ssd-star); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.ssd-rail-card__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ssd-rail-card__orig { color: var(--ssd-muted); text-decoration: line-through; font-size: 13px; }
.ssd-rail-card__deal { color: var(--ssd-slate); font-weight: 700; font-size: 17px; }
.ssd-rail-card__per { color: var(--ssd-muted); font-size: 12px; }

.ssd-rail-card--skel {
  flex: 0 0 260px; height: 252px; border: 1px solid var(--ssd-border);
  border-radius: var(--ssd-radius); background:
    linear-gradient(100deg, #eef1f4 30%, #f6f8fa 50%, #eef1f4 70%);
  background-size: 200% 100%; animation: ssd-shimmer 1.2s infinite;
}

/* ---- rail carousel affordances: edge arrows + fade cue + snap ----
   Cross-device: pointer-capable devices get clickable arrows; touch relies on
   native swipe + snap. The fade cue and snap apply everywhere. */
.ssd-rail-wrap { position: relative; }
.ssd-rail { scroll-snap-type: x proximity; }
.ssd-rail-card { scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) { .ssd-rail { scroll-behavior: auto; } }

/* Edge arrows — self-contained (deliberately NOT .ssd-fnav, whose ≤768px
   `display:none !important` rule would otherwise reach these too). Centred on
   the 170px media; shown on every device (JS toggles [hidden] at the ends).
   44px touch target on coarse pointers / small screens per WCAG 2.5.5. */
/* Arrows are a POINTER-device affordance only. Touch devices use native swipe
   + scroll-snap + peek + fade (the booking.com / Dayuse / Airbnb mobile
   pattern) — no overlay arrows, so nothing sits over the first card and a tap
   only ever opens the card it lands on. */
.ssd-railnav { display: none; }
@media (hover: hover) and (pointer: fine) {
  .ssd-railnav {
    position: absolute; top: 90px; transform: translateY(-50%); z-index: 4;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--ssd-border); background: var(--ssd-white); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--ssd-pop-shadow); color: var(--ssd-ink);
    transition: opacity .15s ease, color .15s ease, border-color .15s ease;
  }
  .ssd-railnav[hidden] { display: none; }        /* only when the rail can't scroll */
  .ssd-railnav:hover { color: var(--ssd-accent-ink); border-color: var(--ssd-accent); }
  .ssd-railnav:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
  .ssd-railnav--prev { left: -6px; }
  .ssd-railnav--next { right: -6px; }
  /* At a list end the arrow stays in place but greys out + goes inert. It still
     captures the click (it isn't removed), so the click can't fall through to
     the card underneath — no accidental hotel open. */
  .ssd-railnav.is-disabled { opacity: .3; cursor: default; box-shadow: none; }
  .ssd-railnav.is-disabled:hover { color: var(--ssd-ink); border-color: var(--ssd-border); }
}

/* soft edge fade — only when there is more to scroll that way */
.ssd-rail-wrap::before,
.ssd-rail-wrap::after {
  content: ""; position: absolute; top: 4px; bottom: 12px; width: 56px;
  pointer-events: none; opacity: 0; transition: opacity .2s ease; z-index: 3;
}
.ssd-rail-wrap::before {
  left: 0; background: linear-gradient(90deg, var(--ssd-page), var(--ssd-page-0));
}
.ssd-rail-wrap::after {
  right: 0; background: linear-gradient(270deg, var(--ssd-page), var(--ssd-page-0));
}
.ssd-rail-wrap.has-prev::before { opacity: 1; }
.ssd-rail-wrap.has-next::after { opacity: 1; }

/* Home-rail card width — all 6 tiers, largest → smallest (smooth scaling) */
@media (max-width: 1199px) { .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 252px; width: 252px; } }
@media (max-width: 991px)  { .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 244px; width: 244px; } }
@media (max-width: 768px)  { .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 236px; width: 236px; } }
@media (max-width: 575px) {
  .ssd-home-rail__head .ssd-rail-seemore { display: none; }  /* use bottom button */
  .ssd-rail-seemore-m { display: block; }
  .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 226px; width: 226px; }
}
@media (max-width: 480px)  { .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 212px; width: 212px; } }
@media (max-width: 400px)  { .ssd-rail-card, .ssd-rail-card--skel { flex-basis: 196px; width: 196px; } }

/* ---------- Search bar ---------- */
/* ============================================================
   SEARCH COMPONENT — ONE design shared by the home hero
   (.ssd-hero-pill) and the listing page (.ssd-searchbar).
   The markup is identical; only the wrapper class + CTA label
   differ. Edit here once to change both pages.
   ============================================================ */
/* Shared search surface (home hero + /hotels). Identical on both — the home
   hero differs ONLY by the pill border-radius set just below. */
.ssd-hero-pill,
.ssd-searchbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid var(--ss-navy);
  border-radius: var(--ssd-radius);
  padding: 10px;
  box-shadow: var(--ssd-card-shadow);
}
/* home = pill shape; extra right padding so the optical gap between the CTA
   and the pill's curved right edge matches the visual spacing elsewhere (a
   curved edge reads tighter than a flat one at equal math padding). */
.ssd-hero-pill { border-radius: 999px; padding-right: 24px; }
/* CTA echoes the pill: a concentric inner pill so its curve nests in the
   container's rounded end (instead of a square button fighting the curve). */
.ssd-hero-pill .ssd-hero-btn { border-radius: 999px; }
.ssd-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--ssd-border);
  border-radius: 10px;
  background: #fff;
  min-height: 48px;
}
.ssd-field--loc { flex: 1 1 280px; }
.ssd-field--date { flex: 0 1 170px; }
.ssd-field--guests { flex: 0 1 140px; }
.ssd-field__icon { color: var(--ssd-accent); flex-shrink: 0; }
/* One unified surface: segments are borderless with a thin navy divider
   between location | date (no "box-in-box"). Fields become boxes on mobile. */
.ssd-hero-pill .ssd-field,
.ssd-searchbar .ssd-field { border: 0; border-radius: 0; background: transparent; }
.ssd-hero-pill .ssd-field--loc,
.ssd-searchbar .ssd-field--loc { border-right: 1px solid var(--ss-navy); }
.ssd-input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 15px;
  color: var(--ssd-ink);
  text-align: left;
}
/* placeholder uses the muted-text token (both pages); opacity:1 so Firefox
   doesn't dim it further. */
.ssd-input::placeholder { color: var(--ssd-muted); opacity: 1; }
/* CTA — identical solid-navy button on both pages ("See hotels" / "Search"). */
.ssd-hero-btn,
.btn_1.ssd-search-btn {
  border: 0; border-radius: 10px;
  background: var(--ss-navy); color: #fff;
  font-weight: 700; padding: 0 26px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; align-self: stretch; cursor: pointer;
}
.ssd-hero-btn:hover, .ssd-hero-btn:focus,
.btn_1.ssd-search-btn:hover, .btn_1.ssd-search-btn:focus {
  background: var(--ss-navy-hover);
}

/* Any filled theme btn_1 inside the discovery UI (Retry / Clear filters /
   Next-available-date) uses the navy primary + hover — removes the theme's
   old bright-teal #56c6d2 + gold #e6aa37 hover inconsistency. Outline
   variants keep their outline look. */
.ssd .btn_1:not(.outline) { background: var(--ssd-btn); }
.ssd .btn_1:not(.outline):hover,
.ssd .btn_1:not(.outline):focus { background: var(--ssd-btn-hover); }

/* ---------- Hero wrapper (home page) — surface/fields/CTA come from the
   shared SEARCH COMPONENT rules above; only the hero layout wrapper + trust
   row are hero-specific. ---------- */
.ssd-hero-form { width: 100%; max-width: 820px; margin: 26px auto 0; }
.ssd-hero-trust { display: flex; gap: 24px; justify-content: center; margin-top: 14px; color: #fff; font-size: 14px; }
.ssd-hero-trust i { margin-right: 6px; }

/* ---------- Results page header ---------- */
.ssd-results-top { padding-top: calc(var(--ssd-header-h) + 16px); padding-bottom: 6px; background: #fff; }
.ssd-results-h1 { font-size: 26px; font-weight: 800; margin: 0; color: var(--ssd-ink); }
.ssd-results-sub { color: var(--ssd-muted); margin: 4px 0 0; }
.margin_60_40 { margin-top: 20px; margin-bottom: 48px; }
/* The removed .ssd-results-top heading used to clear the floating site header.
   With it gone, push the discovery search bar below the header on desktop.
   (On mobile ≤991 the search bar is position:fixed, so it must NOT get this.) */
@media (min-width: 992px) {
  #ssd-discovery { padding-top: calc(var(--ssd-header-h, 96px) + 16px); margin-top: 0; }
}

/* ---------- Date picker (invisible tap target — consistent across platforms) ----
   The native <input type="date"> is overlaid at opacity:0 so platform chrome /
   locale format never shows; a styled value span is the visible display. */
.ssd-datefield { position: relative; }
.ssd-datefield__input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; background: transparent; margin: 0; padding: 0;
  pointer-events: none;   /* taps go to the field -> SSD custom calendar opens */
}

/* ---------- Custom date picker (popover desktop / modal mobile) ---------- */
.ssd-cal {
  z-index: 1300; width: 300px; max-width: calc(100vw - 16px); padding: 12px;
  background: #fff; border: 1px solid var(--ssd-border); border-radius: 14px;
  box-shadow: 0 14px 38px rgba(20, 40, 55, .18);
}
.ssd-cal--pop { position: fixed; }
.ssd-cal--modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ssd-cal-backdrop { position: fixed; inset: 0; z-index: 1299; background: rgba(20, 30, 32, .5); }
.ssd-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ssd-cal__title { font-size: 14px; font-weight: 700; color: var(--ssd-ink); }
.ssd-cal__nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--ssd-section, #f4f6f9); color: var(--ssd-ink); cursor: pointer;
}
.ssd-cal__nav:hover { background: var(--ss-navy-soft); }
.ssd-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ssd-cal__dow { padding: 4px 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--ssd-muted); }
.ssd-cal__day {
  height: 38px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ssd-ink); font-size: 13px; cursor: pointer;
}
.ssd-cal__day:hover:not(:disabled) { background: var(--ssd-section, #f4f6f9); }
.ssd-cal__day:disabled { color: #c7ccd2; cursor: default; }
.ssd-cal__day.is-sel { background: var(--ss-navy); color: #fff; font-weight: 700; }
.ssd-cal__day:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
@media (max-width: 575px) { .ssd-cal__day { height: 44px; } }
.ssd-datefield__value { pointer-events: none; font-size: 15px; color: var(--ssd-ink); white-space: nowrap; }
.ssd-d-datepick {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ssd-border); border-radius: 8px; padding: 8px 12px;
  min-height: 44px; cursor: pointer; background: #fff;
}
.ssd-d-datepick i, .ssd-d-datepick .ssd-d-datelabel { pointer-events: none; }
.ssd-d-datepick i { color: var(--ssd-accent); }
@media (max-width: 768px) { .ssd-datefield__input { font-size: 16px; } }

/* ---------- Autocomplete dropdown ---------- */
/* ≤575px the loc segment is only ~90px wide — a dropdown anchored to it
   truncates every suggestion to a letter or two. Re-anchor to the whole
   searchbar (results page only; the hero stacks its fields full-width). */
@media (max-width: 575px) {
  .ssd-searchbar { position: relative; }
  .ssd-searchbar .ssd-field--loc { position: static; }
}
.ssd-ac {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--ssd-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  max-height: 360px;
  overflow-y: auto;
  z-index: 60;
  padding: 6px;
}
.ssd-ac__group {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ssd-muted);
  padding: 8px 10px 4px;
}
.ssd-ac__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.ssd-ac__item:hover, .ssd-ac__item.is-active { background: var(--ssd-section); }
.ssd-ac__thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--ssd-placeholder); }
.ssd-ac__pin { width: 40px; text-align: center; color: var(--ssd-accent); flex-shrink: 0; }
.ssd-ac__text { display: flex; flex-direction: column; min-width: 0; }
.ssd-ac__name {
  font-weight: 600; color: var(--ssd-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ssd-ac__sub {
  font-size: 12px; color: var(--ssd-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* emphasise the substring the user typed (scannability) */
.ssd-ac__mark { background: transparent; color: var(--ss-navy); font-weight: 700; }
.ssd-ac__loading, .ssd-ac__none, .ssd-ac__error {
  padding: 14px; color: var(--ssd-muted); font-size: 14px;
}
.ssd-ac__loading { display: flex; align-items: center; gap: 8px; }
.ssd-ac__spin {
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--ssd-border); border-top-color: var(--ssd-accent);
  animation: ssd-ac-spin .6s linear infinite;
}
@keyframes ssd-ac-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ssd-ac__spin { animation-duration: 1.4s; } }
.ssd-ac__retry {
  border: 0; background: transparent; padding: 0 2px;
  color: var(--ssd-btn); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: underline;
}
.ssd-ac__retry:hover { color: var(--ssd-btn-hover); }
.ssd-ac__retry:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; border-radius: 4px; }
/* screen-reader-only live region for result-count announcements */
.ssd-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Filter bar (dayuse-style) ---------- */
/* Filter bar (dayuse-style): pinned left controls + scrollable quick chips.
   Only the chip region scrolls; arrows sit at its edges. No visible scrollbar. */
.ssd-filterwrap {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; min-width: 0;
}
.ssd-filter-fixed { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ssd-filter-scroll { position: relative; flex: 1 1 auto; min-width: 0; }
.ssd-filterbar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.ssd-filterbar::-webkit-scrollbar { height: 0; width: 0; }

/* edge nav arrows — shown by JS only when the chip region overflows that way */
.ssd-fnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ssd-border); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14); color: var(--ssd-ink);
}
.ssd-fnav:hover { color: var(--ssd-accent-ink); border-color: var(--ssd-accent); }
.ssd-fnav:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
.ssd-fnav[hidden] { display: none; }
.ssd-fnav--prev { left: -2px; }
.ssd-fnav--next { right: -2px; }
/* soft fade under each arrow so chips don't appear cut */
.ssd-filter-scroll::before,
.ssd-filter-scroll::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 44px;
  pointer-events: none; z-index: 3; opacity: 0; transition: opacity .15s;
}
.ssd-filter-scroll::before { left: 0; background: linear-gradient(to right, var(--ssd-page), transparent); }
.ssd-filter-scroll::after { right: 0; background: linear-gradient(to left, var(--ssd-page), transparent); }
.ssd-filter-scroll.has-prev::before { opacity: 1; }
.ssd-filter-scroll.has-next::after { opacity: 1; }

/* chip leading icon (dayuse-style) */
.ssd-fchip__ico { font-size: 14px; color: var(--ssd-accent-ink); line-height: 1; }
.ssd-fchip.is-active .ssd-fchip__ico { color: var(--ss-navy); }

.ssd-fchip {
  white-space: nowrap; border: 1px solid var(--ssd-border); background: #fff;
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 13px;
  color: var(--ssd-ink); min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
}
.ssd-fchip:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }

/* Mobile: pinning the left group wastes space — let the whole bar scroll. */
@media (max-width: 768px) {
  .ssd-filterwrap {
    display: flex; overflow-x: auto; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ssd-filterwrap::-webkit-scrollbar { height: 0; width: 0; }
  .ssd-filter-fixed { flex: 0 0 auto; }
  .ssd-filter-scroll { flex: 0 0 auto; overflow: visible; }
  .ssd-filterbar { overflow: visible; }
  .ssd-fnav { display: none !important; }   /* swipe instead on touch */
  .ssd-filter-scroll::before, .ssd-filter-scroll::after { display: none; }
}
.ssd-fchip.is-active { border-color: var(--ss-navy); background: var(--ss-navy-soft); color: var(--ss-navy); font-weight: 600; }
.ssd-fchip--all { font-weight: 700; }
.ssd-fchip--all.is-active {
  border-color: var(--ss-navy);
  background: var(--ss-navy-soft);
  color: var(--ss-navy);
}
/* applied-filter count badge on "All filters" */
.ssd-fcount {
  display: none; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 999px; background: var(--ss-navy); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.ssd-fcount.is-shown { display: inline-flex; }

/* Inline filter dropdowns: one pill system with a custom chevron (native OS
   caret removed) so they match the chips across browsers. The <select> stays
   the source of truth — only its chrome changes. */
.ssd-fselect {
  white-space: nowrap; border: 1px solid var(--ssd-border); background: #fff;
  color: var(--ssd-ink);
  border-radius: 999px; padding: 8px 34px 8px 14px; font-size: 13px;
  min-height: 44px; cursor: pointer; flex: 0 0 auto;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6470' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 12px;
}
.ssd-fselect:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
/* applied state — a filter with a chosen value reads as active (navy) */
.ssd-fselect.is-active {
  border-color: var(--ss-navy);
  background-color: var(--ss-navy-soft);
  color: var(--ss-navy); font-weight: 600;
}

/* ---------- Custom select (branded dropdown menu) ----------
   JS hides the native <select> (kept as source of truth) and renders this
   trigger + a body-portaled listbox so the menu is never clipped by the
   filter bar's horizontal scroll. */
.ssd-selwrap { position: relative; display: inline-flex; flex: 0 0 auto; }
select.ssd-enhanced {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  border: 0; clip: rect(0 0 0 0); overflow: hidden; opacity: 0; pointer-events: none;
}
.ssd-seltrig {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 1px solid var(--ssd-border); background: #fff; color: var(--ssd-ink);
  border-radius: 999px; padding: 8px 12px 8px 14px; font-size: 13px;
  min-height: 44px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.ssd-seltrig:hover { border-color: var(--ssd-accent); }
.ssd-seltrig:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
.ssd-seltrig.is-active {
  border-color: var(--ss-navy); background: var(--ss-navy-soft);
  color: var(--ss-navy); font-weight: 600;
}
.ssd-seltrig__lbl { overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.ssd-seltrig__chev { font-size: 12px; color: var(--ssd-muted); transition: transform .2s; }
.ssd-seltrig.is-open .ssd-seltrig__chev { transform: rotate(180deg); }

.ssd-menu {
  position: fixed; z-index: 1200; min-width: 180px; max-width: 320px;
  max-height: 320px; overflow-y: auto; padding: 6px;
  background: #fff; border: 1px solid var(--ssd-border); border-radius: 14px;
  box-shadow: 0 14px 38px rgba(20, 40, 55, .18);
  animation: ssd-menu-in .14s ease;
}
.ssd-menu[hidden] { display: none; }
@keyframes ssd-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ssd-menu { animation: none; } }
.ssd-menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 40px; padding: 9px 12px; border: 0; background: transparent;
  border-radius: 9px; font-size: 13px; color: var(--ssd-ink); text-align: left;
  white-space: nowrap; cursor: pointer;
}
.ssd-menu__item:hover, .ssd-menu__item.is-focus { background: var(--ssd-section, #f4f6f9); }
.ssd-menu__item[aria-selected="true"] { color: var(--ss-navy); font-weight: 600; }
.ssd-menu__chk { font-size: 14px; opacity: 0; color: var(--ss-navy); flex-shrink: 0; }
.ssd-menu__item[aria-selected="true"] .ssd-menu__chk { opacity: 1; }
@media (max-width: 575px) { .ssd-menu { min-width: 160px; } }
.ssd-fdiv { width: 1px; align-self: stretch; background: var(--ssd-border); margin: 4px 2px; flex-shrink: 0; }

/* All-filters panel */
.ssd-filterpanel {
  border: 1px solid var(--ssd-border); border-radius: 12px; background: #fff;
  padding: 16px; margin: 8px 0 4px; box-shadow: var(--ssd-card-shadow);
}
/* panel header */
.ssd-fp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ssd-fp__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--ssd-ink); }
.ssd-fp__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--ssd-section, #f4f6f9); color: var(--ssd-muted);
  font-size: 15px; cursor: pointer; transition: background .15s, color .15s;
}
.ssd-fp__close:hover { background: #fde8e8; color: #d6422b; }

/* sections divided by hairlines */
.ssd-fp__sec { padding: 14px 0; border-top: 1px solid var(--ssd-border); }
.ssd-fp__sec:first-of-type { padding-top: 0; border-top: 0; }
.ssd-fp__label { margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--ssd-ink); }

/* price range — exact min/max inputs */
.ssd-price-inputs { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ssd-priceinput {
  flex: 1; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--ssd-border); border-radius: 10px;
  font-size: 14px; color: var(--ssd-ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.ssd-priceinput:focus {
  outline: 0; border-color: var(--ss-navy);
  box-shadow: 0 0 0 3px var(--ss-navy-soft);
}
.ssd-price-dash { color: var(--ssd-muted); flex-shrink: 0; }

/* price range — scale chips (set the slider's reach) */
.ssd-scale { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ssd-scale__chip {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--ssd-border);
  border-radius: 999px; background: #fff; color: var(--ssd-ink);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.ssd-scale__chip:hover { border-color: var(--ssd-accent); }
.ssd-scale__chip.is-active {
  border-color: var(--ss-navy); background: var(--ss-navy-soft);
  color: var(--ss-navy);
}
.ssd-scale__chip:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
/* small screens: 16px (no iOS zoom) + ≥44px touch targets, bigger slider thumb */
@media (max-width: 768px) {
  .ssd-priceinput { font-size: 16px; min-height: 44px; }
  .ssd-scale__chip { min-height: 44px; padding: 9px 18px; }
  .ssd-slider__h::-webkit-slider-thumb { width: 24px; height: 24px; }
  .ssd-slider__h::-moz-range-thumb { width: 24px; height: 24px; }
}

/* price range — dual-handle slider (two overlaid range inputs) */
.ssd-slider { position: relative; height: 40px; margin-top: 4px; }
.ssd-slider__rail {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 5px; border-radius: 999px; background: var(--ssd-border, #e2e6ea);
}
.ssd-slider__fill {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 5px; border-radius: 999px; background: var(--ss-navy);
}
.ssd-slider__h {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 40px;
  margin: 0; background: transparent; pointer-events: none;
  appearance: none; -webkit-appearance: none;
}
.ssd-slider__h::-webkit-slider-runnable-track { background: transparent; border: 0; }
.ssd-slider__h::-moz-range-track { background: transparent; border: 0; }
.ssd-slider__h::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  background: #fff; border: 2px solid var(--ss-navy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.ssd-slider__h::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  cursor: pointer; background: #fff; border: 2px solid var(--ss-navy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.ssd-slider__h:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--ssd-btn); outline-offset: 2px;
}
.ssd-slider__vals {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 13px; font-weight: 700; color: var(--ss-navy);
}

/* Ratings chips (mobile parity) */
.ssd-rating-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ssd-rchip {
  border: 1px solid var(--ssd-border); background: #fff; color: var(--ssd-ink);
  border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: border-color .15s, background .15s, color .15s;
}
.ssd-rchip:hover { border-color: var(--ssd-accent); }
.ssd-rchip.is-active { border-color: var(--ss-navy); background: var(--ss-navy-soft); color: var(--ss-navy); }
.ssd-rchip:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }

/* Hotel Amenities — dynamic selectable chips (from public API) */
.ssd-amenity-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* expanded: cap height + scroll so 100+ amenities don't blow up the panel */
.ssd-amenity-chips.is-expanded { max-height: 220px; overflow-y: auto; padding: 2px; margin: -2px; }
.ssd-amenity-loading { font-size: 13px; color: var(--ssd-muted); }
.ssd-achip {
  border: 1px solid var(--ssd-border); background: #fff; color: var(--ssd-ink);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: border-color .15s, background .15s, color .15s;
}
.ssd-achip[hidden] { display: none; }
.ssd-achip:hover { border-color: var(--ssd-accent); }
.ssd-achip.is-active { border-color: var(--ss-navy); background: var(--ss-navy-soft); color: var(--ss-navy); font-weight: 600; }
.ssd-achip:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
.ssd-amenity-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 8px 14px; border: 1px solid var(--ssd-border); border-radius: 999px;
  background: #fff; color: var(--ss-navy); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.ssd-amenity-more:hover {
  border-color: var(--ss-navy); background: var(--ss-navy-soft);
}
.ssd-amenity-more__chev { font-size: 12px; transition: transform .2s; }
.ssd-amenity-more.is-open .ssd-amenity-more__chev { transform: rotate(180deg); }
.ssd-amenity-more[hidden] { display: none; }
.ssd-fp__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Search-as-I-move checkbox + map popup */
.ssd-movesearch {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  background: #fff; border: 1px solid var(--ssd-border); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.14);
}
.ssd-movesearch__txt { color: var(--ssd-ink); }

/* Shared toggle switch (matches the cookie-consent switch styling) */
.ssd-toggle { position: relative; display: inline-block; flex-shrink: 0; width: 40px; height: 22px; }
.ssd-toggle input { position: absolute; width: 0; height: 0; opacity: 0; margin: 0; }
.ssd-toggle__track {
  position: absolute; inset: 0; background: #cdd7d9; border-radius: 999px;
  transition: background .2s; cursor: pointer;
}
.ssd-toggle__track::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.ssd-toggle input:checked + .ssd-toggle__track { background: var(--ss-navy); }
.ssd-toggle input:checked + .ssd-toggle__track::before { transform: translateX(18px); }
.ssd-toggle input:focus-visible + .ssd-toggle__track { box-shadow: 0 0 0 3px rgba(30,58,95,.4); }
.ssd-mappop { width: 240px; }
.ssd-mappop__img img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; display: block; }
.ssd-mappop__body { padding-top: 8px; }
.ssd-mappop__name { font-weight: 700; color: var(--ssd-ink); }
.ssd-mappop__sub { font-size: 12px; color: var(--ssd-muted); margin: 2px 0; }
.ssd-mappop__price { font-weight: 700; color: var(--ssd-slate); margin: 4px 0 8px; }
.ssd-mappop__cta { display: flex; gap: 8px; }
.ssd-mappop__cta .ssd-btn-ghost, .ssd-mappop__cta .ssd-btn-app { padding: 7px 12px; min-height: 38px; font-size: 13px; }

/* ---------- Controls row ---------- */
.ssd-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
}
/* count ellipsizes so the long label never pushes Sort off-screen / gets
   clipped by the sheet's overflow-x:hidden on narrow viewports */
.ssd-count {
  min-width: 0; font-size: 14px; color: var(--ssd-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ssd-controls__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ssd-sort { display: flex; align-items: center; gap: 6px; }
.ssd-sort__label { font-size: 13px; color: var(--ssd-muted); }
/* Sort uses the same pill + chevron as the filter dropdowns (was an 8px rect,
   33px tall, 15px font — now unified to 44px / 999px / 13px). */
.ssd-sort .ssd-input {
  border: 1px solid var(--ssd-border); background: #fff; color: var(--ssd-ink);
  border-radius: 999px; padding: 8px 34px 8px 14px; font-size: 13px;
  min-height: 44px; width: auto; cursor: pointer;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6470' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 12px;
}
.ssd-maptoggle {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ssd-border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 44px;
}

/* ---------- Split list + map ---------- */
.ssd-split { display: flex; gap: 20px; align-items: flex-start; }
.ssd-list { flex: 1 1 58%; min-width: 0; }
.ssd-mapwrap {
  flex: 0 0 42%;
  position: sticky;
  top: calc(var(--ssd-header-h) + 16px);
  height: 78vh;
  border-radius: var(--ssd-radius);
  overflow: hidden;
  border: 1px solid var(--ssd-border);
}
.ssd-map { width: 100%; height: 100%; background: #eef1f4; }
.ssd-search-area {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--ssd-border);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); font-weight: 600; z-index: 5;
}
.ssd-map-close { display: none; }
/* bottom-sheet drag handle — mobile only; hidden on desktop split view */
.ssd-sheet-grip { display: none; }

/* ---------- Hotel card ---------- */
.ssd-cardwrap > .ssd-card { margin-bottom: var(--ssd-gap); }
.ssd-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--ssd-border);
  border-radius: var(--ssd-radius);
  overflow: hidden;
  box-shadow: var(--ssd-card-shadow);
  transition: box-shadow .18s, transform .18s;
  cursor: pointer;                 /* whole card opens the detail page */
}
.ssd-card:hover, .ssd-card.is-active { box-shadow: 0 6px 22px rgba(0,0,0,.14); }
.ssd-card:hover { transform: translateY(-2px); }
/* real controls must sit above the card-click layer + keep a default cursor */
.ssd-card a, .ssd-card button { cursor: pointer; }
.ssd-card.is-active { outline: 2px solid var(--ss-navy); }
.ssd-card__media { position: relative; flex: 0 0 240px; display: block; min-height: 170px; }
.ssd-card__img { width: 100%; height: 100%; min-height: 170px; object-fit: cover; display: block; background: #eef1f4; }

/* ---------- Card image carousel ---------- */
/* Absolute-fill so the gallery never drives the card height — the media box is
   sized by the card body (desktop row) or the explicit media height (mobile),
   exactly like the old single <img>. Prevents the image from stretching the row. */
.ssd-cardgal { position: absolute; inset: 0; overflow: hidden; }
.ssd-cardgal__track { display: flex; height: 100%; transition: transform .3s ease; }
.ssd-cardgal__slide { flex: 0 0 100%; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .ssd-cardgal__track { transition: none; } }

.ssd-cardgal__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255, 255, 255, .92); color: var(--ssd-ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .15s, background .15s;
}
.ssd-cardgal__nav--prev { left: 8px; }
.ssd-cardgal__nav--next { right: 8px; }
.ssd-cardgal__nav:hover { background: #fff; }
.ssd-card__media:hover .ssd-cardgal__nav,
.ssd-cardgal__nav:focus-visible { opacity: 1; }
.ssd-cardgal__nav:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
/* touch devices have no hover — keep arrows discoverable but subtle (swipe is primary) */
@media (hover: none) { .ssd-cardgal__nav { opacity: .9; } }

.ssd-cardgal__dots {
  position: absolute; left: 0; right: 0; bottom: 8px; z-index: 3;
  display: flex; gap: 5px; justify-content: center; pointer-events: none;
}
.ssd-cardgal__dot {
  pointer-events: auto; width: 6px; height: 6px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255, 255, 255, .65); cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, .4); transition: width .15s, background .15s;
}
.ssd-cardgal__dot.is-active { width: 16px; background: #fff; }
.ssd-pill {
  display: inline-block;
  background: #fff; color: var(--ssd-slate);
  font-weight: 700; border-radius: 999px;
  padding: 4px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  font-size: 14px;
}
/* No-price hotels: a neutral dot marker instead of a fake "—" price pill */
.ssd-pill--dot {
  width: 14px; height: 14px; padding: 0;
  background: var(--ss-navy); border: 2px solid #fff;
}
.ssd-card__price { position: absolute; left: 12px; bottom: 12px; }
/* active map marker (selected via carousel/card sync) — on-system navy */
.ssd-pill.is-active { background: var(--ss-navy); color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.32); }

/* ---------- Favourite heart (anonymous, localStorage) ---------- */
.ssd-fav {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .92); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22); padding: 0; z-index: 2;
  transition: transform .12s ease, background .2s ease;
}
.ssd-fav:hover { background: #fff; transform: scale(1.06); }
.ssd-fav:active { transform: scale(.92); }
.ssd-fav:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
.ssd-fav svg { width: 20px; height: 20px; display: block; }
.ssd-fav svg path { fill: none; stroke: var(--ssd-slate); stroke-width: 2; }
.ssd-fav.is-fav svg path { fill: var(--ssd-danger); stroke: var(--ssd-danger); }
.ssd-fav.is-fav { background: #fff; }
.ssd-fav--pop { top: 8px; right: 8px; width: 40px; height: 40px; }

/* Saved filter chip */
.ssd-fchip--saved .ssd-fchip__heart { width: 14px; height: 14px; }
.ssd-fchip--saved .ssd-fchip__heart path { fill: none; stroke: currentColor; stroke-width: 2; }
.ssd-fchip--saved.is-active .ssd-fchip__heart path { fill: var(--ssd-danger); stroke: var(--ssd-danger); }
.ssd-fchip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--ssd-accent-tint); color: var(--ssd-accent-ink);
  font-size: 11px; font-weight: 700; margin-left: 2px;
}

/* Saved-only view: hide loaded cards that aren't favourited */
.ssd-list.is-saved-only .ssd-card:not(.is-fav) { display: none; }

.ssd-saved-empty { text-align: center; padding: 40px 16px; color: var(--ssd-muted); }
.ssd-saved-empty p { margin: 0 0 6px; font-size: 16px; color: var(--ssd-ink); }
.ssd-saved-empty__sub { font-size: 13.5px !important; color: var(--ssd-muted) !important; max-width: 360px; margin: 0 auto !important; }
.ssd-card__body { flex: 1 1 auto; padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ssd-card__top { display: flex; justify-content: space-between; gap: 8px; }
.ssd-card__name { font-size: 17px; font-weight: 700; color: var(--ssd-ink); margin: 0; min-width: 0; text-transform: capitalize; }
.ssd-card__namelink {
  color: inherit; text-decoration: none; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ssd-card__namelink:hover { color: var(--ss-navy); }
.ssd-card__stars { color: var(--ssd-star); white-space: nowrap; flex-shrink: 0; }
.ssd-card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ssd-muted); }
.ssd-card__rating { font-weight: 600; color: var(--ssd-slate); white-space: nowrap; }
.ssd-card__dist { font-weight: 600; color: var(--ssd-slate); }
.ssd-card__amen { font-size: 12px; color: var(--ssd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssd-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ssd-card__cta { display: flex; gap: 8px; }

/* ---------- Badges ---------- */
.ssd-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: #eef6f1; color: var(--ssd-ok);
}
.ssd-badge--neutral { background: #f0f1f3; color: var(--ssd-muted); }
.ssd-badge--ok { background: #eef6f1; color: var(--ssd-ok); }
.ssd-badge--low { background: #fff3e6; color: #b6671a; }

/* ---------- Buttons (small, theme-aligned) ---------- */
.ssd-btn-app {
  border: 0; cursor: pointer; font-weight: 700;
  background: var(--ssd-btn); color: #fff;
  border-radius: 8px; padding: 10px 16px; min-height: 44px;
}
.ssd-btn-app:hover { background: var(--ssd-btn-hover); }
.ssd-btn-app--lg { width: 100%; font-size: 16px; }
.ssd-btn-ghost {
  border: 1.5px solid var(--ss-navy); background: #fff;
  color: var(--ss-navy);
  border-radius: 8px; padding: 9px 14px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
}
.ssd-btn-ghost:hover { background: var(--ss-navy); color: #fff; }
.ssd-icon-btn {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--ssd-border);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ssd-slate);
  background: #fff; transition: border-color .15s, background .15s, color .15s;
}
.ssd-icon-btn:hover { border-color: var(--ss-navy); color: var(--ss-navy); background: var(--ss-navy-soft); }
.ssd-icon-btn:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }

/* Unified keyboard-focus ring for form controls (the invisible date overlay
   shows its ring on the visible container via :focus-within). */
.ssd input:focus-visible,
.ssd select:focus-visible,
.ssd textarea:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
/* The search inputs live INSIDE a unified pill/bar. A box-shadow ring on the
   raw input would re-create a "box-in-box" look, so instead we show focus on
   the WHOLE search surface (:focus-within) and keep the input itself flat. */
.ssd-hero-pill .ssd-input:focus,
.ssd-hero-pill .ssd-input:focus-visible,
.ssd-searchbar .ssd-input:focus,
.ssd-searchbar .ssd-input:focus-visible {
  outline: none;
  box-shadow: none;
}
/* Bar-level focus ring — identical on both, keeps the surface unified. */
.ssd-hero-pill:focus-within,
.ssd-searchbar:focus-within {
  border-color: var(--ss-navy);
  box-shadow: var(--ssd-card-shadow), 0 0 0 3px var(--ss-navy-glow);
}
/* The search-bar date segment shows focus via the bar-level :focus-within glow
   (same as the location field). Suppress the field's own UA outline on mouse
   (that stray rectangle); keep a subtle rounded ring for KEYBOARD users only. */
.ssd-hero-pill .ssd-datefield,
.ssd-searchbar .ssd-datefield { outline: none; }
.ssd-hero-pill .ssd-datefield:focus-visible,
.ssd-searchbar .ssd-datefield:focus-visible {
  outline: 2px solid var(--ss-navy); outline-offset: 2px; border-radius: 8px;
}
.ssd-d-datepick:focus-within { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }

/* ---------- States: skeleton / empty / error ---------- */
.ssd-skeletons { display: flex; flex-direction: column; gap: var(--ssd-gap); }
.ssd-skel {
  height: 170px; border-radius: var(--ssd-radius);
  background: linear-gradient(90deg,#eef1f4 25%,#e2e6ea 37%,#eef1f4 63%);
  background-size: 400% 100%; animation: ssd-shimmer 1.3s ease infinite;
}
@keyframes ssd-shimmer { 0%{background-position:100% 0} 100%{background-position:0 0} }
@media (prefers-reduced-motion: reduce) { .ssd-skel { animation: none; } }
.ssd-empty, .ssd-error {
  text-align: center; padding: 40px 20px; color: var(--ssd-muted);
}
.ssd-empty i { font-size: 28px; display: block; margin-bottom: 8px; }
.ssd-loadmore {
  display: block; margin: 8px auto 0; background: #fff;
  border: 1px solid var(--ssd-border); border-radius: 8px;
  padding: 10px 20px; cursor: pointer; min-height: 44px;
  transition: border-color .15s, color .15s;
}
.ssd-loadmore:hover { border-color: var(--ss-navy); color: var(--ss-navy); }
.ssd-loadmore:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }

/* ---------- Get-the-app modal (shared) ---------- */
/* above the cookie banner/overlay (99990/99995) so a user-triggered modal is
   never hidden behind the persistent consent bar */
.ssd-modal { position: fixed; inset: 0; z-index: 100000; display: none; }
.ssd-modal.is-open { display: block; }
.ssd-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.ssd-modal__box {
  position: relative; max-width: 420px; width: calc(100% - 32px);
  margin: 0 auto; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 16px; padding: 28px 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: ssd-modal-pop .26s cubic-bezier(.2,.8,.3,1.1);
}
/* center the box like the cookie modal (single, consistent modal pattern) */
.ssd-modal.is-open { display: flex; align-items: center; justify-content: center; padding: 20px; }
@keyframes ssd-modal-pop {
  from { transform: translateY(8px) scale(.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ssd-modal__box { animation: none; } }
.ssd-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: #f1f4f8; color: var(--ssd-muted);
  font-size: 20px; cursor: pointer; transition: background .15s, color .15s;
}
.ssd-modal__close:hover { background: #e6eaef; color: var(--ssd-ink); }
.ssd-modal__close:focus-visible { outline: 2px solid var(--ssd-btn); outline-offset: 2px; }
/* Symmetric side padding keeps the centred title clear of the 44px close
   button (12px inset + 44px = 56px; box pad 24px + 36px = 60px ≥ 56px). */
.ssd-modal__box h3 {
  margin: 0 0 4px; padding: 0 36px;
  font-size: 22px; line-height: 1.35;
}
.ssd-modal__box p { margin: 6px 0 0; color: var(--ssd-muted); }
.ssd-modal__qr { width: 160px; height: 160px; margin: 14px auto; display: block; }
.ssd-modal__stores { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.ssd-modal__stores a { display: inline-flex; }

/* Box is 420px max, so XL/LG/MD need no override — tiers start where the
   viewport actually constrains the modal. */
@media (max-width: 575px) {
  .ssd-modal.is-open { padding: 14px; }
  .ssd-modal__box { width: 100%; padding: 26px 18px; }
  .ssd-modal__box h3 { font-size: 20px; padding: 0 34px; }
}
@media (max-width: 480px) {
  .ssd-modal__box h3 { font-size: 18px; }
  .ssd-modal__stores a { flex: 1 1 40%; justify-content: center; }
}
@media (max-width: 400px) {
  .ssd-modal.is-open { padding: 10px; }
  .ssd-modal__box { padding: 24px 14px; }
  .ssd-modal__box h3 { padding: 0 32px; }
}

/* ---------- Smart app banner ---------- */
.ssd-appbanner {
  display: none; align-items: center; gap: 10px;
  background: var(--ssd-slate); color: #fff; padding: 10px 14px; font-size: 14px;
}
.ssd-appbanner .ssd-btn-app { padding: 6px 12px; min-height: 36px; }
.ssd-appbanner__x { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; }

/* ================= RESPONSIVE — 6 tiers ================= */
/* XL */
@media (max-width: 1199px) {
  .ssd-mapwrap { flex-basis: 40%; }
  .ssd-card__media { flex-basis: 210px; }
}
/* LG/MD — Dayuse-style mobile: full-screen map background + draggable bottom
   sheet of results. Search + filters float over the map (below the site
   header). The old map toggle / overlay / bottom-carousel are retired here. */
@media (max-width: 991px) {
  /* the page-level results header is redundant over a map-first view */
  .ssd-results-top { display: none; }

  /* search bar floats at the top over the map — kept to ONE compact row */
  #ssd-discovery .ssd-searchbar {
    position: fixed; left: 0; right: 0; top: var(--ssd-header-h); z-index: 30;
    flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 6px;
    margin: 0; padding: 8px 10px; border-radius: 0;
    border-left: 0; border-right: 0; border-top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
  }
  #ssd-discovery .ssd-field--loc { flex: 1 1 auto; }
  #ssd-discovery .ssd-field--date { flex: 0 0 auto; min-width: 96px; }
  #ssd-discovery .ssd-search-btn { padding: 0 16px; }

  /* filter chips float just under the search bar (JS sets the exact top) */
  #ssd-discovery .ssd-filterwrap {
    position: fixed; left: 0; right: 0;
    top: var(--ssd-topbar-h, calc(var(--ssd-header-h) + 62px)); z-index: 29;
    margin: 0; padding: 8px 10px; background: var(--ssd-page);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  }
  /* Phones: the pinned select group is ~694px wide — without its own
     scroll it inflates Chrome's layout viewport (~425px on a 375px
     phone), breaking fixed-bottom anchors and auto-zooming the page.
     One scrollable strip, Dayuse-style. (769–991px it fits; the chip
     nav arrows there rely on .ssd-filter-scroll staying untouched.) */
  @media (max-width: 768px) {
    #ssd-discovery .ssd-filterwrap {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    #ssd-discovery .ssd-filterwrap::-webkit-scrollbar { display: none; }
    #ssd-discovery .ssd-filter-scroll { flex: 0 0 auto; overflow: visible; }
  }
  .ssd-filterpanel {
    position: fixed; left: 8px; right: 8px;
    top: var(--ssd-filterpanel-top, calc(var(--ssd-header-h) + 116px)); z-index: 31;
    max-height: 68vh; overflow-y: auto;
    /* never let the panel's bottom edge run past the viewport on short
       screens — that pushed Clear all / Apply off-screen */
    max-height: min(68vh, calc(100dvh
      - var(--ssd-filterpanel-top, calc(var(--ssd-header-h) + 116px)) - 12px));
  }
  /* footer pinned to the panel bottom so the actions stay visible while
     the (long) amenities body scrolls under it */
  .ssd-fp__actions {
    position: sticky; bottom: 0; z-index: 2;
    margin: 10px -16px -16px; padding: 12px 16px;
    background: #fff; border-top: 1px solid var(--ssd-border);
    border-radius: 0 0 12px 12px;
  }

  /* map = always-on full-screen background below the header (z-index 1) */
  .ssd-split { display: block; gap: 0; }
  .ssd-mapwrap {
    position: fixed; left: 0; right: 0; top: var(--ssd-header-h); bottom: 0;
    height: auto; width: auto; border-radius: 0; border: 0; z-index: 1; display: block;
  }
  .ssd-map { height: 100%; }

  /* retired affordances — the sheet replaces them */
  .ssd-maptoggle, .ssd-map-close { display: none !important; }

  /* the results list becomes the draggable bottom sheet */
  .ssd-sheet-grip {
    display: flex; align-items: center; justify-content: center;
    position: sticky; top: 0; z-index: 3;
    min-height: 40px; background: #fff; border-radius: 18px 18px 0 0;
    cursor: grab; touch-action: none;
  }
  .ssd-sheet-grip:active { cursor: grabbing; }
  .ssd-sheet-grip__bar { width: 40px; height: 5px; border-radius: 999px; background: #c9d2d8; }
  .ssd-list {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    top: var(--ssd-filterpanel-top, calc(var(--ssd-header-h) + 116px));
    flex-basis: auto; background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
    overflow: hidden; padding: 0 14px;
    transition: transform .3s cubic-bezier(.2, .8, .3, 1); will-change: transform;
  }
  @media (prefers-reduced-motion: reduce) { .ssd-list { transition: none; } }

  /* Snap states: minimized (default) → summary + top edge of first
     card · half → card carousel with header · full → vertical list.
     is-card = pin-tap: ONE floating card over the map (Dayuse) — the
     sheet chrome disappears, map stays in view all around. */
  .ssd-list.is-collapsed { transform: translateY(calc(100% - 112px)); }
  /* Half sheet reveals ~430px, but never so much that it buries the map on
     short screens — cap the reveal so the map keeps a usable strip (≈175px). */
  .ssd-list.is-half      { transform: translateY(calc(100% - min(430px, 100dvh - 330px))); }
  .ssd-list.is-full      { transform: translateY(0); }
  /* is-card is still THE sheet — one unified draggable structure. The
     focused card floats over the map; the grip re-anchors as a bottom
     strip below it (Dayuse), so swiping up from it still expands to the
     full list and the map stays interactive around the card. */
  .ssd-list.is-card {
    top: auto; height: auto; transform: none;   /* content-sized, hugs bottom */
    background: transparent; box-shadow: none;
    pointer-events: none;
    display: flex; flex-direction: column;
  }
  .ssd-list.is-card > .ssd-controls { display: none; }
  .ssd-list.is-card .ssd-cardwrap { pointer-events: none; order: 1; }
  .ssd-list.is-card .ssd-card {
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);   /* floats over the map */
  }
  .ssd-list.is-card .ssd-sheet-grip {
    order: 2; position: static; margin: 10px -14px 0;
    pointer-events: auto; min-height: 44px;
    background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
  }

  /* sheet header (grip + count/sort) stays fixed at the top of the sheet */
  .ssd-list > .ssd-controls {
    flex-direction: row; align-items: center; gap: 10px;
    margin: 0 0 10px; padding: 2px 0 10px; border-bottom: 1px solid var(--ssd-border);
  }

  /* Sheet content is ALWAYS a vertical list (Dayuse) — minimized/half
     just clip it. Horizontal swipe exists ONLY on the floating pin-card. */
  .ssd-cardwrap { display: block; }
  .ssd-list.is-card .ssd-cardwrap {
    display: flex; flex-direction: row; gap: 12px;
    overflow-x: auto; overflow-y: hidden; padding-bottom: 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ssd-list.is-card .ssd-cardwrap::-webkit-scrollbar { display: none; }
  .ssd-list.is-card .ssd-card {
    flex: 0 0 86%; margin-bottom: 0; scroll-snap-align: center;
  }
  .ssd-list.is-card .ssd-card__media { height: 150px; }
  .ssd-list:not(.is-full) .ssd-loadmore { display: none; }

  .ssd-list.is-full { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
  .ssd-list.is-full > .ssd-controls { position: sticky; top: 40px; z-index: 2; background: #fff; }
  .ssd-list.is-full .ssd-cardwrap > .ssd-card { margin-bottom: var(--ssd-gap); }
}
/* Phones: focused-card presentation (Dayuse reference) — the tapped
   hotel's card nearly fills the sheet; neighbours peek ~10px, keeping
   the swipe affordance without reading as a scrolled strip. */
@media (max-width: 575px) {
  .ssd-list.is-card .ssd-card { flex-basis: calc(100% - 20px); }
}
/* MD */
@media (max-width: 768px) {
  /* home hero stacks like the listing bar: navy-boxed fields + full-width CTA
     (drop the desktop pill radius so the stacked bar isn't a lozenge) */
  .ssd-hero-pill { flex-direction: column; border-radius: 16px; }
  .ssd-hero-pill .ssd-field { border: 1px solid var(--ss-navy); border-radius: 10px; background: #fff; }
  .ssd-hero-pill .ssd-field--loc { border-right: 1px solid var(--ss-navy); }
  .ssd-hero-btn { width: 100%; border-radius: 10px; }
  .ssd-hero-trust { gap: 14px; flex-wrap: wrap; }
  .ssd { --ssd-header-h: 80px; }   /* mobile header (padding:15px 0); JS overwrites */
  .ssd-fp__grid { grid-template-columns: 1fr 1fr; }
  .ssd-searchbar { flex-direction: column; }
  /* stacked layout: give each field its own box back (no vertical divider) */
  .ssd-searchbar .ssd-field { border: 1px solid var(--ss-navy); border-radius: 10px; background: #fff; }
  .ssd-searchbar .ssd-field--loc { border-right: 1px solid var(--ss-navy); }
  .ssd-field--date, .ssd-field--guests, .ssd-field--loc { flex-basis: auto; }
  .ssd-input { font-size: 16px; } /* prevent iOS zoom */
  .ssd-controls { flex-direction: column; align-items: stretch; }
  .ssd-controls__right { justify-content: space-between; }
  .ssd-card__media { flex-basis: 160px; }
  .ssd-card__name { font-size: 16px; }
}
/* SM — card becomes vertical */
@media (max-width: 575px) {
  .ssd { --ssd-header-h: 76px; }   /* small-phone fallback; JS overwrites */
  .ssd-card { flex-direction: column; }
  .ssd-card__media { flex-basis: auto; width: 100%; height: 200px; }
  .ssd-card__body { padding: 14px; }
  .ssd-card__foot { flex-direction: column; align-items: stretch; }
  .ssd-card__cta { width: 100%; }
  .ssd-card__cta .ssd-btn-app, .ssd-card__cta .ssd-btn-ghost { flex: 1; text-align: center; justify-content: center; }
}
/* XS */
@media (max-width: 480px) {
  .ssd-card__media { height: 180px; }
  .ssd-pill { font-size: 13px; padding: 3px 10px; }
}
/* XXS */
@media (max-width: 400px) {
  .ssd-card__name { font-size: 15px; }
  .ssd-card__body { padding: 12px; }
  .ssd-search-btn { width: 100%; }
}

/* ============================================================================
   Mobile map-first discovery = self-contained full-viewport app.
   Root cause fix: on small screens every discovery child (search, filters,
   map, sheet) is position:fixed, so #ssd-discovery collapses to 0 height and
   the in-flow footer lands right under the header and bleeds in behind the
   fixed map. Lock the page (no body scroll into the footer) and drop the
   marketing footer here — like Dayuse / Airbnb / Booking mobile map views.
   ============================================================================ */
@media (max-width: 991px) {
  html:has(#ssd-discovery),
  body:has(#ssd-discovery) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body:has(#ssd-discovery) footer { display: none; }
}
