/* Reservation flow: one scroll container, readable steps, and a clear final price. */
body[data-page="listing"] #listingBookingDialog[open] {
  display: flex;
  flex-direction: column;
  width: min(780px, calc(100vw - 32px));
  max-height: min(94dvh, 900px);
  background: #f6f8f7;
}

body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-head {
  flex: 0 0 auto;
  min-height: 68px;
  padding: 14px 24px;
  background: #18352e;
}

body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-head h2 {
  font-size: 1.2rem;
  line-height: 1.25;
}

body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 26px 30px;
  scrollbar-gutter: stable;
}

body[data-page="listing"] #listingBookingDialog .booking-panel {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-page="listing"] #listingBookingDialog .booking-panel::before {
  display: none !important;
}

body[data-page="listing"] #listingBookingDialog .price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid #dce6e0;
  border-radius: 8px;
  background: #fff !important;
  color: #19332c !important;
}

body[data-page="listing"] #listingBookingDialog .price-line :is(h2, .muted, .booking-panel-kicker) {
  color: #19332c !important;
}

body[data-page="listing"] #listingBookingDialog .price-line h2 {
  margin: 0;
  font-size: 1.35rem;
  text-align: right;
  overflow-wrap: anywhere;
}

body[data-page="listing"] #listingBookingDialog #reservationForm {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px !important;
  align-items: start;
}

body[data-page="listing"] #listingBookingDialog #reservationForm > .wide,
body[data-page="listing"] #listingBookingDialog #simpleBookingControls {
  grid-column: 1 / -1;
}

body[data-page="listing"] #listingBookingDialog .booking-form-section {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 10px;
  margin: 10px 0 0;
  padding: 10px 0;
  border-bottom: 1px solid #dce5e0;
  border-radius: 0 !important;
  background: transparent !important;
  color: #18352e !important;
}

body[data-page="listing"] #listingBookingDialog .booking-form-section span {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #18352e;
  color: #fff;
  font-size: .85rem;
}

body[data-page="listing"] #listingBookingDialog .booking-form-section strong {
  color: #18352e !important;
  font-size: 1rem;
}

body[data-page="listing"] #listingBookingDialog .booking-form-section small {
  color: #5d7068 !important;
  font-size: .78rem;
  font-weight: 500;
}

body[data-page="listing"] #listingBookingDialog #reservationForm label {
  display: block;
  margin-bottom: 6px;
  color: #44574f !important;
  font-size: .76rem;
  letter-spacing: 0;
}

body[data-page="listing"] #listingBookingDialog #reservationForm :is(input, select) {
  width: 100%;
  min-height: 48px !important;
  border: 1px solid #cbd8d1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #19332c !important;
  font-weight: 600 !important;
}

body[data-page="listing"] #listingBookingDialog .booking-cost-summary {
  order: 45 !important;
  display: grid;
  gap: 0;
  margin: 12px 0 0;
  padding: 12px 18px;
  border: 1px solid #dce6e0;
  border-radius: 8px;
  background: #fff;
  color: #19332c;
}

body[data-page="listing"] #listingBookingDialog #reservationForm .booking-optional-field {
  display: grid !important;
}

body[data-page="listing"] #listingBookingDialog #closeBookingDialog {
  width: auto !important;
  max-width: max-content !important;
  align-self: center;
  border-radius: 6px !important;
}

body[data-page="listing"] #listingBookingDialog .booking-cost-summary .summary-row {
  min-width: 0;
  border-bottom: 1px solid #edf1ee;
}

body[data-page="listing"] #listingBookingDialog .booking-cost-summary .summary-row:last-child {
  border-bottom: 0;
}

body[data-page="listing"] #listingBookingDialog #reservationForm > .wide:last-child {
  order: 50;
}

body[data-page="listing"] .listing-booking-teaser :is(.eyebrow, strong, p) {
  color: #fff !important;
}

body[data-page="listing"] #listingBookingDialog .price-line {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-page="listing"] #listingBookingDialog #reservationForm button[type="submit"] {
  width: 100%;
  min-height: 52px;
  border-radius: 6px !important;
  background: #c3142d !important;
  color: #fff !important;
}

body[data-page="listing"] #listingBookingDialog .booking-safe-note {
  margin-top: 14px;
}

body[data-page="listing"] #listingBookingDialog #simpleBookingControls .booking-route,
body[data-page="listing"] #listingBookingDialog #simpleBookingControls .guest-stepper,
body[data-page="listing"] #listingBookingDialog #simpleBookingControls .booking-next-hint {
  display: none !important;
}

body[data-page="checkout"] .checkout-page-intro {
  margin: 0 auto 16px !important;
  padding: 0 !important;
}

body[data-page="checkout"] #checkoutDetails {
  padding-top: 0 !important;
}

body[data-page="checkout"] #checkoutDetails .checkout-columns .summary-row {
  gap: 12px;
}

body[data-page="checkout"] #checkoutDetails .checkout-secondary-actions {
  display: flex !important;
  justify-content: flex-end;
  margin: 0 !important;
}

body[data-page="checkout"] #checkoutDetails .checkout-secondary-actions .ghost-btn {
  flex: 0 0 auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto !important;
  min-height: 44px;
  border-radius: 6px !important;
}

body[data-page="checkout"] #checkoutDetails .table-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

body[data-page="checkout"] #checkoutDetails .table-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

body[data-page="checkout"] #checkoutDetails .checkout-guest-identity {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

body[data-page="confirmation"] .booking-pass-reference {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}

body[data-page="confirmation"] .confirmation-missing {
  max-width: 720px;
  padding: 20px 0;
  color: #1b342d;
}

body[data-page="confirmation"] .confirmation-missing .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 700px) {
  body[data-page="listing"] #listingBookingDialog[open] {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-head {
    min-height: 62px;
    padding: 10px 16px;
  }

  body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-head h2 {
    font-size: 1.05rem;
  }

  body[data-page="listing"] #listingBookingDialog #closeBookingDialog {
    width: auto !important;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
  }

  body[data-page="listing"] #listingBookingDialog .listing-booking-dialog-body {
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
  }

  body[data-page="listing"] #listingBookingDialog .price-line {
    padding: 14px;
    margin-bottom: 12px;
  }

  body[data-page="listing"] #listingBookingDialog .price-line h2 {
    font-size: 1.05rem;
  }

  body[data-page="listing"] #listingBookingDialog #reservationForm {
    gap: 10px !important;
  }

  body[data-page="listing"] #listingBookingDialog .booking-form-section small {
    grid-column: 2;
  }

  body[data-page="listing"] #listingBookingDialog .booking-cost-summary {
    padding: 10px 14px;
  }

  body[data-page="checkout"] #checkoutDetails .checkout-secondary-actions {
    justify-content: stretch;
  }

  body[data-page="checkout"] #checkoutDetails .checkout-secondary-actions .ghost-btn,
  body[data-page="checkout"] #checkoutDetails .checkout-final-actions .btn {
    width: 100% !important;
  }
}
