/* =============================================================================
   Pest Doctor — Booking Engine styles
   Reuses brand tokens (--theme, --header, --text...). No site redesign.
   Responsive: desktop / tablet / mobile.
   ============================================================================= */

.pdb-widget {
  --pdb-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdb-field { display: flex; flex-direction: column; gap: 6px; }
.pdb-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--header, #141414);
}
.pdb-field label span { color: #c0392b; }

.pdb-input {
  width: 100%;
  height: 50px;
  border: 1px solid #e2e6ea;
  border-radius: var(--pdb-radius);
  padding: 0 14px;
  font-size: 15px;
  color: var(--header, #141414);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea.pdb-input { height: auto; padding: 12px 14px; }
.pdb-input:focus {
  border-color: var(--theme, #46880c);
  box-shadow: 0 0 0 3px rgba(70, 136, 12, 0.12);
}

/* ---------- price card ---------- */
.pdb-price-card {
  background: var(--bg, #f8f7f3);
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 18px;
}
.pdb-sum { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pdb-sum-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--text, #54595f);
}
.pdb-sum-row strong { color: var(--header, #141414); text-align: right; }

.pdb-price-main {
  border-top: 1px dashed #d9d9d9;
  padding-top: 12px;
}
.pdb-price-row { display: flex; justify-content: space-between; align-items: baseline; }
.pdb-price-label { font-size: 13px; color: var(--text, #54595f); }
.pdb-price-strike { text-decoration: line-through; color: #9aa0a6; font-size: 15px; }
.pdb-offer .pdb-price-value {
  font-size: 26px; font-weight: 800; color: var(--theme, #46880c);
}
.pdb-inspection { display: flex; flex-direction: column; gap: 6px; }
.pdb-insp-badge {
  align-self: flex-start;
  background: #fff3e0; color: #e67e00;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.pdb-inspection .pdb-price-value { font-size: 20px; font-weight: 800; color: var(--header, #141414); }
.pdb-advance-note { margin: 12px 0 0; font-size: 12px; color: var(--text, #54595f); }

.pdb-book-btn { width: 100%; justify-content: center; }
.pdb-load-error, .pdb-load-error a { color: var(--text, #54595f); font-size: 14px; }

/* ---------- modal ---------- */
.pdb-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.pdb-modal.is-open { display: flex; }
.pdb-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 20, 12, 0.55);
  backdrop-filter: blur(2px);
}
.pdb-modal-dialog {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 22px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  animation: pdbIn 0.25s ease;
}
@keyframes pdbIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.pdb-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: #f1f1f1; color: #333; font-size: 24px; line-height: 1; cursor: pointer;
}
.pdb-modal-close:hover { background: #e4e4e4; }

.pdb-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.pdb-step {
  flex: 1; text-align: center; font-size: 12px; font-weight: 700;
  color: #9aa0a6; padding-bottom: 8px; border-bottom: 3px solid #eceff1;
}
.pdb-step.is-active { color: var(--theme, #46880c); border-bottom-color: var(--theme, #46880c); }

.pdb-modal-title { font-size: 20px; font-weight: 800; color: var(--header, #141414); margin: 0 0 12px; }
.pdb-modal-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg, #f8f7f3); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
}
.pdb-modal-summary strong { color: var(--theme, #46880c); font-size: 18px; }

.pdb-modal-body .pdb-field { margin-bottom: 14px; }

/* map */
.pdb-map-wrap { position: relative; margin-bottom: 8px; }
.pdb-map { width: 100%; height: 240px; border-radius: 14px; overflow: hidden; background: #e9eef0; }
.pdb-map-fallback { display: flex; align-items: center; justify-content: center; height: 100%; padding: 18px; text-align: center; color: var(--text, #54595f); font-size: 14px; }
.pdb-locate-btn {
  position: absolute; left: 12px; bottom: 12px;
  background: #fff; border: 1px solid #e2e6ea; border-radius: 10px;
  padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.pdb-geo-note { font-size: 12px; color: var(--text, #54595f); margin-bottom: 14px; }

.pdb-error { color: #c0392b; font-size: 13px; min-height: 18px; margin: 4px 0; }

.pdb-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }
.pdb-actions .theme-btn { flex: 1; justify-content: center; }
.pdb-back {
  background: none; border: none; color: var(--text, #54595f);
  font-weight: 600; cursor: pointer; padding: 12px 16px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.pdb-back:hover { color: var(--theme, #46880c); }

.pdb-review { background: var(--bg, #f8f7f3); border-radius: 14px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.pdb-pay { width: 100%; justify-content: center; font-size: 15px; }

/* processing + success */
.pdb-processing { text-align: center; padding: 30px 10px; }
.pdb-processing p { color: var(--text, #54595f); margin-top: 16px; }
.pdb-spinner {
  width: 46px; height: 46px; margin: 0 auto;
  border: 4px solid #e8efe2; border-top-color: var(--theme, #46880c);
  border-radius: 50%; animation: pdbSpin 0.9s linear infinite;
}
@keyframes pdbSpin { to { transform: rotate(360deg); } }

.pdb-success { text-align: center; padding: 10px 4px; }
.pdb-success-icon { font-size: 64px; color: var(--theme, #46880c); line-height: 1; }
.pdb-success-sub { color: var(--text, #54595f); margin: 6px 0 16px; }
.pdb-booking-id {
  display: inline-flex; flex-direction: column; gap: 4px;
  background: var(--bg, #f8f7f3); border-radius: 12px; padding: 12px 24px; margin-bottom: 18px;
  font-size: 12px; color: var(--text, #54595f); letter-spacing: 1px;
}
.pdb-booking-id strong { font-size: 20px; color: var(--header, #141414); letter-spacing: 1px; }
.pdb-success-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.pdb-success-actions .theme-btn { justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 575px) {
  .pdb-modal-dialog { padding: 20px 16px; border-radius: 18px; max-height: 94vh; }
  .pdb-modal-title { font-size: 18px; }
  .pdb-map { height: 200px; }
  .pdb-actions { flex-direction: column-reverse; }
  .pdb-actions .theme-btn, .pdb-back { width: 100%; text-align: center; }
  .pdb-offer .pdb-price-value { font-size: 22px; }
}
