/* AirlyGo R2.6.7 H5 — unified Stay search shell + Results interaction polish.
   Presentation only. No supplier, LiteAPI, PREBOOK, reservation, payment,
   booking, frozen-total, authentication, saved-state or FX logic changes. */
:root{
  --ag267h5-navy:#102a49;
  --ag267h5-orange:#ff6b0b;
  --ag267h5-line:#d7e1ec;
  --ag267h5-muted:#60738a;
  --ag267h5-ring:rgba(255,107,11,.20);
}

/* --------------------------------------------------------------------------
   Hotel results — one focus/highlight system across Destination / Dates /
   Travelers. The visual field owns the orange ring; nested inputs/buttons do
   not paint a second browser outline.
   -------------------------------------------------------------------------- */
html body.hotel-search-page section.search-dock form#hotelResultsForm#hotelResultsForm>.search-field.destination-field:focus-within,
html body.hotel-search-page section.search-dock form#hotelResultsForm#hotelResultsForm>#hotelResultsDates:focus-within,
html body.hotel-search-page section.search-dock form#hotelResultsForm#hotelResultsForm>.guest-field-wrap>#hotelGuestsButton.search-field:focus-visible,
html body.hotel-search-page section.search-dock form#hotelResultsForm#hotelResultsForm>.guest-field-wrap>#hotelGuestsButton.search-field[aria-expanded="true"]{
  box-sizing:border-box!important;
  border:1px solid var(--ag267h5-orange)!important;
  outline:0!important;
  box-shadow:0 0 0 3px var(--ag267h5-ring)!important;
}
html body.hotel-search-page #hotelResultsForm #hotelDestination,
html body.hotel-search-page #hotelResultsForm #hotelDestination:focus,
html body.hotel-search-page #hotelResultsForm #hotelDestination:focus-visible,
html body.hotel-search-page #hotelResultsForm #hotelGuestsButton,
html body.hotel-search-page #hotelResultsForm #hotelGuestsButton:focus,
html body.hotel-search-page #hotelResultsForm #hotelResultsDates .ag-trip-date-trigger,
html body.hotel-search-page #hotelResultsForm #hotelResultsDates .ag-trip-date-trigger:focus,
html body.hotel-search-page #hotelResultsForm #hotelResultsDates .ag-trip-date-trigger:focus-visible{
  outline:0!important;
}
html body.hotel-search-page #hotelResultsForm #hotelDestination:focus,
html body.hotel-search-page #hotelResultsForm #hotelDestination:focus-visible{
  box-shadow:none!important;
}
html body.hotel-search-page #hotelResultsForm #hotelResultsDates .ag-trip-date-trigger:focus-visible{
  box-shadow:none!important;
}

html body.hotel-search-page #hotelResultsForm #hotelDestination{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Calendar glyph is always AirlyGo orange, including nested SVG paths. */
html body.hotel-search-page #hotelResultsForm #hotelResultsDates svg{
  color:var(--ag267h5-orange)!important;
  stroke:var(--ag267h5-orange)!important;
  fill:none!important;
}
html body.hotel-search-page #hotelResultsForm #hotelResultsDates svg *{
  stroke:var(--ag267h5-orange)!important;
  fill:none!important;
}

/* Heart glyph geometry: reset legacy offsets so the SVG mask sits exactly in
   the centre of the 40px circle in both normal cards and the map rail. */
html body.hotel-search-page .ag4165-save-hotel,
html body.hotel-search-page .ag4166-rail-heart{
  display:grid!important;
  align-items:center!important;
  justify-items:center!important;
  place-items:center!important;
  padding:0!important;
}
html body.hotel-search-page .ag4165-save-hotel::before,
html body.hotel-search-page .ag4166-rail-heart::before{
  position:static!important;
  inset:auto!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  translate:none!important;
  align-self:center!important;
  justify-self:center!important;
  flex:none!important;
}

/* Traveler popover remains compact. H5 JS owns reliable Done close semantics. */
html body.hotel-search-page #hotelGuestsPopover{
  max-width:min(328px,calc(100vw - 24px))!important;
}
@media(min-width:641px){
  html body.hotel-search-page #hotelGuestsPopover{width:min(328px,calc(100vw - 24px))!important}
}

/* --------------------------------------------------------------------------
   Homepage Stays — visually match the hotel-results utility shell while
   retaining the existing autocomplete/date/guest/search engines.
   -------------------------------------------------------------------------- */
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(280px,1.52fr) minmax(330px,1.42fr) minmax(190px,.92fr) minmax(168px,.82fr)!important;
  gap:8px!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-travellers,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>#v6StaySearch{
  height:62px!important;
  min-height:62px!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-travellers{
  border:1px solid var(--ag267h5-line)!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:0!important;
  border:1px solid var(--ag267h5-line)!important;
  border-radius:11px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates>.v6-field{
  height:60px!important;
  min-height:60px!important;
  border:0!important;
  border-radius:0!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates>.v6-field + .v6-field{
  border-left:1px solid var(--ag267h5-line)!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger{
  width:100%!important;
  height:60px!important;
  min-height:60px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 18px!important;
  grid-template-rows:auto auto!important;
  align-content:center!important;
  column-gap:8px!important;
  padding:7px 11px!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:var(--ag267h5-navy)!important;
  text-align:left!important;
  box-shadow:none!important;
  outline:0!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger>span{
  grid-column:1!important;
  grid-row:1!important;
  margin:0 0 2px!important;
  color:var(--ag267h5-muted)!important;
  font-size:10.5px!important;
  font-weight:700!important;
  line-height:1.1!important;
}
/* Owner request: date value text equals Guests & rooms value size/weight. */
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger>strong,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestSummary{
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.2!important;
  color:var(--ag267h5-navy)!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger>strong{
  grid-column:1!important;
  grid-row:2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger>svg{
  grid-column:2!important;
  grid-row:1/3!important;
  align-self:center!important;
  justify-self:center!important;
  width:18px!important;
  height:18px!important;
  color:var(--ag267h5-orange)!important;
  stroke:var(--ag267h5-orange)!important;
  fill:none!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm.ag1254-stay-date-ready .ag1254-stay-date-trigger>svg *{
  stroke:var(--ag267h5-orange)!important;
  fill:none!important;
}

html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination{
  width:100%!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}

html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>#v6StaySearch{
  border:0!important;
  border-radius:11px!important;
  background:var(--ag267h5-orange)!important;
  color:#fff!important;
  box-shadow:none!important;
  margin:0!important;
  font-size:15px!important;
  font-weight:800!important;
}

/* Match Results focus behaviour: a single orange outline on the outer card. */
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field:focus-within,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates:focus-within,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestButton:focus-visible,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestButton[aria-expanded="true"]{
  box-sizing:border-box!important;
  border:1px solid var(--ag267h5-orange)!important;
  outline:0!important;
  box-shadow:0 0 0 3px var(--ag267h5-ring)!important;
  z-index:7!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination:focus,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination:focus-visible,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestButton,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestButton:focus,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .ag1254-stay-date-trigger:focus,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .ag1254-stay-date-trigger:focus-visible{
  outline:0!important;
}
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination:focus,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayDestination:focus-visible,
html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .ag1254-stay-date-trigger:focus-visible{
  box-shadow:none!important;
}

/* Tablet: the same shell wraps predictably without oversized controls. */
@media(max-width:1180px) and (min-width:721px){
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field{grid-column:1/-1!important}
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates{grid-column:1!important}
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-travellers{grid-column:2!important}
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>#v6StaySearch{grid-column:1/-1!important;height:54px!important;min-height:54px!important}
}

/* Mobile: hard containment for both Flights and Stays. This explicitly defeats
   legacy desktop grid widths that could create the large horizontal search shell
   seen in QA. */
@media(max-width:720px){
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .hero-inner,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-search-experience,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-search-card,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-panel,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-search-card{
    padding:10px!important;
    overflow:visible!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-panel{padding:0!important}
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v6-field,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v1124-flight-dates,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v6-travellers,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v6-search-button,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-travellers,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-search-button{
    grid-column:1/-1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin-inline:0!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v6-airport-field{
    height:62px!important;
    min-height:62px!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StandardFlight>.v6-swap{
    position:absolute!important;
    z-index:8!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    left:auto!important;
    right:20px!important;
    top:72px!important;
    margin:0!important;
    transform:none!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v1124-stay-dates{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    height:62px!important;
    min-height:62px!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-destination-field,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>.v6-travellers{
    height:62px!important;
    min-height:62px!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6StayForm>#v6StaySearch,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6FlightSearch{
    height:54px!important;
    min-height:54px!important;
    margin:0!important;
  }
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6GuestPopover,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] #v6TravellerPopover{
    max-width:calc(100vw - 24px)!important;
    box-sizing:border-box!important;
  }
}

@media(prefers-reduced-motion:reduce){
  html body.hotel-search-page #hotelResultsForm *,
  html body#agHome.ag125-home.ag260-home[data-ag-home-release="r266"][data-ag-h5-search-shell="1"] .v6-search-card *{
    scroll-behavior:auto!important;
  }
}
