/* AutoReach Booking Flow Styles
   Owns: booking step pages.
   Does NOT own: landing page, HVAC demo page.
*/

/* Progress bar */
.progress-bar {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.progress-inner {
  max-width: 680px;
  margin: 0 auto;
}
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 10px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.progress-step:last-child { flex: 0; }
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--border);
  color: var(--muted);
  flex-shrink: 0;
}
.step-dot.done {
  background: var(--green);
  color: #fff;
}
.step-dot.active {
  background: var(--amber);
  color: #1A1A1A;
}
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.step-label.active { color: var(--fg); }
.step-label.done { color: var(--green); }
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}
.progress-line.done { background: var(--green); }

/* Booking layout */
.booking-page {
  min-height: 100vh;
  background: var(--bg);
}
.booking-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 40px;
}
.booking-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  font-weight: 500;
  transition: color 0.15s;
}
.booking-back:hover { color: var(--fg); }
.booking-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.booking-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.5;
}

/* Service cards */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.svc-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}
.svc-option:hover {
  border-color: var(--green-light);
  background: rgba(27, 67, 50, 0.03);
}
.svc-option.selected {
  border-color: var(--green);
  background: rgba(27, 67, 50, 0.05);
}
.svc-option-icon {
  width: 44px;
  height: 44px;
  background: rgba(27, 67, 50, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.svc-option-text { flex: 1; }
.svc-option-name { font-size: 16px; font-weight: 700; color: var(--fg); margin-bottom: 2px; }
.svc-option-desc { font-size: 13px; color: var(--muted); }
.svc-option-price { font-size: 15px; font-weight: 700; color: var(--green); }
.svc-option-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  font-size: 14px;
  transition: all 0.15s;
}
.svc-option.selected .svc-option-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Form fields */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--fg);
  background: var(--surface);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--green);
}
.form-input::placeholder { color: var(--muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error {
  font-size: 12px;
  color: #DC2626;
  margin-top: 4px;
  display: none;
}

/* Date grid */
.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.date-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
  padding: 6px;
  text-decoration: none;
  color: inherit;
}
.date-cell:hover { border-color: var(--green-light); }
.date-cell.selected { background: var(--green); border-color: var(--green); color: #fff; }
.date-cell.disabled { opacity: 0.3; pointer-events: none; }
.date-day { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.date-cell.selected .date-day { color: rgba(255,255,255,0.7); }
.date-num { font-size: 15px; font-weight: 600; }

/* Time slots */
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.time-slot {
  padding: 12px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}
.time-slot:hover { border-color: var(--green-light); color: var(--green); }
.time-slot.selected { background: var(--green); border-color: var(--green); color: #fff; }

/* Continue button */
.btn-continue {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
  margin-top: 24px;
}
.btn-continue:hover { background: var(--green-light); }
.btn-continue:disabled { opacity: 0.5; cursor: not-allowed; }

/* Confirm page */
.confirm-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.confirm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 540px;
  width: 100%;
  text-align: center;
}
.confirm-icon { font-size: 64px; margin-bottom: 20px; }
.confirm-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}
.confirm-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}
.confirm-details {
  background: var(--bg);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  margin-bottom: 32px;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.confirm-row:last-child { border-bottom: none; }
.confirm-key { font-size: 13px; color: var(--muted); font-weight: 500; flex-shrink: 0; }
.confirm-val { font-size: 14px; font-weight: 600; color: var(--fg); text-align: right; }
.confirm-actions { display: flex; flex-direction: column; gap: 10px; }
.confirm-actions a {
  display: block;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.confirm-cta { background: var(--amber); color: #1A1A1A; }
.confirm-secondary { background: var(--bg); color: var(--fg); border: 1px solid var(--border); }
.confirm-back-home { margin-top: 20px; font-size: 13px; color: var(--muted); }
.confirm-back-home a { color: var(--green); font-weight: 600; text-decoration: none; }

/* API success/loading states */
.success-msg {
  background: rgba(27, 67, 50, 0.1);
  border: 1px solid rgba(27, 67, 50, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
  margin-top: 16px;
  display: none;
}
.error-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #DC2626;
  margin-bottom: 20px;
  display: none;
}

/* Responsive */
@media (max-width: 640px) {
  .booking-container { padding: 32px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .date-grid { grid-template-columns: repeat(4, 1fr); }
  .time-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-steps { gap: 4px; }
  .step-label { display: none; }
}