/**
 * Lustforlife — shared booking form modal + payment overlay (room pages).
 * Homepage keeps its inline styles until Phase 2.
 */

/* ─── Booking form modal ─── */
.lfl-booking-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.lfl-booking-overlay.is-open {
  display: flex;
}

.lfl-booking-modal {
  background: #faf8f4;
  width: 100%;
  max-width: 480px;
  max-height: min(92dvh, 92vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  animation: lfl-book-slide 0.35s ease both;
}
@keyframes lfl-book-slide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.lfl-booking-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.lfl-booking-close:hover { color: #333; }

.lfl-booking-head {
  padding: 1.6rem 1.75rem 1rem;
  border-bottom: 1px solid #e8e0d2;
}
.lfl-booking-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #1b3a4b;
  margin: 0 0 0.35rem;
}
.lfl-booking-head p {
  font-size: 0.82rem;
  color: #6b5d50;
  margin: 0;
  line-height: 1.5;
}
.lfl-room-fixed {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8a96e;
  font-weight: 500;
}

.lfl-booking-body { padding: 1.25rem 1.75rem 1.75rem; }

.lfl-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  .lfl-form-row { grid-template-columns: 1fr; }
}

.lfl-form-group { margin-bottom: 1rem; }
.lfl-form-group label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7062;
  margin-bottom: 0.4rem;
}
.lfl-form-group input,
.lfl-form-group select,
.lfl-form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c4b8a5;
  background: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  color: #3d3529;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lfl-form-group input:focus,
.lfl-form-group select:focus,
.lfl-form-group textarea:focus {
  border-color: #1b3a4b;
  box-shadow: 0 0 0 3px rgba(27, 58, 75, 0.1);
}
.lfl-form-group textarea { min-height: 72px; resize: vertical; }

.lfl-promo-row { display: flex; gap: 0.5rem; }
.lfl-promo-row input { flex: 1; text-transform: uppercase; letter-spacing: 0.06em; }
.lfl-promo-apply {
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: #1b3a4b;
  color: #fff;
  border: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.lfl-promo-apply:hover { background: #2e5a6e; }
.lfl-promo-msg { font-size: 0.78rem; margin-top: 0.35rem; min-height: 1.1em; }
.lfl-promo-msg.ok { color: #27ae60; }
.lfl-promo-msg.err { color: #c0392b; }

.lfl-form-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1rem;
  min-height: 44px;
  background: #1b3a4b;
  color: #fefcf9;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.lfl-form-submit:hover { background: #2e5a6e; }
.lfl-form-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.lfl-account-hint {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: #7a7062;
  text-align: center;
  line-height: 1.6;
}
.lfl-account-hint a {
  color: #1b3a4b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#bookingMsg {
  display: none;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  border-radius: 2px;
}

#availabilityInfo {
  display: none;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  border-radius: 2px;
}

/* Price preview (homepage parity) */
.booking-price-preview {
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  background: #f5f1eb;
  border: 1px solid #c4b8a5;
  border-left: 3px solid #1b3a4b;
  font-size: 0.85rem;
}
.bpp-header {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1b3a4b;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.bpp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.bpp-label { color: #7a7062; font-size: 0.8rem; }
.bpp-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #c4b8a5;
}
.bpp-total-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a7062;
}
.bpp-total-value { font-size: 1.05rem; font-weight: 600; color: #1b3a4b; }
.bpp-total-orig {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: #7a7062;
  margin-right: 0.5rem;
}
.bpp-total-alt {
  display: block;
  font-size: 0.7rem;
  color: #7a7062;
  margin-top: 0.15rem;
}
.bpp-cur-toggle { display: flex; gap: 0.35rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.bpp-cur-btn {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border: 1px solid #c4b8a5;
  background: none;
  color: #7a7062;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
}
.bpp-cur-btn.active { background: #1b3a4b; color: #fff; border-color: #1b3a4b; }
.bpp-rate-note { font-size: 0.68rem; color: #999; margin-top: 0.5rem; }
.lfl-price-current {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #1b3a4b;
}
.lfl-price-original {
  font-size: 0.82rem;
  color: #7a7062;
  text-decoration: line-through;
}
.lfl-price-discount {
  display: inline-block;
  background: #c8a96e;
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  margin-left: 0.25rem;
  font-weight: 500;
}

/* ─── Payment overlay (mirrors index.html) ─── */
.payment-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.payment-overlay.is-open {
  display: flex;
}

.payment-modal {
  background: #faf8f4;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  width: 100%;
  max-width: 520px;
  max-height: min(92dvh, 92vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.pm-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  color: #aaa;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
  z-index: 2;
}
.pm-close:hover { color: #555; }

.pm-header {
  padding: 28px 28px 18px;
  border-bottom: 1px solid #ede8de;
}
.pm-hotel-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #b89c6e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.pm-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c2c2c;
  margin: 0;
}
.pm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #888;
}
.pm-summary b { color: #2c2c2c; }
.pm-body { padding: 22px 28px 28px; }

.pm-step { display: none; }
.pm-step.is-active { display: block; }

.pm-methods-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #888;
  margin: 0 0 14px;
}
.pm-method-card {
  border: 1.5px solid #e0d8cc;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: #fff;
}
.pm-method-card:hover {
  border-color: #b89c6e;
  box-shadow: 0 4px 18px rgba(184, 156, 110, 0.13);
  transform: translateY(-1px);
}
#pm-card-other { cursor: default; border-style: dashed; }
#pm-card-other:hover { transform: none; box-shadow: none; }
.pm-method-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pm-method-icon { font-size: 1.4rem; }
.pm-method-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
}
.pm-method-badge {
  font-size: 0.72rem;
  background: #f0f7ef;
  color: #4a8c45;
  border: 1px solid #c2dec0;
  border-radius: 20px;
  padding: 2px 9px;
}
.pm-method-desc { font-size: 0.83rem; color: #888; line-height: 1.5; }
.pm-method-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0e8dc;
  flex-wrap: wrap;
}
.pm-price-total {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.pm-price-fx { font-size: 0.8rem; color: #aaa; }
.pm-price-fee-note { font-size: 0.76rem; color: #b89c6e; margin-left: auto; }

#pm-card-mono { border-color: #1d1d1d; border-width: 2px; }
.pm-mono-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.pm-mono-brand-logo { height: 22px; width: auto; }
.pm-mono-badges { display: flex; gap: 6px; }
.pm-mono-badge-icon { height: 16px; width: auto; }
.pm-mono-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #1d1d1d;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  min-height: 44px;
}
.pm-mono-pay-btn:hover { background: #333; }

.pm-back-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 14px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.pm-wire-block {
  background: #f7f3ec;
  border: 1px solid #e8dcc8;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.pm-wire-block h4 {
  font-family: 'Cormorant Garamond', serif;
  margin: 0 0 12px;
}
.pm-wire-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #ede8de;
  font-size: 0.85rem;
}
.pm-wire-row:last-child { border-bottom: none; }
.pm-wire-label { color: #999; flex-shrink: 0; width: 100px; }
.pm-wire-value { text-align: right; flex: 1; word-break: break-all; }
.pm-wire-ref {
  font-family: monospace;
  background: #fff;
  border: 1.5px dashed #b89c6e;
  padding: 2px 8px;
  color: #b89c6e;
  font-weight: 700;
}
.pm-copy-btn {
  background: none;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 6px;
}
.pm-wire-notice { font-size: 0.8rem; color: #aaa; line-height: 1.55; margin-top: 12px; }
.pm-wire-sent-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  padding: 13px 0;
  min-height: 44px;
  border: 2px solid #b89c6e;
  border-radius: 8px;
  background: transparent;
  color: #b89c6e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.pm-wire-sent-btn:hover { background: #b89c6e; color: #fff; }

.pm-spinner-wrap { text-align: center; padding: 40px 0 30px; }
.pm-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #ede8de;
  border-top-color: #b89c6e;
  border-radius: 50%;
  animation: lfl-pm-spin 0.9s linear infinite;
  margin: 0 auto 18px;
}
@keyframes lfl-pm-spin { to { transform: rotate(360deg); } }
.pm-spinner-text { font-family: 'Cormorant Garamond', serif; color: #888; }

.pm-error-wrap, .pm-success-wrap, .pm-wire-pending-wrap { text-align: center; padding: 28px 0; }
.pm-error-title { color: #c0392b; font-family: 'Cormorant Garamond', serif; }
.pm-error-retry, .pm-success-close {
  padding: 10px 28px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.pm-error-retry {
  border: 2px solid #c0392b;
  background: none;
  color: #c0392b;
}
.pm-success-close {
  border: none;
  background: #b89c6e;
  color: #fff;
  margin-top: 20px;
}

/* Room card / reserve sidebar price row — mobile readability (no amount logic changes) */
@media (max-width: 680px) {
  .room-price-dynamic,
  .room-price-today {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.45rem;
    row-gap: 0.28rem;
  }
  .room-price-dynamic .price-original,
  .room-price-today .price-original {
    flex: 0 0 100%;
  }
  .room-price-dynamic .price-discount,
  .room-price-today .price-discount {
    margin-left: 0;
  }
  .room-price-dynamic .price-usd,
  .room-price-today .price-usd,
  .room-price-dynamic .price-fx-row,
  .room-price-today .price-fx-row {
    flex: 0 0 100%;
  }
}

/* Hide floating contact widgets while booking/payment modals are open */
body.lfl-modal-open .float-contact,
body.lfl-modal-open #floatContact {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (max-width: 580px) {
  /*
   * DEBUG APPLIED — lfl-booking.css mobile
   * #lflBookingModal = sole scroll container (index + room pages).
   * Do not use display:flex on open overlay (breaks iOS scroll).
   */
  html.lfl-modal-open,
  body.lfl-modal-open {
    overflow: hidden;
    height: 100%;
    touch-action: auto;
  }

  #lflBookingModal.lfl-booking-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    height: 100vh;
    max-height: 100dvh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    align-items: unset;
    justify-content: unset;
  }
  #lflBookingModal.lfl-booking-overlay.is-open {
    display: block;
  }
  #lflBookingModal .lfl-booking-modal {
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 12px 12px 0 0;
    margin: 0;
    display: block;
    overflow: visible;
    overflow-y: visible;
  }
  #lflBookingModal .lfl-booking-head,
  #lflBookingModal .lfl-booking-body {
    overflow: visible;
  }
  #lflBookingModal .lfl-booking-body {
    padding-bottom: max(6rem, calc(2rem + env(safe-area-inset-bottom, 0px)));
  }

  .payment-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    height: 100vh;
    max-height: 100dvh;
    max-height: 100vh;
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
  }
  .payment-modal {
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 12px 12px 0 0;
    margin: 0;
    display: block;
    overflow: visible;
  }
  .lfl-booking-close {
    position: sticky;
    top: max(0.35rem, env(safe-area-inset-top, 0px));
    float: right;
    z-index: 3;
    margin: 0.35rem 0.5rem 0 0;
    background: rgba(250, 248, 244, 0.96);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  }
  .pm-close {
    position: sticky;
    top: max(0.35rem, env(safe-area-inset-top, 0px));
    float: right;
    z-index: 3;
    margin: 0.35rem 0.5rem 0 0;
    background: rgba(250, 248, 244, 0.96);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  }
  .lfl-booking-head {
    padding:
      max(0.65rem, env(safe-area-inset-top, 0px))
      1rem 0.75rem 1rem;
  }
  .lfl-booking-body {
    overflow: visible;
    padding: 0.85rem 1rem max(5rem, calc(1.25rem + env(safe-area-inset-bottom, 0px)));
  }
  .lfl-form-group { margin-bottom: 0.7rem; }
  .lfl-form-group label {
    font-size: 0.62rem;
    margin-bottom: 0.28rem;
  }
  .lfl-form-group input,
  .lfl-form-group select,
  .lfl-form-group textarea {
    padding: 0.6rem 0.75rem;
    font-size: 16px;
  }
  .lfl-form-group textarea { min-height: 64px; }
  .lfl-promo-row input,
  .lfl-promo-apply { font-size: 16px; }
  .lfl-booking-head h2 { font-size: 1.25rem; }
  .lfl-booking-head p { font-size: 0.78rem; }
  .pm-header {
    padding:
      max(0.65rem, env(safe-area-inset-top, 0px))
      1rem 0.75rem 1rem;
  }
  .pm-body {
    overflow: visible;
    padding: 14px 1rem max(5rem, calc(1.25rem + env(safe-area-inset-bottom, 0px)));
  }
  .pm-wire-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .pm-wire-label { width: auto; }
  .pm-wire-value {
    max-width: 100%;
    text-align: left;
    width: 100%;
  }
  .pm-method-card { padding: 14px 12px; }
  .pm-copy-btn {
    min-height: 36px;
    padding: 6px 10px;
  }
}
