/* ============================================================================================
   Search bar (AccommodationItem.cshtml), ported from
   CyprusParadise-NewDesigns/prototypes/customise-holiday/ - the same gold search-bar capsule
   + centred popup dialogs used further along the booking funnel, adapted here with a Resort/
   Hotel field added (this page still lets you browse between hotels; customise-holiday doesn't,
   since by that step the hotel is already fixed) and a fuller Rooms & guests editor (per-room
   adults/children, not just a room-count picker).

   Every class here is prefixed aip- rather than reusing the prototype's bare names - in
   particular NOT plain ".modal": Bootstrap's global stylesheet (loaded sitewide) defines
   ".modal { display: none; ... }" unconditionally, with no ".show"-gated override, so a native
   <dialog class="modal"> here would never render even after .showModal() - it needed its own
   name to avoid that collision entirely, not a CSS specificity fight.
   ============================================================================================ */

/* Every colour below is used via var(--aip-*); AccommodationItem.cshtml/ProductPage.cshtml
   already get real values from JourneyPages.css's ".aip-page" block (a closer-ancestor
   declaration always wins over :root for an inherited custom property), so this is only the
   fallback for pages/partials that load this stylesheet without that wrapper - e.g.
   HolidaySearchTab.cshtml on the homepage. Values copied verbatim from .aip-page so this bar
   looks identical everywhere it's used, rather than re-deriving a second colour set. */
:root {
  --aip-primary: #02aaa9;
  --aip-primary-dark: #218887;
  --aip-primary-deep: #104443;
  --aip-primary-mist: #def6f5;
  --aip-gold: #febb02;
  --aip-coral: #f9706a;
  --aip-text: #3c4e5a;
  --aip-text-muted: #707070;
  --aip-ink: #141515;
  --aip-border: #d8e0e0;
  --aip-page-bg: #f3f6f6;
}

.aip-search-bar {
  /* margin: 14px 0 0; */
  background: var(--aip-gold);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 0 6px;
  box-shadow: 0 16px 40px rgba(16, 68, 67, 0.18);
}

/* FlightSearchTab.cshtml has 4 real fields (no Resort/hotel field, one combined Departure-Return
   field instead of separate date/duration) - same bar, just one fewer column than
   HolidaySearchTab.cshtml's 5. */
.aip-search-bar--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

/* HotelSearchTab.cshtml has 3 real fields - Resort/hotel, a combined Check-in/Check-out field
   (no separate Duration field at all), and Rooms & guests - no Departure airport either, since
   there's no flight to pick one for. */
.aip-search-bar--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

/* HotelSearchTab.cshtml in single-hotel (SaaS) mode - no Resort/hotel field (one hotel only),
   just Check-in/Check-out and Rooms & guests. */
.aip-search-bar--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.aip-search-bar__field {
  appearance: none;
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: box-shadow 0.15s ease;
}

.aip-search-bar__field:hover {
  box-shadow: inset 0 0 0 1px var(--aip-primary);
}

.aip-search-bar__field.is-on {
  box-shadow: inset 0 0 0 2px var(--aip-gold);
}

.aip-search-bar__field span {
  font-size: 11px;
  font-weight: 700;
  color: var(--aip-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aip-search-bar__field strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--aip-ink);
}

.aip-search-bar__field em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.aip-search-bar__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--aip-primary-dark);
}

.aip-search-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #14b8b6, var(--aip-primary));
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(2, 170, 169, 0.28);
}

.aip-search-bar__btn svg {
  width: 18px;
  height: 18px;
}

.aip-search-bar__btn:hover {
  background: var(--aip-primary-deep);
}

/* ---- Mobile: collapsed search summary + tablet/phone breakpoints -----------------------
   Ported from CyprusParadise-NewDesigns/prototypes/hotel-product/'s own #search-wrap/
   #edit-search pattern - hidden on desktop, and on phones the full 5-field bar collapses
   behind a single tap-to-edit summary chip instead of cramming into an ever-narrower grid
   (see aipSearchDropdowns.js for the .is-editing toggle). */
.aip-search-summary {
  display: none;
}

@media (max-width: 1140px) {
  /* .aip-search-bar {
    grid-template-columns: 1fr 1fr 1fr;
  } */

  /* .aip-search-bar__btn {
    grid-column: 1 / -1;
  } */
}

@media (max-width: 860px) {
  /* Smooth open/close instead of the old hard display:none/block snap. max-height is capped
     generously above the tallest this bar ever gets (5 stacked fields + Search button) rather
     than measured exactly - simpler than a JS height calc and the easing masks the unused
     tail of the transition when real content is shorter than the cap. visibility is delayed
     on the way in but not the way out (allow-discrete without the modern @starting-style
     syntax) so the collapsed bar drops out of tab order/AT only once it's actually invisible,
     while the reverse (opening) is visible immediately so the animation isn't hidden. */
  .aip-search-bar {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition:
      max-height 0.32s ease,
      margin-top 0.32s ease,
      visibility 0s linear 0.32s;
  }

  .aip-search-wrap.is-editing .aip-search-bar {
    margin-top: 14px;
    max-height: 700px;
    visibility: visible;
    transition:
      max-height 0.32s ease,
      margin-top 0.32s ease;
  }

  .aip-search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 14px 0 0;
    background: #fff;
    border: 1px solid var(--aip-border);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 18px rgba(16, 68, 67, 0.08);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--aip-ink);
    text-align: left;
    cursor: pointer;
  }

  .aip-search-summary span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--aip-text);
    font-weight: 400;
  }

  .aip-search-summary span:last-child {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--aip-primary);
  }
}

/* ---- Modal (native <dialog>) base ---- */

.aip-modal {
  width: min(560px, calc(100vw - 24px));
  max-height: min(90dvh, 760px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 18px 40px rgba(16, 68, 67, 0.2);
  color: var(--aip-text);
}

/* Flex column so __head/__foot stay pinned (Close/Apply always in view, no scrolling the whole
   dialog to reach them) and only __body scrolls internally when its content (e.g. the Duration
   dialog's 14 night-count chips, or a tall airport/resort list) overflows the max-height above.
   Scoped to [open] rather than plain .aip-modal - the browser's own user-agent stylesheet has
   "dialog:not([open]) { display: none }" to keep closed dialogs hidden/out of the accessibility
   tree, but author CSS always wins over user-agent CSS regardless of selector specificity, so an
   unconditional "display: flex" here would have overridden that and left every closed dialog
   rendered (just outside the top layer, no backdrop). */
.aip-modal[open] {
  display: flex;
  flex-direction: column;
}

.aip-modal--wide {
  width: min(720px, calc(100vw - 24px));
}

.aip-modal--date,
.aip-modal--nights {
  width: min(420px, calc(100vw - 24px));
}

/* Two-month range-date dialogs (HotelSearchTab.cshtml's Check-in/Check-out,
   FlightSearchTab.cshtml's Depart-Return) - wide enough for two .aip-mini-grid calendars
   side by side, see .aip-cal-months below. */
.aip-modal--daterange {
  width: min(660px, calc(100vw - 24px));
}

.aip-modal::backdrop {
  background: rgba(16, 68, 67, 0.45);
}

.aip-modal__head,
.aip-modal__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  margin: 0;
  flex-shrink: 0;
}

.aip-modal__foot {
  align-items: center;
  border-top: 1px solid #e7eeee;
  justify-content: flex-end;
  gap: 10px;
}

.aip-modal h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--aip-ink);
}

.aip-modal__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--aip-text-muted);
}

.aip-modal__x {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #eef1f1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--aip-text);
}

.aip-modal__x:hover {
  background: #e4e8e8;
}

.aip-modal__body {
  padding: 0 22px 8px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.aip-btn-ghost,
.aip-btn-primary {
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.aip-btn-ghost {
  background: none;
  color: var(--aip-text-muted);
}

.aip-btn-ghost:hover {
  color: var(--aip-ink);
}

.aip-btn-primary {
  background: linear-gradient(180deg, #14b8b6, var(--aip-primary));
  color: #fff;
  box-shadow: 0 8px 18px rgba(2, 170, 169, 0.28);
}

.aip-btn-primary:hover {
  background: var(--aip-primary-deep);
}

.aip-btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

/* ---- Departure airports (multi-select, grouped by region) ---- */

.aip-airport-sheet {
  display: grid;
  gap: 0;
  max-height: min(52dvh, 420px);
  overflow: auto;
  padding-bottom: 8px;
}

.aip-airport-group {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--aip-border);
}

.aip-airport-group:first-child {
  border-top: 0;
  padding-top: 4px;
}

.aip-airport-group__all {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--aip-ink);
  cursor: pointer;
}

.aip-airport-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aip-airport-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--aip-page-bg);
  color: var(--aip-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.aip-airport-chip:has(input:checked) {
  background: var(--aip-primary-mist);
  color: var(--aip-primary-deep);
  box-shadow: inset 0 0 0 1px var(--aip-primary);
}

.aip-airport-chip input,
.aip-airport-group__all input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px #c5d0d0;
  background: #fff;
  flex-shrink: 0;
  cursor: pointer;
}

.aip-airport-chip input:checked,
.aip-airport-group__all input:checked {
  background: var(--aip-primary);
  box-shadow: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9.2 16.6 4.8 12.2l-1.4 1.4 5.8 5.8 12-12-1.4-1.4Z'/></svg>");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---- Resort / hotel (search + grouped list) ---- */

.aip-modal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--aip-page-bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0 10px;
}

.aip-modal-search svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--aip-text-muted);
}

.aip-modal-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--aip-ink);
}

.aip-modal-search input:focus {
  outline: none;
}

.aip-resort-sheet {
  max-height: min(52dvh, 420px);
  overflow: auto;
  padding-bottom: 8px;
}

/* Deliberately reuses .aip-airport-group/.aip-airport-group__all/.aip-airport-picks/
   .aip-airport-chip (below) rather than a second copy - same checkbox-list-with-a-region
   "select all" mechanic as the airports modal, and Resort (like Depart) is a real comma-joined
   multi-select underneath, so it genuinely behaves the same way, not just looks it. Picking a
   specific hotel is mutually exclusive with picking resorts (see aipSearchDropdowns.js) - you're
   either searching a specific hotel or one-or-more broader resorts, not both at once. */

.aip-resort-empty {
  margin: 16px 4px;
  font-size: 13px;
  color: var(--aip-text-muted);
  text-align: center;
}

/* ---- Departure date (mini calendar) ---- */

.aip-mini-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

/* Month picker (hotel-only product page's range dialog, CalendarSearchTab.cshtml): one label for
   the two months on show between the Prev/Next arrows, opening a month grid in place of the
   calendar. Focus/active styles stay inside each button (inset ring), so nothing is clipped by
   the dialog body's edges. */
.aip-cal-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--aip-primary-deep);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s;
}

.aip-cal-jump svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.aip-cal-jump:hover,
.aip-cal-jump.is-open {
  background: var(--aip-primary-mist);
}

.aip-cal-jump.is-open svg {
  transform: rotate(180deg);
}

.aip-cal-jump:focus {
  outline: none;
}

.aip-cal-jump:focus-visible {
  box-shadow: inset 0 0 0 2px var(--aip-primary);
}

/* The one label replaces the per-month headings side by side; stacked on phones, each month
   keeps its own heading. */
@media (min-width: 641px) {
  .aip-cal-months--jump .aip-cal-month h4 {
    display: none;
  }
}

.aip-cal-jump-panel {
  display: grid;
  gap: 16px;
  min-height: 280px;
  align-content: start;
}

.aip-cal-jump-panel[hidden],
.aip-cal-months[hidden] {
  display: none;
}

.aip-cal-jump-year__label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--aip-text-muted);
}

.aip-cal-jump-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.aip-cal-jump-grid button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--aip-page-bg);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--aip-ink);
  cursor: pointer;
}

.aip-cal-jump-grid button:hover:not(:disabled) {
  box-shadow: inset 0 0 0 2px var(--aip-gold);
}

.aip-cal-jump-grid button:focus {
  outline: none;
}

.aip-cal-jump-grid button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--aip-primary);
}

.aip-cal-jump-grid button.is-on {
  background: var(--aip-primary);
  color: #fff;
}

.aip-cal-jump-grid button:disabled {
  background: transparent;
  color: #b7bfbf;
  cursor: default;
}

@media (max-width: 640px) {
  .aip-cal-jump {
    font-size: 14px;
    padding: 0 10px;
  }

  .aip-cal-jump-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.aip-mini-nav h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  /* color: var(--aip-primary-deep); */
}

.aip-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--aip-border);
  background: #fff;
  border-radius: 999px;
  font-size: 22px;
  display: grid;
  place-items: center;
  color: var(--aip-primary-deep);
  cursor: pointer;
}

.aip-icon-btn svg {
  width: 18px;
  height: 18px;
}

.aip-icon-btn:hover:not(:disabled) {
  border-color: var(--aip-primary);
  background: var(--aip-primary-mist);
}

.aip-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.aip-mini-weekdays,
.aip-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.aip-mini-weekdays {
  margin-bottom: 6px;
  color: var(--aip-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.aip-mini-grid button,
.aip-mini-grid span {
  appearance: none;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--aip-page-bg);
  color: var(--aip-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.aip-mini-grid span {
  background: transparent;
  cursor: default;
}

.aip-mini-grid button:hover:not(:disabled) {
  box-shadow: inset 0 0 0 2px var(--aip-gold);
}

.aip-mini-grid button.is-on {
  background: var(--aip-primary);
  color: #fff;
}

/* Range-date picker (FlightSearchTab.cshtml's Departure-Return dialog) - the two endpoints
   still use the same solid .is-on look above; days strictly between them get this lighter fill
   instead so the chosen range reads as one block. */
.aip-mini-grid button.aip-cal-in-range {
  background: var(--aip-primary-mist);
  color: var(--aip-primary-deep);
}

/* Other leg's day on a linked calendar (e.g. pick-up shown on the car-hire drop-off dialog).
   Outline only so it stays distinct from the selected .is-on day; still visible when disabled. */
.aip-mini-grid button.aip-cal-linked {
  box-shadow: inset 0 0 0 2px var(--aip-primary);
  color: var(--aip-primary-deep);
  font-weight: 700;
}

.aip-mini-grid button.aip-cal-linked:disabled {
  background: var(--aip-primary-mist);
  color: var(--aip-primary-deep);
  opacity: 1;
  cursor: default;
}

.aip-mini-grid button:disabled {
  background: transparent;
  color: #b7bfbf;
  cursor: default;
}

/* Two-month calendar (Check-in/Check-out - HotelSearchTab.cshtml; Depart-Return -
   FlightSearchTab.cshtml) - one shared Prev/Next nav (.aip-mini-nav above) shifts both months
   together; each column keeps its own heading and reuses the .aip-mini-weekdays/.aip-mini-grid
   rules above unchanged. */
.aip-cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.aip-cal-month h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--aip-primary-deep);
  text-align: center;
}

@media (max-width: 640px) {
  .aip-cal-months {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .aip-cal-month + .aip-cal-month {
    margin-top: 16px;
  }
}

.aip-date-flex {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--aip-border);
}

.aip-flex-chip {
  flex: 1;
  border: 1px solid var(--aip-border);
  border-radius: 20px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: var(--aip-text-muted);
  cursor: pointer;
}

.aip-flex-chip.is-on {
  background: var(--aip-primary-mist);
  border-color: var(--aip-primary);
  color: var(--aip-primary-deep);
}

/* ---- Duration ---- */

.aip-nights-sheet {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
}

.aip-nights-option {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--aip-border);
  border-radius: 12px;
  background: #fff;
  color: var(--aip-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.aip-nights-option:hover {
  border-color: var(--aip-primary);
}

.aip-nights-option.is-on {
  background: var(--aip-primary-mist);
  border-color: var(--aip-primary);
  color: var(--aip-primary-deep);
}

/* ---- Rooms & guests ---- */

.aip-room {
  border: 1px solid var(--aip-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.aip-room__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--aip-primary-deep);
}

.aip-room__remove {
  border: 0;
  background: none;
  color: var(--aip-coral);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.aip-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--aip-ink);
}

.aip-stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.aip-stepper__btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--aip-primary);
  border-radius: 4px;
  background: #fff;
  color: var(--aip-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.aip-stepper__btn:hover:not(:disabled) {
  background: var(--aip-primary-mist);
}

.aip-stepper__value {
  min-width: 1.2em;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--aip-ink);
}

.aip-child-ages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.aip-child-ages select {
  border: 1px solid var(--aip-border);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--aip-ink);
  background: #fff;
}

.aip-child-ages select.aip-field-error {
  border-color: var(--aip-coral);
  box-shadow: 0 0 0 1px var(--aip-coral);
}

.aip-add-room {
  display: block;
  width: 100%;
  border: 1.5px dashed var(--aip-border);
  border-radius: 10px;
  background: none;
  padding: 11px;
  margin-top: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--aip-primary);
  cursor: pointer;
}

.aip-add-room:hover {
  background: var(--aip-primary-mist);
}

/* Outbound/return date+time dialogs (TransferSearchTab.cshtml's own #xfModalOut/#xfModalBack) -
   a plain field label + native time input under the single-month calendar, since those are the
   only two ".aip-modal__body" dialogs so far that need a time alongside their date. */
.aip-field-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--aip-text-muted);
}

.aip-modal__body input[type="time"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--aip-border);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--aip-ink);
  background: #fff;
}

@media (max-width: 640px) {
  .aip-airport-group {
    grid-template-columns: 1fr;
  }
}

/* ---- Mobile: modals become full-width bottom sheets --------------------------------------
   Same transformation CyprusParadise-NewDesigns/prototypes/search-results/styles.css applies
   to its own .modal at this breakpoint - pinned to the bottom of the viewport with only the
   top corners rounded, rather than a centred floating box (which on a phone-sized <dialog>
   leaves awkward margins on every side and makes the tallest ones - Rooms & guests, Departure
   airports - feel cramped). The width/max-width overrides here beat every .aip-modal--* size
   modifier above by appearing later in the cascade at equal (single-class) specificity. */
@media (max-width: 860px) {
  .aip-modal,
  .aip-modal--wide,
  .aip-modal--date,
  .aip-modal--nights,
  .aip-modal--daterange {
    width: 100vw;
    max-width: 100vw;
  }

  .aip-modal {
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .aip-modal h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .aip-modal__head,
  .aip-modal__foot {
    padding: 14px 16px;
  }

  .aip-modal__foot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .aip-modal__body {
    padding: 0 16px 12px;
  }

  /* Slide the bottom sheet up on open / back down on close instead of the native <dialog>'s
     instant appear-disappear. dialog.showModal()/.close() in aipSearchDropdowns.js need no
     changes for this - the browser toggles the [open] attribute either way, this just gives
     that attribute change something to transition. The trick is `transition-behavior:
     allow-discrete` on display/overlay (the shorthand's 3rd value below) plus @starting-style
     for the entry frame - without it the dialog leaves the top layer and switches to
     display:none the instant close() runs, before a transform transition would ever get a
     chance to paint. This is the standard pattern for animating <dialog>; see MDN's "Animating
     dialog and ::backdrop" for the same shape applied here with translateY instead of scale. */
  .aip-modal {
    transform: translateY(100%);
    transition:
      transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
      overlay 0.32s allow-discrete,
      display 0.32s allow-discrete;
  }

  .aip-modal[open] {
    transform: translateY(0);
  }

  @starting-style {
    .aip-modal[open] {
      transform: translateY(100%);
    }
  }

  .aip-modal::backdrop {
    background: rgba(16, 68, 67, 0);
    transition:
      background-color 0.32s ease,
      overlay 0.32s allow-discrete,
      display 0.32s allow-discrete;
  }

  .aip-modal[open]::backdrop {
    background: rgba(16, 68, 67, 0.45);
  }

  @starting-style {
    .aip-modal[open]::backdrop {
      background: rgba(16, 68, 67, 0);
    }
  }
}

