/* ——— Listing page shell ——— */
.listing-page {
  background: var(--cream);
}

.listing-header {
  padding: 0.85rem 1.25rem;
}

/* A fixed header needs something to stay legible against — the gallery
   photos don't have a built-in dark veil the way the hero photos do, so
   add a thin permanent scrim behind the header strip only. */
.listing-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5.5rem;
  background: linear-gradient(180deg, rgba(18, 55, 44, 0.4), rgba(18, 55, 44, 0));
  z-index: 15;
  pointer-events: none;
}

.listing-main {
  max-width: 78rem;
  margin: 0 auto;
  /* Top padding matches the scrim height above, so the actual gallery
     photos start right where the fixed header ends — no bare gap above
     them, but the header also doesn't sit on top of and obscure them
     (unlike the decorative hero photos elsewhere, these are real listing
     photos guests need to see in full). */
  padding: 5.5rem 1.25rem clamp(4rem, 8vw, 6rem);
}

/* ——— Gallery ——— */
.lg-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.lg-shot {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
}

.lg-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wraps every gallery <img> so it opens in the lightbox (gallery-lightbox.js)
   — sized to fill the figure exactly like the img itself used to. */
.lg-shot-btn {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.lg-shot-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.lg-shot-btn img {
  transition: transform 0.4s var(--ease);
}

.lg-shot-btn:hover img,
.lg-shot-btn:focus-visible img {
  transform: scale(1.04);
}

/* The last visible tile when listing-details.js has more Hospitable photos
   than the grid shows (GALLERY_VISIBLE_COUNT) — a dark veil over that
   thumbnail with a "+N more" count, opening the same lightbox the other
   photos do, just starting past what's on screen. */
.lg-shot-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 55, 44, 0.6);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  padding: 0.5rem;
}

.lg-shot-btn.is-more:hover .lg-shot-more,
.lg-shot-btn.is-more:focus-visible .lg-shot-more {
  background: rgba(18, 55, 44, 0.72);
}

.lg-shot-main {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.lg-gallery-note {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-style: italic;
}

@media (min-width: 700px) {
  .lg-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .lg-shot-main {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    aspect-ratio: auto;
  }
}

/* ——— Layout ——— */
.lg-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}

/* listing-details.js splits property.name at its first colon — Hospitable
   names are "Unit Name: marketing subtitle" — and renders the two halves as
   stacked spans rather than one run-on heading with a colon mid-line. */
.lg-content h1 {
  margin: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lg-name-main {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 2.75rem);
  line-height: 1.15;
  color: var(--teal-deep);
}

.lg-name-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--ink-muted);
}

.lg-address {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.lg-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  color: var(--ink);
}

.lg-facts strong {
  color: var(--teal-deep);
  font-weight: 500;
}

.lg-divider {
  border: none;
  border-top: 1px solid rgba(26, 46, 40, 0.12);
  margin: 2rem 0;
}

.lg-section h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--teal-deep);
}

.lg-section p {
  margin: 0 0 1rem;
  color: var(--ink);
}

/* A heading-shaped line pulled out of a live Hospitable description by
   listing-details.js (renderBlock) — e.g. "Age Requirement" ahead of the
   paragraph explaining it, rather than run into that paragraph's first
   sentence. */
.lg-about-heading {
  margin: 1.4rem 0 0.15rem;
  font-weight: 500;
  color: var(--teal-deep);
}

/* A run of "• ..." lines inside a Hospitable section (renderLines in
   listing-details.js) — a plain list rather than one run-on paragraph. */
.lg-about-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink);
}

.lg-about-list li {
  margin-bottom: 0.3rem;
}

/* Hospitable's neighborhood / getting-around copy, under the map. */
.lg-neighborhood {
  margin-top: 1.5rem;
}

/* Boxed the same way .lg-policies-section is below — the highlights
   checklist (Hospitable's summary field) is a distinct callout above the
   narrative, not a heading floating in the middle of it. */
.lg-highlights-box {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--cream-warm);
  border-radius: 10px;
}

/* Matches .lg-amenity-group h3 below — same small-caps label treatment, so
   "Highlights" reads as the same kind of sub-heading as "In the condo" /
   "At the resort" do. */
.lg-about-highlights-label {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--teal-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lg-about-highlights {
  margin-bottom: 0;
}

/* Set apart as its own shaded card — this is the numbered house-rules /
   need-to-know half of Hospitable's description (see splitDescription() in
   listing-details.js), and reads as a distinct callout rather than more of
   the "About this stay" narrative above it. */
.lg-policies-section {
  padding: 1.5rem 1.5rem 0.5rem;
  background: var(--cream-warm);
  border-radius: 10px;
}

.lg-section-sub {
  color: var(--ink-muted) !important;
  font-size: 0.9rem;
}

.lg-amenity-group h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--teal-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.lg-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.lg-check-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.94rem;
  color: var(--ink);
}

.lg-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--teal-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center / 65% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center / 65% no-repeat;
}

/* Hospitable's amenities render as one flat list (16+ items isn't unusual),
   so it goes multiple columns inside its .lg-policies-section card rather
   than running down as one long single-file list. margin-bottom makes up
   for .lg-check-list li not having the paragraph bottom-margin that already
   balances the box's own asymmetric padding elsewhere (see
   .lg-policies-section). */
.lg-amenities-cols {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .lg-amenities-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lg-nearby-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(26, 46, 40, 0.1);
}

.lg-nearby-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(26, 46, 40, 0.1);
  font-size: 0.94rem;
}

.lg-nearby-name {
  color: var(--ink);
}

.lg-nearby-dist {
  color: var(--teal-soft);
  white-space: nowrap;
  font-size: 0.85rem;
}

.lg-map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(26, 46, 40, 0.12);
}

.lg-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lg-map-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--teal-soft);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.lg-map-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

@media (min-width: 980px) {
  .lg-layout {
    grid-template-columns: 1.6fr 1fr;
  }
}

/* ——— Booking card ——— */
.lg-booking {
  position: relative;
}

.lg-booking-card {
  position: sticky;
  top: 5.5rem;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.1);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(18, 55, 44, 0.1);
}

.lg-booking-price {
  margin-bottom: 1.1rem;
}

.lg-price-from {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.lg-price-amount {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--teal-deep);
}

.lg-price-unit {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Calendar */
.lg-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.lg-calendar-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--teal-deep);
  font-family: var(--font-body);
}

.lg-calendar-header button {
  border: none;
  background: var(--cream-warm);
  color: var(--teal-deep);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.2s ease;
}

.lg-calendar-header button:hover {
  background: var(--foam);
}

.lg-calendar-header button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lg-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.lg-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.lg-cal-day {
  position: relative;
  aspect-ratio: 0.82;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0.8rem;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.lg-cal-day-num {
  line-height: 1;
}

/* Only open days get one of these (see renderCalendar() in listing.js) — the
   nightly rate for that date, small enough to sit under the day number
   without the cell needing a fixed height of its own. */
.lg-cal-day-price {
  font-size: 0.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-muted);
}

.lg-cal-day.is-selected .lg-cal-day-price {
  color: rgba(255, 255, 255, 0.85);
}

.lg-cal-day.is-empty {
  cursor: default;
}

.lg-cal-day.is-past {
  color: rgba(26, 46, 40, 0.25);
  cursor: not-allowed;
}

/* Booked, or otherwise not offerable: reserved elsewhere, closed for
   check-in/check-out, or outside the minimum stay for the chosen check-in. */
.lg-cal-day.is-blocked {
  color: rgba(26, 46, 40, 0.3);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Availability for this day hasn't come back from the server yet. Deliberately
   not styled as open — an unknown date must not look bookable. */
.lg-cal-day.is-pending {
  color: rgba(26, 46, 40, 0.25);
  cursor: progress;
}

.lg-cal-day.is-open:hover {
  background: var(--cream-warm);
}

/* :hover included so the hover tint (.is-open:hover, more specific) can't
   wash out a selected date while the pointer is still on it. */
.lg-cal-day.is-selected,
.lg-cal-day.is-selected:hover {
  background: var(--teal);
  color: #fff;
}

.lg-cal-day.is-in-range {
  background: var(--foam);
}

.lg-calendar-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 0.6rem;
}

.lg-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-soft);
  display: inline-block;
  margin-left: 0.6rem;
}

.lg-legend-dot:first-child {
  margin-left: 0;
}

/* "Selected" only means something when the calendar is a picker, so it sits in
   its own wrapper the middleware can lift out. */
.lg-legend-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lg-dot-selected {
  background: var(--teal);
}

.lg-dot-booked {
  background: rgba(26, 46, 40, 0.25);
}

.lg-calendar-sync {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--ink-muted);
  font-style: italic;
}

.lg-calendar-sync.is-error {
  color: #a4372b;
  font-style: normal;
}

/* Cancellation policy */
.lg-policy-tiers {
  list-style: none;
  margin: 1.1rem 0 1.3rem;
  padding: 0;
  border: 1px solid var(--cream-warm);
  border-radius: 10px;
  overflow: hidden;
}

.lg-policy-tiers li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--cream-warm);
}

.lg-policy-tiers li:first-child {
  border-top: none;
}

.lg-policy-when {
  font-size: 0.92rem;
  color: var(--ink);
}

.lg-policy-refund {
  flex-shrink: 0;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lg-policy-refund.is-full {
  color: var(--teal-soft);
}

.lg-policy-refund.is-half {
  color: var(--gold);
}

.lg-policy-refund.is-none {
  color: rgba(26, 46, 40, 0.5);
}

.lg-policy-notes {
  list-style: disc;
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.lg-policy-notes li + li {
  margin-top: 0.3rem;
}

/* Cancellation terms inside the booking card + confirm modal */
.lg-cancel-note {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
  color: var(--teal-soft);
}

.lg-policy-link {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--ink-muted);
}

.lg-modal-policy {
  margin: 0.9rem 0 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  color: var(--teal-soft);
}

/* Summary + book button */
.lg-summary {
  margin: 1.1rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 46, 40, 0.1);
  min-height: 2.5rem;
}

.lg-summary-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.lg-summary-lines {
  margin: 0;
  font-size: 0.9rem;
}

.lg-summary-lines > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.lg-summary-lines dt,
.lg-summary-lines dd {
  margin: 0;
  font-weight: 300;
}

.lg-summary-discount dt,
.lg-summary-discount dd {
  color: var(--teal-soft);
}

.lg-summary-total-row {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(26, 46, 40, 0.1);
  font-weight: 500 !important;
}

.lg-summary-total-row dt,
.lg-summary-total-row dd {
  color: var(--teal-deep);
  font-weight: 500;
}

/* Every element the booking card toggles sets its own `display`, which beats
   the UA stylesheet's `[hidden] { display: none }` and leaves the element on
   screen. styles.css carries a global guard; these repeat it locally so the
   card can't break if that file is stale in a cache. */
.lg-summary-lines > div[hidden],
.lg-modal-line[hidden],
.lg-coupon-field[hidden],
.lg-coupon-applied[hidden],
.lg-coupon-status[hidden] {
  display: none !important;
}

/* Coupon */
.lg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lg-coupon {
  margin: 0 0 1.1rem;
}

/* Input and Apply share one bordered box so the card reads as a single
   control rather than two competing outlines. */
.lg-coupon-field {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.16);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.lg-coupon-field:focus-within {
  border-color: var(--gold);
}

.lg-coupon-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  color: var(--teal-deep);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
}

.lg-coupon-input::placeholder {
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-muted);
  opacity: 0.8;
}

.lg-coupon-input:focus {
  outline: none;
}

.lg-coupon-apply {
  flex: 0 0 auto;
  padding: 0 1rem;
  color: var(--teal-soft);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(26, 46, 40, 0.12);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
}

.lg-coupon-apply:hover:not(:disabled) {
  color: var(--teal-deep);
  background: var(--cream-warm);
}

.lg-coupon-apply:disabled {
  color: var(--ink-muted);
  cursor: wait;
}

/* Applied state replaces the field entirely — nothing left to edit, so the
   card gets a quiet confirmation chip instead of a live input. */
.lg-coupon-applied {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(42, 99, 82, 0.06);
  border: 1px solid rgba(42, 99, 82, 0.22);
  border-radius: 6px;
  font-size: 0.82rem;
}

.lg-coupon-tick {
  color: var(--teal-soft);
  font-size: 0.75rem;
}

.lg-coupon-code {
  color: var(--teal-deep);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.lg-coupon-off {
  flex: 1 1 auto;
  color: var(--teal-soft);
  font-weight: 300;
}

.lg-coupon-remove {
  flex: 0 0 auto;
  padding: 0;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

.lg-coupon-remove:hover {
  color: var(--teal-deep);
}

.lg-coupon-status {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--teal-soft);
}

.lg-coupon-status.is-error {
  color: #a4372b;
}

/* Guests — two selects sharing the coupon field's bordered-box look, so the
   booking card reads as one family of controls rather than two styles. */
.lg-guests {
  display: flex;
  gap: 0.6rem;
  margin: 1.1rem 0;
}

.lg-guests-field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.16);
  border-radius: 6px;
  transition: border-color 0.25s ease;
}

.lg-guests-field:focus-within {
  border-color: var(--gold);
}

.lg-guests-field label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.lg-guests-field select {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-deep);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
}

.lg-guests-field select:focus {
  outline: none;
}

.lg-book-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.lg-book-btn:disabled {
  background: var(--cream-warm);
  color: var(--ink-muted);
  cursor: not-allowed;
}

/* Availability-only mode's stand-in for the quote panel — see updateOtaHint()
   in listing.js. */
.lg-ota-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--teal-deep);
}

.lg-booking-fine {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.lg-also-listed {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 46, 40, 0.1);
  text-align: center;
}

.lg-also-listed-label {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.lg-also-listed-btns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.5rem;
}

/* Nothing to offer if the middleware removed both links. */
.lg-also-listed:not(:has(a)) {
  display: none;
}

/* ——— Availability-only booking card (DIRECT_BOOKING_LIVE off) ———
   Sits where the summary, coupon field, and Reserve button would be, directly
   under the calendar, so the card keeps its shape and its one clear next step. */
.lg-ota {
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(26, 46, 40, 0.1);
}

.lg-ota-note {
  margin: 0 0 0.95rem;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.lg-ota-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.lg-ota-btn + .lg-ota-btn {
  margin-top: 0.5rem;
}

/* ——— Booking modal ——— */
.lg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 55, 44, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}

.lg-modal-overlay[hidden] {
  display: none;
}

.lg-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 26rem;
  width: 100%;
  padding: 2rem 1.75rem 1.75rem;
  position: relative;
}

.lg-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: none;
  background: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink-muted);
}

.lg-modal h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--teal-deep);
}

.lg-modal p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.lg-modal-total {
  margin: 1.1rem 0 1.4rem;
  padding: 0.9rem 1rem;
  background: var(--cream-warm);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--teal-deep);
  font-weight: 500;
}

.lg-modal-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 300;
}

.lg-modal-line + .lg-modal-line {
  margin-top: 0.35rem;
}

.lg-modal-line-discount {
  color: var(--teal-soft);
}

.lg-modal-line-total {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(26, 46, 40, 0.14);
  font-size: 1rem;
  font-weight: 500;
}

.lg-modal .btn-primary {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.lg-modal .btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Qualified with the parent class + element (matching .lg-modal p's own
   specificity plus one) rather than left as a bare .lg-modal-error: a plain
   class selector loses to .lg-modal p above on specificity regardless of
   source order, since this is itself a <p> inside .lg-modal — which is
   exactly what was silently overriding this rule's color and margin. */
.lg-modal p.lg-modal-error {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #a4372b;
  text-align: center;
}

.lg-modal-fine {
  margin-top: 0.9rem !important;
  font-size: 0.72rem !important;
  color: var(--ink-muted) !important;
  text-align: center;
}

/* ——— Gallery lightbox ——— */
.lg-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 21, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem;
  z-index: 60;
}

.lg-lightbox-overlay[hidden] {
  display: none;
}

.lg-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lg-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lg-lightbox-caption {
  margin: 0;
  color: var(--foam);
  font-size: 0.85rem;
  text-align: center;
  max-width: 40rem;
}

.lg-lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--foam);
  font-size: 0.8rem;
}

.lg-lightbox-close,
.lg-lightbox-prev,
.lg-lightbox-next {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s var(--ease);
}

.lg-lightbox-close:hover,
.lg-lightbox-prev:hover,
.lg-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lg-lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.3rem;
  line-height: 1;
}

.lg-lightbox-prev,
.lg-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.2rem;
}

.lg-lightbox-prev {
  left: 1rem;
}

.lg-lightbox-next {
  right: 1rem;
}

@media (max-width: 640px) {
  .lg-lightbox-overlay {
    padding: 2.5rem 0.5rem;
  }

  .lg-lightbox-prev,
  .lg-lightbox-next {
    width: 2.25rem;
    height: 2.25rem;
  }

  .lg-lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* ——— Booking status banner ——— */
.lg-banner {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.lg-banner-success {
  background: #e4f0e8;
  color: var(--teal-deep);
  border: 1px solid rgba(27, 77, 62, 0.25);
}

.lg-banner-cancelled {
  background: #f6ece7;
  color: #a4372b;
  border: 1px solid rgba(164, 55, 43, 0.25);
}

/* The richer success card (see renderConfirmationDetails() in listing.js) —
   heading, then one line per fact, then the fine-print email note. Plain
   .lg-banner text (the fallback line, and the whole of .lg-banner-cancelled)
   doesn't use these; they only apply once the confirmation details load. */
.lg-banner-heading {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
}

.lg-banner-line {
  margin: 0 0 0.3rem;
}

.lg-banner-line:last-of-type {
  margin-bottom: 0;
}

.lg-banner-fine {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Below 640px the nav wraps to two lines (see styles.css), making the
   fixed header taller than the 5.5rem clearance above accounts for —
   without this, the header overlaps and crops the top of the gallery
   photo. Give it more room here to match. */
@media (max-width: 640px) {
  .listing-page::before {
    height: 8.5rem;
  }

  .listing-main {
    padding-top: 8.5rem;
  }
}

/* ——— Traveling with kids ———
   The same warm callout as "Good to Know", lifted up under the facts. */
.lg-kids {
  margin-top: 1.75rem;
  padding: 1.5rem 1.5rem 1.1rem;
  background: var(--cream-warm);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
}

.lg-kids .lg-section-sub {
  margin-bottom: 1rem;
}

.lg-kids strong {
  font-weight: 500;
  color: var(--teal-deep);
}

.lg-kids .lg-kids-fine {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.lg-kids-fine a {
  color: var(--teal-soft);
  font-weight: 500;
  white-space: nowrap;
}

.lg-kids-fine a:hover {
  color: var(--gold);
}

.lg-kids-list {
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  .lg-kids-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
