/* Calendar panels respond to their popup/sheet width, not the page viewport. */
.search-date-calendar { container: search-dates / inline-size; min-width: 0; }
.search-date-calendar .search-date-calendar__navigation { position: relative; display: block; }
.search-date-calendar__month-labels { display: grid; min-height: 40px; grid-template-columns: minmax(0, 1fr); align-items: center; text-align: center; }
.search-date-calendar__navigation > button { position: absolute; top: 0; z-index: 1; }
.search-date-calendar__navigation > button:first-child { left: 0; }
.search-date-calendar__navigation > button:last-child { right: 0; }
.search-date-calendar__months { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; }
.search-date-calendar__month-panel { display: grid; min-width: 0; gap: 16px; }
.search-date-calendar__month-panel--next,
.search-date-calendar__month-label--next { display: none; }

.search-date-calendar .is-cheapest-fare { position: relative; }
.search-date-calendar__fare-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #038026; }
.search-date-calendar .is-cheapest-fare .search-date-calendar__fare-dot { position: absolute; bottom: 2px; left: calc(50% - 3px); }
.search-date-calendar__fare-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--charcoal); font-size: 11px; }
.search-date-calendar__fare-legend > span { display: inline-flex; align-items: center; gap: 6px; }

.search-date-calendar [data-fare-tier="low"] { --fare-tier-ink: #015f1a; --fare-tier-fill: #dcf1e1; }
.search-date-calendar [data-fare-tier="medium"] { --fare-tier-ink: #8f3400; --fare-tier-fill: #fdf0e1; }
.search-date-calendar [data-fare-tier="high"] { --fare-tier-ink: #a3150f; --fare-tier-fill: #ffe6e2; }
.search-date-calendar__tier-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid var(--fare-tier-ink);
  border-radius: 3px;
  background: var(--fare-tier-fill);
}
.search-date-calendar .hotel-search-calendar__grid button.has-fare-preview[data-fare-tier] {
  border-radius: 12px;
  background: var(--fare-tier-fill);
  color: var(--fare-tier-ink);
}
.search-date-calendar .hotel-search-calendar__grid button.has-fare-preview[data-fare-tier][aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px #222;
}

.search-date-calendar.search-date-calendar--with-fares .hotel-search-calendar__grid button { height: auto; }
.search-date-calendar.search-date-calendar--with-fares .hotel-search-calendar__grid button.has-fare-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 3px 0 7px;
  line-height: 1;
}
.search-date-calendar__day-fare {
  display: grid;
  gap: 2px;
  max-width: 100%;
  font-size: clamp(8px, 2.6cqi, 10px);
  font-variant-numeric: tabular-nums;
}
.sf-calendar-price-skeleton {
  display: block;
  width: 32px;
  max-width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ecebe8 25%, #f8f7f5 50%, #ecebe8 75%);
  background-size: 220% 100%;
  animation: sf-calendar-price-shimmer 1.4s ease-in-out infinite;
}
.search-date-calendar__day-fare .sf-calendar-price-skeleton + .sf-calendar-price-skeleton { width: 23px; }
.search-date-calendar .hotel-search-calendar__grid button.is-loading-fare:disabled { opacity: 1; }

@keyframes sf-calendar-price-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-calendar-price-skeleton { animation: none; }
}

.search-date-calendar__day-fare > * {
  overflow: hidden;
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-date-calendar.search-date-calendar--hotel-points .hotel-search-calendar__grid button.has-fare-preview {
  min-height: 60px;
  padding: 5px 1px;
  justify-content: flex-start;
  gap: 4px;
}
.search-date-calendar__hotel-points {
  min-height: 27px;
  gap: 2px;
  font-size: clamp(8px, 2.6cqi, 10px);
  line-height: 1.1;
}
.search-date-calendar__hotel-points strong { display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 500; }
.search-date-calendar__hotel-points img { width: 16px; height: 10px; object-fit: contain; }
.search-date-calendar__hotel-points img[src$="/ihg-mark.svg"] { width: 17px; }
.hotel-search-calendar__grid button[aria-pressed="true"] .search-date-calendar__hotel-points img { background: #fff; border-radius: 2px; }
.search-date-calendar__hotel-points-description {
  margin: 0;
  color: var(--charcoal);
  font-size: 11px;
  line-height: 1.5;
}

.search-date-calendar.search-date-calendar--compact-points .hotel-search-calendar__grid :is(button, button.has-fare-preview) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 44px;
  min-height: 44px;
  padding: 4px 0 8px;
  line-height: 1;
}
.search-date-calendar--compact-points .search-date-calendar__day-fare {
  min-height: 10px;
  align-items: center;
}
.search-date-calendar--compact-points .hotel-search-calendar__grid .is-muted {
  visibility: hidden;
  pointer-events: none;
}

.search-date-calendar--results {
  gap: 14px;
  border-radius: 16px;
  background: #fff;
}
.search-date-calendar--results .search-date-calendar__month-labels strong { font-size: 16px; }
.search-date-calendar--results .search-date-calendar__navigation > button {
  border-color: transparent;
  background: #f7f7f7;
}
.search-date-calendar--results .search-date-calendar__month-panel { gap: 10px; }
.search-date-calendar--results .hotel-search-calendar__week span { font-size: 11px; }
.search-date-calendar--results .hotel-search-calendar__grid { gap: 4px; }
.search-date-calendar--results .hotel-search-calendar__grid button {
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.search-date-calendar--results .hotel-search-calendar__grid button.is-in-range:not([data-fare-tier]),
.search-date-calendar--results .hotel-search-calendar__grid button.is-window-end:not([data-fare-tier]) {
  background: transparent;
  box-shadow: none;
}
.search-date-calendar--results .hotel-search-calendar__grid button:not(:disabled):hover {
  outline: 1px solid currentColor;
  outline-offset: -1px;
}
.search-date-calendar--results .search-date-calendar__fare-legend { justify-content: center; }

@container search-dates (min-width: 420px) {
  .search-date-calendar--results .hotel-search-calendar__grid { gap: 6px; }
  .search-date-calendar.search-date-calendar--results .hotel-search-calendar__grid button.has-fare-preview {
    min-height: 62px;
    gap: 4px;
  }
  .search-date-calendar--results .search-date-calendar__day-fare { font-size: 11px; }
}

@container search-dates (min-width: 620px) {
  .search-date-calendar__months,
  .search-date-calendar__month-labels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .search-date-calendar--single-month .search-date-calendar__months,
  .search-date-calendar--single-month .search-date-calendar__month-labels { grid-template-columns: minmax(0, 1fr); }
  .search-date-calendar__month-panel--next { display: grid; }
  .search-date-calendar__month-label--next { display: block; }
  /* Keep weekday alignment without exposing duplicate adjacent-month dates
     to either pointer/keyboard interaction or the accessibility tree. */
  .search-date-calendar__month-panel .hotel-search-calendar__grid .is-muted { visibility: hidden; pointer-events: none; }
}

/* Desktop popovers keep the complete calendar and its action in view. The
   same controls retain their touch sizing inside the mobile search sheet. */
@media (min-width: 760px) {
  .search-popover-surface > .search-popover-panel:has(.search-date-calendar) { padding: 12px; }
  .search-popover .search-date-calendar { gap: 8px; }
  .search-popover .search-date-calendar__mode { padding: 3px; }
  .search-popover .search-date-calendar__mode button { min-height: 32px; }
  .search-popover .hotel-search-calendar__summary button,
  .search-popover .hotel-search-calendar__summary > div { min-height: 44px; padding: 6px 10px; }
  .search-popover .search-date-calendar__window-options { gap: 6px; }
  .search-popover .search-date-calendar__window-options button { min-height: 44px; padding: 5px 8px; }
  .search-popover .search-date-calendar__navigation,
  .search-popover .search-date-calendar__month-labels { min-height: 32px; }
  .search-popover .search-date-calendar__navigation > button { width: 32px; height: 32px; }
  .search-popover .search-date-calendar__month-panel { gap: 8px; }
  .search-popover .hotel-search-calendar__grid { gap: 2px 4px; }
  .search-popover .hotel-search-calendar__grid button { min-height: 30px; height: 30px; }
  .search-popover .search-date-calendar__done.search-sheet__primary,
  .search-popover .header-hotel-search__calendar + .search-sheet__primary { min-height: 36px; height: 36px; margin-top: 8px; }
  @container search-dates (min-width: 620px) {
    .search-popover .search-date-calendar__window-options { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }
}
@media (min-width: 760px) and (max-height: 680px) {
  .search-popover .search-date-calendar { gap: 6px; }
  .search-popover .search-date-calendar__mode button { min-height: 28px; }
  .search-popover .hotel-search-calendar__summary button,
  .search-popover .hotel-search-calendar__summary > div { min-height: 40px; padding: 4px 10px; }
  .search-popover .search-date-calendar__window-options button { min-height: 40px; padding-block: 3px; }
  .search-popover .search-date-calendar__navigation,
  .search-popover .search-date-calendar__month-labels { min-height: 28px; }
  .search-popover .search-date-calendar__navigation > button { width: 28px; height: 28px; }
  .search-popover .search-date-calendar__month-panel { gap: 6px; }
  .search-popover .hotel-search-calendar__grid button { min-height: 26px; height: 26px; }
}

.search-date-calendar__cabin-preview {
  display: grid;
  gap: 4px;
}
.search-date-calendar__cabins {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.search-date-calendar__cabins button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: inherit;
  font: inherit;
  padding: 4px;
  cursor: pointer;
}
.search-date-calendar__cabins button[aria-pressed="true"] {
  border-color: currentColor;
  background: var(--frost);
}
.search-date-calendar__cabins :is(strong, small) { display: block; }
.search-date-calendar__cabins strong { font-size: 12px; }
.search-date-calendar__cabins small { font-size: 11px; }
.search-date-calendar__cabin-label,
.search-date-calendar__cabin-preview p {
  margin: 0;
  color: var(--charcoal);
  font-size: 12px;
}
.search-date-calendar__cabin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.search-date-calendar__cabins--all {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.search-date-calendar__day-fare .search-date-calendar__fare-detail {
  font-size: 8px;
}
@container search-dates (max-width: 359px) {
  .search-date-calendar__cabins--all {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .search-date-calendar__cabins--all > :first-child {
    grid-column: 1 / -1;
    min-height: 32px;
  }
}
/* Shared compact location choices; common photos are served locally. */
.sf-airport-options button.location-option,
.hotel-destination-sheet > div > button.location-option {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px;
  padding: 10px 8px; border: 0; border-radius: 12px; background: transparent;
  color: #222; text-align: left; cursor: pointer;
}
.sf-airport-options button.location-option:hover,
.hotel-destination-sheet > div > button.location-option:hover { background: #f3f3f3; }
.sf-airport-options button.location-option[aria-current="true"] { background: #fff4ec; }
.location-option:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.sf-airport-options .location-option > .location-option__thumbnail,
.hotel-destination-sheet > div > .location-option > .location-option__thumbnail {
  display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px;
  overflow: hidden; border-radius: 12px; color: #697b89; background: #f0f3f5;
}
.location-option__thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.location-option__thumbnail svg { width: 25px; height: 25px; }
.sf-airport-options .location-option > .location-option__thumbnail--nearby,
.hotel-destination-sheet > div > .location-option > .location-option__thumbnail--nearby { color: #4488b6; background: #edf5fc; }
.sf-airport-options .location-option > .location-option__copy,
.hotel-destination-sheet > div > .location-option > .location-option__copy {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  flex: 1 1 auto; width: auto; height: auto; min-width: 0; background: none; color: inherit; border-radius: 0;
}
.location-option .location-option__copy strong { align-self: auto; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: normal; }
.location-option .location-option__copy span, .location-option .location-option__copy small { font-size: 12px; line-height: 1.35; color: #737373; }
.location-option .location-option__copy small { font-size: 11px; }
.location-option__selected { width: 18px; height: 18px; flex: 0 0 18px; color: var(--signal); }
.location-option__error { margin: 0 8px 8px; color: #737373; font-size: 12px; }
.search-field .sf-airport-add {
  display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; min-height: 28px;
  padding: 0; border: 0; border-radius: 8px; color: #474747; background: #ececec; cursor: pointer;
}
.search-field .sf-airport-add svg { width: 17px; height: 17px; }
.search-field .sf-airport-add:hover { background: #ddd; }
.search-field .sf-airport-add:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.search-bar.sf-search-panel .sf-swap-button.route-swap {
  width: 34px; height: 34px; min-height: 34px; border-radius: 11px; border: 1px solid #e1e1e1;
  background: #fff; color: #525252; box-shadow: 0 2px 6px rgb(0 0 0 / .05);
  display: grid; place-items: center; padding: 0; transition: background 130ms ease, color 130ms ease;
}
.route-swap svg { width: 21px; height: 21px; transition: transform 160ms ease; }
.search-bar.sf-search-panel .route-swap:hover { background: #fff0e6; color: var(--signal); }
.route-swap:active svg { transform: rotate(180deg); }
@media (min-width: 760px) {
  .search-bar.sf-search-panel:has(.route-swap)[data-search-layout="flights"] .search-bar__fields { grid-template-columns: minmax(0,.9fr) 16px minmax(0,.9fr) minmax(0,1.2fr) minmax(0,.95fr) minmax(0,1fr) 104px; }
  .search-bar.sf-search-panel:has(.route-swap)[data-search-layout="route"] .search-bar__fields { grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr) minmax(0,1fr) 104px; }
}
@media (max-width: 759px) {
  .search-bar.sf-search-panel:has(.route-swap):is([data-search-layout="flights"],[data-search-layout="route"]) .search-bar__fields {
    display: grid; grid-template-columns: minmax(0,1fr); grid-template-areas: "origin" "destination" "when" "passengers" "programs" "submit"; gap: 8px;
  }
  .search-bar.sf-search-panel:has(.route-swap)[data-search-layout="route"] .search-bar__fields { grid-template-areas: "origin" "destination" "programs" "submit"; }
  .search-bar.sf-search-panel .search-field:has(+ .route-swap) { border-radius: 18px 18px 0 0; border-bottom: 0; box-shadow: none; }
  .search-bar.sf-search-panel .route-swap + .search-field { margin-top: -8px; border-radius: 0 0 18px 18px; box-shadow: none; }
  .search-bar.sf-search-panel .search-field:has(+ .route-swap) .search-field__surface::before { border-radius: 18px 18px 0 0; }
  .search-bar.sf-search-panel .route-swap + .search-field .search-field__surface::before { border-radius: 0 0 18px 18px; }
  .search-bar.sf-search-panel .sf-swap-button.route-swap {
    position: relative; top: auto; left: auto; right: auto; bottom: auto;
    grid-area: origin; align-self: end; justify-self: start; margin: 0 32px; z-index: 4;
    width: 38px; height: 38px; min-height: 38px; transform: translateY(50%);
    border: 3px solid #fff; background: #f2f2f2; box-shadow: none;
  }
  .route-swap svg { transform: rotate(90deg); }
  .route-swap:active svg { transform: rotate(270deg); }
  .search-bar.sf-search-panel .sf-airport-chip-list { flex: 0 1 auto; flex-wrap: wrap; overflow: visible; }
  .search-field .sf-airport-add { width: 36px; height: 36px; min-height: 36px; flex-basis: 36px; }
}
@media (pointer: coarse) {
  .search-field .sf-airport-add { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
  .search-bar.sf-search-panel .sf-swap-button.route-swap { width: 44px; height: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .route-swap svg { transition: none; } }
/* Keep the narrow desktop bar readable; selected options can also be removed in the picker. */
@media (min-width: 760px) and (max-width: 1100px) {
  .search-bar.sf-search-panel .sf-airport-chip__remove { display: none; }
  .search-bar.sf-search-panel .sf-airport-chip__body { min-height: 28px; padding: 0 6px; }
  .search-bar.sf-search-panel .search-field .sf-airport-add { width: 28px; height: 28px; min-height: 28px; flex-basis: 28px; }
  .search-bar.sf-search-panel .sf-swap-button.route-swap { width: 30px; height: 30px; min-height: 30px; }
}

/* Keep add beside its chips, with swap on a separate part of the divider. */
.search-bar.sf-search-panel .sf-airport-chip-list { flex: 0 1 auto; width: auto; }
@media(min-width:760px) { .search-bar.sf-search-panel .sf-airport-trigger { justify-content: flex-start; } }
