/* ============================
   Checkout Page Layout
   ============================ */
.checkout-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.checkout-header {
  margin-bottom: 32px;
}

.checkout-back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
}

.checkout-back-link:hover {
  color: #333;
}

.checkout-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ============================
   Form Cards
   ============================ */
.checkout-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.checkout-card h2 {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

/* ============================
   Guest Form
   ============================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
}

.form-group label .required {
  color: #c0392b;
}

.form-group input {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #f7b52c;
  box-shadow: 0 0 0 2px rgba(247, 181, 44, 0.15);
}

/* ============================
   GuestyPay Container
   ============================ */
#guesty-tokenization-container {
  min-height: 200px;
}

#guesty-tokenization-container iframe {
  width: 100% !important;
}

/* ============================
   Submit Button
   ============================ */
.checkout-actions {
  margin-top: 4px;
}

.btn-complete-booking {
  display: block;
  width: 100%;
  padding: 16px;
  background: #f7b52c;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-complete-booking:hover:not(:disabled) {
  background: #e5a51f;
}

.btn-complete-booking:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-disclaimer {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: 12px;
}

/* ============================
   Quote Summary Sidebar
   ============================ */
.checkout-summary-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
  position: sticky;
  top: 100px;
}

.checkout-summary-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0 0 20px 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px;
  background: #f9f9f9;
  border-radius: 6px;
}

.summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-cell .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 500;
}

.summary-cell .value {
  font-size: 14px;
  color: #222;
  font-weight: 700;
}

/* Pricing Rows */
.summary-pricing .pricing-primary {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.summary-pricing .pricing-primary .label {
  color: #333;
  font-weight: 600;
}

.summary-pricing .pricing-primary .value {
  color: #333;
  font-weight: 500;
}

/* Section headers (Fees, Taxes) */
.summary-pricing .pricing-section-header {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 4px;
  font-size: 15px;
  margin-top: 4px;
}

.summary-pricing .pricing-section-header .label {
  color: #333;
  font-weight: 600;
}

.summary-pricing .pricing-section-header .value {
  color: #333;
  font-weight: 500;
}

/* Section line items */
.summary-pricing .pricing-section-items {
  padding-left: 12px;
  border-left: 2px solid #eee;
  margin-left: 4px;
  margin-bottom: 4px;
}

.summary-pricing .pricing-section-items .pricing-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13px;
}

.summary-pricing .pricing-section-items .pricing-row .label {
  color: #888;
  font-weight: 400;
}

.summary-pricing .pricing-section-items .pricing-row .value {
  color: #888;
  font-weight: 400;
  font-size: 13px;
}

.summary-pricing .total-row {
  border-top: 2px solid #333;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
}

.summary-pricing .total-row .label {
  font-weight: 700;
  color: #222;
}

.summary-pricing .total-row .value {
  font-weight: 700;
  color: #222;
}

/* ============================
   Processing / Success / Error
   ============================ */
.checkout-processing {
  text-align: center;
  padding: 40px 20px;
}

.checkout-processing .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: #f7b52c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-processing p {
  font-size: 16px;
  color: #666;
}

.checkout-success {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  background: #27ae60;
  color: #fff;
  font-size: 28px;
  margin: 0 auto 16px;
}

.checkout-success h2 {
  font-size: 24px;
  color: #222;
  margin-bottom: 8px;
}

.confirmation-code {
  font-size: 18px;
  font-weight: 700;
  color: #f7b52c;
  margin-bottom: 12px;
}

.btn-back-home {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 32px;
  background: #f7b52c;
  color: #000;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.btn-back-home:hover {
  background: #e5a51f;
  color: #000;
  text-decoration: none;
}

.checkout-error {
  text-align: center;
  padding: 24px 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 16px;
}

.checkout-error .error-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.checkout-error .error-message {
  color: #991b1b;
  margin-bottom: 12px;
}

.checkout-error .btn-try-again {
  padding: 10px 24px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.checkout-error .btn-try-again:hover {
  background: #f5f5f5;
}

/* Error banner for missing dates etc */
.checkout-error-banner {
  text-align: center;
  padding: 60px 20px;
}

.checkout-error-banner p {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

.checkout-error-banner .btn-back {
  display: inline-block;
  padding: 12px 24px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
}

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  /* Show summary first on mobile */
  .checkout-summary-section {
    order: -1;
  }

  .checkout-summary-card {
    position: static;
  }

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

  .checkout-header h1 {
    font-size: 22px;
  }
}
