/* ── On-Site Secure OwnerRez Direct-Booking Drawer & Payment Screen (#reserve) ── */

.reserve-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.reserve-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.reserve-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(640px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  color: #0f172a;
}

.reserve-drawer.is-active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Header */
.reserve-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.reserve-property-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reserve-direct-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  width: fit-content;
}

.reserve-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.reserve-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.reserve-btn-close {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.reserve-btn-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Trip Summary Bar */
.reserve-trip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.reserve-trip-dates {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reserve-trip-nights {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.reserve-trip-total {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
}

/* Drawer Scrollable Body */
.reserve-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Price Breakdown Card */
.reserve-pricing-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
}

.reserve-pricing-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reserve-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  padding: 6px 0;
}

.reserve-fee-row.total-row {
  border-top: 1px solid #cbd5e1;
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
}

.reserve-saving-pill {
  color: #16a34a;
  font-weight: 700;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

/* Booking Form Fields */
.reserve-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reserve-section-label {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.reserve-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reserve-form-row.row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.reserve-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reserve-field label {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reserve-field input,
.reserve-field select,
.reserve-field textarea {
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.reserve-field input:focus,
.reserve-field select:focus,
.reserve-field textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Payment Details Box */
.reserve-payment-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 18px 20px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reserve-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.reserve-cards-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-brand-badge {
  font-size: 11px;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* Submit Action Button */
.reserve-btn-submit {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: all 0.15s ease;
}

.reserve-btn-submit:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.reserve-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success Paid Confirmation State */
.reserve-success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 12px 36px;
  gap: 18px;
}

.reserve-success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.2);
}

.reserve-receipt-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reserve-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #334155;
  padding: 4px 0;
}

.reserve-receipt-row strong {
  color: #0f172a;
}

.reserve-receipt-row.total {
  border-top: 1.5px solid #cbd5e1;
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

/* Security Trust Footer */
.reserve-trust-footer {
  padding: 12px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.reserve-trust-badges {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reserve-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Mobile responsive drawer */
@media (max-width: 680px) {
  .reserve-drawer {
    width: 100vw;
    height: 96dvh;
    top: auto;
    bottom: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .reserve-drawer.is-active {
    transform: translateY(0);
  }
  .reserve-header {
    padding: 16px 18px 12px;
  }
  .reserve-title {
    font-size: 16px;
  }
  .reserve-form-row {
    grid-template-columns: 1fr;
  }
  .reserve-form-row.row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .reserve-body-scroll {
    padding: 16px;
  }
}

/* Touch targets.
   On iOS Safari a <select> ignores padding unless appearance is reset, so the
   guest and pet pickers rendered at 23px while the text inputs beside them were
   40px — roughly half Apple's 44px guidance, in the middle of the booking flow.
   Resetting appearance lets the box sizing apply, and the arrow is redrawn as a
   background image since the native one goes with it. */
.reserve-field select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.reserve-field input,
.reserve-field textarea {
  min-height: 44px;
}

.reserve-btn-close {
  min-width: 44px;
  min-height: 44px;
}
