.hotel-header, .hotel-page {
  --hotel-gutter: clamp(1rem, 3.25vw, 3.5rem);
  --hotel-muted: #5f6475;
}
.hotel-page {
  --hotel-line: #e8e9ee;
  --hotel-frame-radius: 1.5rem;
  --hotel-frame-inset: 5px;
  --hotel-frame-shadow: 0 0 0 1px var(--hotel-line), 0 4px 18px #171d350c;
  --hotel-accent: #eef1fb;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(to bottom, #fff, var(--page));
  color: var(--ink);
}
.hotel-page [hidden] { display: none !important; }
.hotel-header {
  position: relative;
  z-index: 10;
  padding: max(1.65rem, env(safe-area-inset-top)) var(--hotel-gutter) .5rem;
  background: linear-gradient(to bottom, #fff, rgb(255 255 255 / 85%) 55%, rgb(255 255 255 / 0%));
  pointer-events: none;
}
.stay-page > .hotel-header { position: sticky; top: 0; }
.hotel-header [hidden] { display: none !important; }
.hotel-header-inner {
  display: flex;
  max-width: 90rem;
  align-items: center;
  justify-content: space-between;
  margin: auto;
}
.hotel-header :is(.brand, .header-actions, .hotel-toolbar) { pointer-events: auto; }
.hotel-header .brand img { width: 7.65rem; }
.hotel-header .header-actions { position: relative; z-index: 2; }
.hotel-toolbar {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.35fr) minmax(0, .9fr) auto;
  width: min(100%, 49rem);
  margin: .35rem auto 0;
}
.hotel-trip-control, .hotel-trip-query { min-width: 0; }
.hotel-trip-query {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: inherit;
}
.hotel-pill { width: 100%; border-radius: 4px; color: var(--control-ink); }
#origin-trigger { border-radius: 2.5rem 4px 4px 2.5rem; }
#people-trigger { border-radius: 4px 2.5rem 2.5rem 4px; }
.hotel-destination, #origin-trigger { cursor: text; }
.hotel-pill:focus-within, .hotel-pill[aria-expanded="true"] { background: #f9f9fa; }
.hotel-field-copy { display: grid; min-width: 0; width: 100%; gap: .12rem; }
.hotel-field-label {
  color: var(--hotel-muted);
  font-size: .71rem;
  line-height: 1.1;
}
.hotel-pill :is(strong, input) {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: .94rem;
  font-weight: 400;
  white-space: nowrap;
}
.hotel-pill input { padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; }
.hotel-filter {
  grid-area: map;
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin: 1.2rem;
  box-shadow: 0 2px 12px #16254d29;
}
.hotel-filter svg, .hotel-view-toggle svg, .hotel-search-area svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
}
.filter-dot {
  position: absolute;
  top: .45rem;
  right: .48rem;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--indigo);
}
.hotel-toolbar .query-panel { top: calc(100% + .55rem); max-height: min(35rem, calc(100dvh - var(--toolbar-bottom, 9rem) - 1.2rem)); }
.hotel-toolbar .query-dates { grid-column: 1 / -2; inset-inline: 0; width: auto; }
.hotel-trip-query > .query-places { grid-column: 2 / -2; inset-inline-start: 0; }
.hotel-editor { grid-column: 1 / -2; }
#origin-control > .query-places { grid-column: 1 / -2; inset-inline-start: 0; }
.hotel-editor.people-editor { inset-inline-end: 0; }
#origin-context {
  margin: .7rem .4rem .25rem;
  color: var(--hotel-muted);
  font-size: .78rem;
  line-height: 1.35;
}
.query-panel.people-editor {
  width: min(25rem, 100%);
  padding: .55rem clamp(.65rem, 2vw, 1.8rem);
}
.people-row, .people-stepper { display: flex; align-items: center; gap: clamp(.3rem, 1vw, .55rem); }
.people-row { justify-content: space-between; padding-block: 1.22rem; }
.people-row + .people-row { border-top: 1px solid var(--hotel-line); }
.people-row > div:first-child { display: grid; gap: .24rem; }
.people-row strong { font-size: 1rem; font-weight: 400; }
.people-row span { font-size: .86rem; color: var(--hotel-muted); }
.people-stepper button {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 50%;
  background: var(--control-gray);
  color: var(--control-ink);
  font-size: 1.25rem;
  line-height: 1;
}
.people-stepper button::after { content: ""; position: absolute; inset: -.32rem; border-radius: 50%; }
.people-stepper button:hover:not(:disabled) { background: #e6e6e9; }
.people-stepper button:disabled { color: #b9b9bf; cursor: default; }
.people-stepper output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }

.hotel-results {
  --hotel-results-top-gap: clamp(.75rem, 1.8vw, 1.65rem);
  --hotel-list-top: calc(var(--hotel-header-height, 6rem) + var(--hotel-results-top-gap));
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--hotel-results-top-gap) var(--hotel-gutter) 0;
}
.hotel-results-tools { display: none; }
.hotel-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hotel-results-intro {
  grid-area: list;
  place-self: center;
  z-index: 3;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  padding: .65rem .9rem;
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  text-align: center;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#results-count {
  display: inline-block;
  min-width: 1ch;
  color: var(--indigo);
  font-variant-numeric: tabular-nums;
}
.hotel-results-body {
  display: grid;
  grid-template-areas: "list map";
  grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
  grid-template-rows: minmax(0, 1fr);
  column-gap: clamp(.8rem, 1.2vw, 1.5rem);
  flex: 1;
  min-height: 0;
}
.hotel-list-pane {
  grid-area: list;
  min-width: 0;
  min-height: 0;
  /* Give the cards room to scroll behind the header and keep their initial top aligned with the map. */
  margin-block-start: calc(-1 * var(--hotel-list-top));
  margin-inline-start: -.3rem;
  padding-block-start: var(--hotel-list-top);
  padding-inline-start: .3rem;
  scroll-padding-block-start: var(--hotel-list-top);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.hotel-list-pane::-webkit-scrollbar { display: none; }
.hotel-list {
  --hotel-column-gap: .9rem;
  --hotel-column-count: 3;
  --hotel-column-width: calc((100% + var(--hotel-column-gap)) / var(--hotel-column-count) - var(--hotel-column-gap));
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(10rem, var(--hotel-column-width))), 1fr));
  gap: 1.45rem var(--hotel-column-gap);
  margin: 0;
  padding: 0 .3rem max(1rem, env(safe-area-inset-bottom)) 0;
  list-style: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hotel-list.is-revealing > li {
    animation: hotel-reveal 340ms ease-out both;
    animation-delay: calc(var(--reveal-order, 0) * 70ms);
  }
  .hotel-list.is-revealing > li:focus-within { animation: none; }
  @keyframes hotel-reveal {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
.hotel-card {
  container: hotel-card / inline-size;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--hotel-frame-radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--hotel-frame-shadow);
  color: inherit;
  text-align: start;
  text-decoration: none;
}
.hotel-photo { display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: .875rem; background: var(--hotel-accent); }
.hotel-card .hotel-photo {
  position: relative;
  flex: none;
  margin: var(--hotel-frame-inset) var(--hotel-frame-inset) 0;
  border-radius: 1.0625rem;
  box-shadow: 0 2px 5px rgb(23 29 53 / 8%);
}
.hotel-card .hotel-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 40%);
  pointer-events: none;
}
.hotel-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hotel-card-copy {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: .35rem;
  padding: 1.1rem 1.15rem 1.25rem;
}
.hotel-card .hotel-card-copy { flex: 1; }
.hotel-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: .3rem;
}
.hotel-name { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.hotel-rating { display: inline-flex; align-items: center; gap: .32rem; margin-top: .12rem; color: var(--hotel-muted); font-size: .8rem; }
.hotel-rating-stars { display: inline-flex; gap: .1rem; }
.hotel-rating-star {
  width: .75rem;
  height: .75rem;
  background: linear-gradient(90deg, #dc961d 0% var(--star-fill), #e1e2e6 var(--star-fill) 100%);
  clip-path: polygon(50% 0, 65% 33%, 100% 38%, 74% 64%, 81% 100%, 50% 82%, 19% 100%, 26% 64%, 0 38%, 35% 33%);
}
.hotel-neighborhood { font-size: .8rem; color: var(--hotel-muted); }
.hotel-card-prices {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem .45rem;
  padding-top: .3rem;
  color: var(--hotel-muted);
  line-height: 1.35;
}
.hotel-card-standard, .hotel-card-bound { white-space: nowrap; }
.hotel-card-bound {
  display: inline-flex;
  align-items: center;
  gap: .2em;
  margin-inline-start: auto;
  color: var(--indigo);
}
.hotel-card-bound img { width: .9em; height: auto; }
@container hotel-card (max-width: 12.25rem) {
  .hotel-card-copy { padding-inline: .625rem; font-size: .875rem; }
  .hotel-rating { gap: .22rem; margin-top: .06rem; }
  .hotel-rating-stars { gap: .07rem; }
  .hotel-rating-star { width: .625rem; height: .625rem; }
}
.hotel-card.is-selected { outline: 2px solid var(--indigo); outline-offset: 2px; }
:is(.hotel-card, .hotel-preview-link):hover .hotel-name { color: var(--indigo); }
.hotel-empty { padding: 1.5rem .25rem; }
.hotel-empty h2 { margin: 0; font-size: 1.3rem; }
.hotel-empty p { color: var(--hotel-muted); }

.hotel-map-pane {
  container: hotel-map / size;
  grid-area: map;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  margin-bottom: max(var(--hotel-gutter), env(safe-area-inset-bottom));
  overflow: hidden;
  border-radius: var(--hotel-frame-radius);
  border: var(--hotel-frame-inset) solid #fff;
  background: #fff;
  box-shadow: var(--hotel-frame-shadow);
}
.hotel-map-root { position: absolute; inset: 0; }
.hotel-map-root:focus-visible { outline-offset: -3px; }
.map-empty { display: none; }
.hotel-search-area, .hotel-view-toggle, .hotel-filter {
  border: 0;
  min-height: 2.6rem;
  padding: .5rem .85rem;
  border-radius: 2rem;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  background: #fff;
  color: var(--bound-blue);
  font-size: .875rem;
  white-space: nowrap;
}
.hotel-search-area {
  position: absolute;
  z-index: 5;
  top: .85rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  box-shadow: 0 2px 12px #16254d29;
}
.hotel-search-area:hover, .hotel-view-toggle:hover, .hotel-filter:hover { background: var(--hotel-accent); }
.hotel-view-toggle { display: none; background: var(--control-gray); }
.hotel-pin-preview {
  --preview-edge: 12px;
  --preview-footer: 32px;
  container: hotel-card / inline-size;
  position: absolute;
  z-index: 5;
  bottom: var(--preview-footer);
  left: 50%;
  transform: translateX(-50%);
  width: min(19.5rem, calc(100% - 2 * var(--preview-edge)));
  max-height: calc(100% - var(--preview-footer) - var(--preview-edge));
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--hotel-frame-radius);
  background: #fff;
  box-shadow: 0 0 0 1px var(--hotel-line), 0 6px 24px #1421442e;
}
.hotel-preview-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.hotel-preview-link:focus-visible, .hotel-gallery-photos:focus-visible { outline-offset: -3px; }
.hotel-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  /* Leave room for the stay summary and map attribution in short panes. */
  max-height: min(13rem, 35dvh, max(5rem, calc(100cqh - 10.5rem)));
  background: var(--hotel-accent);
}
.hotel-gallery::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2.5rem;
  background: linear-gradient(transparent, rgb(21 27 49 / 30%));
  pointer-events: none;
}
.hotel-gallery-photos {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: auto hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hotel-gallery-photos::-webkit-scrollbar { display: none; }
.hotel-gallery-photos img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}
.hotel-gallery-actions, .hotel-gallery-arrow, .hotel-gallery-dots { position: absolute; z-index: 1; }
.hotel-gallery-actions { display: flex; gap: .4rem; inset: .65rem .65rem auto auto; }
.hotel-gallery-button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 2px 8px rgb(21 27 49 / 14%);
}
.hotel-gallery-button:hover { background: var(--hotel-accent); }
.hotel-gallery-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hotel-gallery-button[aria-pressed="true"] { color: var(--indigo); }
.hotel-gallery-button[aria-pressed="true"] svg { fill: currentColor; }
.hotel-gallery-arrow { top: 50%; transform: translateY(-50%); }
.hotel-gallery-arrow.is-previous { left: .65rem; }
.hotel-gallery-arrow.is-next { right: .65rem; }
.hotel-gallery-dots {
  display: flex;
  left: 50%;
  bottom: .15rem;
  transform: translateX(-50%);
}
.hotel-gallery-dot {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: transparent;
}
.hotel-gallery-dot::before {
  content: "";
  width: .42rem;
  height: .42rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 70%);
}
.hotel-gallery-dot[aria-current="true"]::before { width: 1.12rem; background: #fff; }
@container hotel-map (max-height: 22rem) {
  .hotel-gallery-actions { inset: .4rem .4rem auto auto; }
  .hotel-gallery-button { width: 2rem; height: 2rem; }
  .hotel-gallery-arrow { top: auto; bottom: .35rem; transform: none; }
}
.hotel-close {
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--control-gray);
  font-size: 1.2rem;
  line-height: 1;
}
.hotel-close:hover { background: var(--hotel-accent); }

.hotel-dialog { width: min(27rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.2rem; border-radius: 1.2rem; }
.hotel-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.hotel-dialog-head h2 { margin: 0; font-size: 1.5rem; }
.hotel-filter-fields { display: grid; gap: .65rem; margin: 1rem 0; padding: 1rem 0; border-block: 1px solid var(--hotel-line); }
.hotel-filter-label { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.hotel-filter-label output, .hotel-filter-note { color: var(--hotel-muted); font-size: .85rem; }
#max-rate { width: 100%; }
.hotel-filter-fields input { accent-color: var(--indigo); }
.hotel-filter-check { display: flex; align-items: center; gap: .65rem; min-height: 2.5rem; }
.hotel-filter-check input { width: 1.1rem; height: 1.1rem; margin: 0; }
.hotel-dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.hotel-primary {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .85rem;
  border: 0;
  border-radius: 2rem;
  background: var(--indigo);
  color: white;
  font-size: .9rem;
}
.hotel-primary:hover { background: var(--bound-blue); }
.hotel-text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--bound-blue);
  font-size: .86rem;
  text-decoration: underline;
  text-underline-offset: .15em;
}

@media (min-width: 1100px) {
  .hotel-header { display: grid; grid-template-columns: 8rem minmax(0, 1fr) 8rem; align-items: center; }
  .hotel-header-inner { display: contents; }
  .hotel-header .brand { grid-column: 1; grid-row: 1; }
  .hotel-header .header-actions { grid-column: 3; grid-row: 1; justify-self: end; }
  .hotel-toolbar { grid-column: 2; grid-row: 1; margin-top: 0; }
}
@media (max-width: 959px) {
  .hotel-list { --hotel-column-count: 2; }
}
@media (max-width: 820px) {
  .hotel-search-area { top: 3.8rem; }
}
@media (max-width: 680px) {
  .hotel-header { padding-top: max(1rem, env(safe-area-inset-top)); }
  .hotel-header .brand img { width: 6.875rem; }
  .hotel-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    border-radius: 1.65rem;
    margin-top: .25rem;
  }
  #origin-control { grid-column: 1; grid-row: 1; }
  .hotel-trip-query { display: contents; }
  .hotel-destination { grid-column: 2 / -1; grid-row: 1; border-radius: 4px 1.25rem 4px 4px; }
  .hotel-dates { grid-column: 1; grid-row: 2; border-radius: 4px 4px 4px 1.25rem; }
  #people-control { grid-column: 2; grid-row: 2; }
  #origin-trigger { border-radius: 1.25rem 4px 4px 4px; }
  #people-trigger { border-radius: 4px 4px 1.25rem 4px; }
  .hotel-update { grid-column: 3; grid-row: 2; }
  .hotel-pill { padding-inline: .6rem; gap: .38rem; }
  .hotel-pill .field-emoji { font-size: 1rem; }
  .hotel-pill input { font-size: 1rem; }
  .hotel-toolbar .query-dates, #origin-control > .query-places, .hotel-trip-query > .query-places { grid-column: 1 / -1; }
  .hotel-trip-query > .query-places { inset-inline: auto 0; }
  .hotel-results-tools { position: relative; z-index: 4; display: flex; justify-content: end; margin-bottom: .75rem; }
  .hotel-results-intro {
    grid-area: map;
    background: #fff;
    border-radius: 2rem;
    box-shadow: 0 4px 18px #171d3522;
  }
  .show-list .hotel-results-intro { grid-area: list; box-shadow: none; }
  .hotel-view-toggle { display: inline-flex; }
  .map-empty {
    display: grid;
    justify-items: center;
    gap: .75rem;
    position: absolute;
    z-index: 5;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: calc(100% - 1.7rem);
    padding: .8rem 1.2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 6px 24px #1421442e;
  }
  .hotel-results-body { grid-template-areas: "map"; grid-template-columns: minmax(0, 1fr); }
  .hotel-list-pane { display: none; }
  .hotel-results-body.show-list { grid-template-areas: "actions" "list"; grid-template-rows: auto minmax(0, 1fr); }
  .show-list .hotel-list-pane { display: block; }
  .show-list .hotel-map-pane { display: none; }
  .show-list .hotel-filter {
    grid-area: actions;
    justify-self: end;
    margin: 0 0 .65rem;
    background: var(--control-gray);
    box-shadow: none;
  }
}
@media (min-width: 681px) {
  .hotel-pin-preview.is-anchored {
    top: var(--preview-top);
    left: var(--preview-left);
    bottom: auto;
    transform: none;
  }
}
