/* ==========================================================================
   Trips archive (search)
   ========================================================================== */
.hp-search { max-width: 1480px; margin-inline: auto; }
.hp-searchbar { position: sticky; top: calc(var(--hp-abar,0px) + var(--hp-hdr,68px)); z-index: 120; background: rgba(243,246,247,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hp-line-08); padding: 10px clamp(12px,2.5vw,28px); }
@media (max-width: 820px) { .hp-searchbar { position: static; } }
.hp-searchbar__inner { display: flex; gap: 6px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 0 0 1px rgba(14,27,36,.08), 0 12px 30px -24px rgba(14,27,36,.5); position: relative; }
@media (max-width: 820px) { .hp-searchbar__inner { flex-direction: column; } }
.hp-sb-field, .hp-sb-btn { background: var(--hp-bg); border: 0; border-radius: 10px; padding: 8px 14px; text-align: left; cursor: pointer; min-height: 48px; }
.hp-sb-field--dest { flex: 1.2; display: flex; flex-direction: column; }
.hp-sb-btn { flex: 1; display: flex; flex-direction: column; }
.hp-sb-btn--o { flex: 0 0 auto; background: #fff; border: 1px solid var(--hp-line-16); flex-direction: row; align-items: center; justify-content: center; font-weight: 700; }
.hp-sb-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hp-muted); }
.hp-sb-val { font-weight: 600; font-size: 14px; }
.hp-sb-field select { border: 0; background: transparent; font: inherit; font-weight: 600; padding: 0; }
.hp-sb-pop { position: absolute; top: 100%; left: 0; margin-top: 8px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px rgba(14,27,36,.08), 0 30px 60px -30px rgba(14,27,36,.5); padding: 16px; z-index: 130; width: min(640px, calc(100vw - 40px)); }
.hp-sb-pop[data-sb-pop="guests"],
.hp-sb-pop[data-h-pop="guests"],
.hp-sb-pop[data-stay-pop="guests"] { width: 380px; max-width: calc(100vw - 40px); }
.hp-sb-pop__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hp-sb-pop__head strong { font-family: var(--hp-font-display); font-size: 18px; }
@media (max-width: 820px) { .hp-sb-pop { position: fixed; inset: auto 0 0 0; width: 100%; border-radius: 20px 20px 0 0; } }

.hp-search__grid { display: grid; grid-template-columns: 260px minmax(0,1fr) minmax(0,.85fr); gap: 22px; align-items: start; max-width: 1480px; margin-inline: auto; padding: 22px clamp(12px,2.5vw,28px) 70px; }
@media (max-width: 1080px) { .hp-search__grid { grid-template-columns: 1fr; } }

/* Filter rail */
.hp-filters { position: sticky; top: calc(var(--hp-abar,0px) + var(--hp-hdr,68px) + var(--hp-sbar,86px) + 10px); }
.hp-filters__card { background: #fff; border-radius: 16px; padding: 18px; border: 1px solid var(--hp-line-08); }
/* When the filter list is taller than the space under the sticky top, the sticky card would pin its
   overflow off-screen with no way to reach it. Cap it to the visible height and let the card itself
   scroll — every filter stays reachable, layout unchanged. A slim, subtle scrollbar keeps it tidy. */
.hp-filters__card {
  max-height: calc(100vh - (var(--hp-abar,0px) + var(--hp-hdr,68px) + var(--hp-sbar,86px) + 10px) - 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--hp-line-16, rgba(14,27,36,.16)) transparent;
}
.hp-filters__card::-webkit-scrollbar { width: 8px; }
.hp-filters__card::-webkit-scrollbar-thumb { background: var(--hp-line-16, rgba(14,27,36,.16)); border-radius: 8px; }
.hp-filters__card::-webkit-scrollbar-thumb:hover { background: var(--hp-line-24, rgba(14,27,36,.28)); }
.hp-filters__card::-webkit-scrollbar-track { background: transparent; }
.hp-filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hp-filters__head strong { font-family: var(--hp-font-display); font-size: 18px; }
.hp-filters__clear { border: 0; background: none; color: var(--hp-link); font-size: 13.5px; cursor: pointer; }
.hp-filters__group { padding: 14px 0; border-top: 1px solid var(--hp-line-08); }
.hp-filters__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hp-muted); margin-bottom: 8px; }
.hp-filters__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; cursor: pointer; min-height: 40px; }
.hp-filters__row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--hp-ink); }
.hp-filters__row span:nth-child(2) { flex: 1; }
.hp-filters__n { color: var(--hp-muted); font-size: 13px; }
.hp-filters__range { width: 100%; accent-color: var(--hp-saffron); }
.hp-filters__budget { display: flex; justify-content: space-between; font-size: 13px; color: var(--hp-text-2); margin-top: 6px; }
.hp-filters__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-pill-toggle { border-radius: 999px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; background: #fff; border: 1px solid var(--hp-line-16); cursor: pointer; }
.hp-pill-toggle.is-on { background: var(--hp-ink); color: #fff; border-color: var(--hp-ink); }
.hp-filters__toggles { padding-top: 12px; border-top: 1px solid var(--hp-line-08); }
.hp-filters__toggles .hp-filters__row span { flex: 1; }
.hp-tailored { background: var(--hp-ink); color: #fff; border-radius: 16px; padding: 18px; margin-top: 16px; }
.hp-tailored h3 { font-family: var(--hp-font-display); font-size: 17px; margin: 0 0 6px; color: #fff; }
.hp-tailored p { color: var(--hp-divider); font-size: 14px; margin: 0 0 12px; }

/* Results */
.hp-results__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.hp-results__h1 { font-family: var(--hp-font-display); font-size: clamp(26px,3vw,36px); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.hp-results__sub { font-size: 14px; color: var(--hp-text-2); }
.hp-sort { font-size: 13.5px; display: inline-flex; gap: 8px; align-items: center; color: var(--hp-muted); }
.hp-sort select { border: 1px solid var(--hp-line-16); border-radius: 9px; padding: 8px 10px; font: inherit; }
.hp-season-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.hp-season-banner__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.hp-season-banner--peak { background: var(--hp-saffron-tint); color: #6B3A00; }
.hp-season-banner--peak .hp-season-banner__dot { background: var(--hp-saffron); }
.hp-season-banner--green { background: var(--hp-green-tint); color: #0B5A3D; }
.hp-season-banner--green .hp-season-banner__dot { background: var(--hp-green); }
.hp-results__grid { display: grid; gap: 16px; }
.hp-empty { text-align: center; border: 1px dashed var(--hp-line-16); border-radius: 16px; padding: 48px 20px; }
.hp-empty__h { font-family: var(--hp-font-display); font-size: 24px; margin-bottom: 8px; }
.hp-empty p { color: var(--hp-text-2); margin-bottom: 16px; }

/* Map rail placeholder */
.hp-map-rail { position: sticky; top: calc(var(--hp-abar,0px) + var(--hp-hdr,68px) + var(--hp-sbar,86px) + 10px); }
.hp-map-rail .hp-map-ph { height: calc(100vh - var(--hp-hdr,68px) - 130px); }

/* Mobile filter sheet — above the fixed header (z 500); scrollable body with a pinned action bar. */
.hp-filter-sheet { position: fixed; inset: 0; z-index: 1000; display: none; }
.hp-filter-sheet.is-open { display: block; }
.hp-filter-sheet__scrim { position: absolute; inset: 0; background: rgba(7,19,27,.5); }
.hp-filter-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 20px 20px 0 0; }
.hp-filter-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hp-filter-sheet__head strong { font-family: var(--hp-font-display); font-size: 20px; }
.hp-filter-sheet__body { overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 8px; }
.hp-filter-sheet__foot { display: flex; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hp-line-08); background: #fff; }
.hp-filter-sheet__foot .hp-btn { flex: 1; min-height: 48px; justify-content: center; }
/* The footer holds Clear; hide the filter card's own "Clear all" while it lives inside the sheet. */
.hp-filter-sheet__body .hp-filters__clear { display: none; }

/* Mobile "Map" button → fullscreen 3D route map overlay */
@media (max-width: 1080px) {
  body.hp-mapopen { overflow: hidden; }
  body.hp-mapopen .hp-map-rail { display: block !important; position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; }
  body.hp-mapopen .hp-map-rail .hp-map-ph { height: 100vh; border-radius: 0; margin: 0; }
  .hp-map-close { position: fixed; top: 14px; right: 14px; z-index: 1001; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); font-size: 18px; line-height: 1; cursor: pointer; }
}

/* ==== Responsive audit fixes ==== */
/* Filters aside is display:none (u-lg-hide) <=1080; when JS moves it into the mobile sheet, re-show it. */
.hp-filter-sheet__body [data-hp-filters], .hp-filter-sheet__body .hp-filters { display: block !important; }
@media (max-width: 820px) {
  .hp-sb-pop { z-index: 210; max-height: 85vh; overflow: auto; } /* above the fixed reserve bar + scrollable */
  .hp-sb-pop[data-sb-pop="guests"], .hp-sb-pop[data-h-pop="guests"], .hp-sb-pop[data-stay-pop="guests"] { width: 100%; max-width: none; }
}
.hp-filters__row { min-height: 44px; }
.hp-pill-toggle { min-height: 44px; }
.hp-sort select { padding: 12px 10px; min-height: 44px; }
.hp-filters__clear { padding: 8px 4px; min-height: 44px; }
.hp-map-close { width: 44px; height: 44px; }

/* ==== Full-screen map explore controls (mobile Map overlay) ==== */
/* Fixed to the viewport (like the close button) so they sit reliably bottom-right regardless of the
   host's positioning context; only shown while the map is full-screen (toggled via [hidden]). */
.hp-map-ctl { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 1002; display: flex; flex-direction: column; gap: 10px; }
.hp-map-ctl button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 8px 20px -8px rgba(14,27,36,.55); font-size: 22px; font-weight: 600; line-height: 1; cursor: pointer; color: var(--hp-ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.hp-map-ctl button:active { transform: translateY(1px); }

/* ==== Tap-a-checkpoint info card (3D map: name + elevation + live weather) ==== */
.hp-map-info { position: absolute; left: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1003; width: min(320px, calc(100vw - 84px)); background: rgba(255,255,255,.97); border-radius: 16px; padding: 12px 14px; box-shadow: 0 0 0 1px rgba(14,27,36,.08), 0 20px 46px -20px rgba(14,27,36,.6); backdrop-filter: blur(10px); transform: translateY(12px); opacity: 0; transition: opacity .22s ease, transform .22s ease; }
.hp-map-info.is-in { transform: translateY(0); opacity: 1; }
.hp-map-info__x { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--hp-muted); cursor: pointer; border-radius: 50%; }
.hp-map-info__x:hover { background: rgba(14,27,36,.06); }
.hp-map-info__body { display: flex; gap: 12px; align-items: center; }
.hp-map-info__glyph { flex: 0 0 auto; }
.hp-map-info__glyph .hp-wx-glyph { display: inline-flex; border-radius: 12px; }
.hp-map-info__glyph .hp-wx-glyph svg { width: 100%; height: 100%; }
.hp-map-info__txt { min-width: 0; padding-right: 18px; }
.hp-map-info__name { font-family: var(--hp-font-display); font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--hp-ink); line-height: 1.15; }
.hp-map-info__sub { font-size: 12.5px; color: var(--hp-text-2); margin-top: 2px; }
.hp-map-info__wx { font-size: 13.5px; color: var(--hp-ink); margin-top: 4px; min-height: 18px; }
.hp-map-info__wx strong { font-size: 16px; font-weight: 700; }
