/* ===== Booking Page Styles ===== */

/* --- Step Indicator Bar --- */
.booking-steps-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.bstep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--gray-light);
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.bstep.active {
  background: var(--teal);
  color: var(--white);
}

.bstep.done {
  background: rgba(0, 200, 150, 0.15);
  color: var(--teal-dark);
}

.bstep-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.1);
}

.bstep.active .bstep-num {
  background: rgba(255, 255, 255, 0.25);
}

.bstep.done .bstep-num {
  background: var(--teal);
  color: var(--white);
}

.bstep-label {
  font-weight: 500;
}

@media (max-width: 768px) {
  .booking-steps-bar { gap: 4px; }
  .bstep { padding: 6px 10px; font-size: 13px; }
  .bstep-label { display: none; }
  .bstep.active .bstep-label { display: inline; }
}

/* --- Loading / Spinner --- */
.booking-loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 15px;
}

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--gray-mid);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-bottom: 8px;
}

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

/* --- Step Panels --- */
.step-panel {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 24px;
}

/* --- Service Cards Grid --- */
.service-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.service-select-card {
  background: var(--white);
  border: 2px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-select-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(0, 200, 150, 0.12);
}

.service-select-card.selected {
  border-color: var(--teal);
  background: rgba(0, 200, 150, 0.04);
}

.service-select-card h3 {
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 8px;
}

.service-select-card .service-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--teal-dark);
  font-weight: 500;
  margin-bottom: 8px;
}

.service-select-card .service-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Calendar --- */
.booking-calendar {
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-header h3 {
  font-size: 17px;
  color: var(--navy);
  font-weight: 600;
}

.cal-nav {
  background: none;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.cal-nav:hover { background: var(--gray-light); }
.cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-day-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  cursor: default;
  color: var(--text-muted);
  transition: all var(--transition);
}

.cal-day.empty { visibility: hidden; }

.cal-day.available {
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.cal-day.available:hover {
  background: rgba(0, 200, 150, 0.12);
  color: var(--teal-dark);
}

.cal-day.selected {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
}

.cal-day.today {
  border: 2px solid var(--teal);
}

.cal-day.today.selected {
  border-color: var(--teal);
}

/* --- Time Slots --- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-width: 600px;
}

.slot-btn {
  padding: 12px 8px;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: rgba(0, 200, 150, 0.05);
}

.slot-btn.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- Booking Form (Step 4) --- */
.booking-form {
  max-width: 480px;
}

.booking-form .form-group {
  margin-bottom: 20px;
}

.booking-form label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.booking-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color var(--transition);
}

.booking-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.15);
}

.booking-form input.error {
  border-color: #e74c3c;
}

.form-error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 4px;
}

.booking-summary {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.booking-summary h3 {
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 12px;
}

.booking-summary dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  font-size: 14px;
}

.booking-summary dt {
  color: var(--text-muted);
  font-weight: 500;
}

.booking-summary dd {
  color: var(--text);
}

/* --- Action Buttons --- */
.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-book-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-book-primary:hover { background: var(--teal-dark); }
.btn-book-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-book-secondary {
  background: var(--gray-light);
  color: var(--text);
  border: 1px solid var(--gray-mid);
}
.btn-book-secondary:hover { background: var(--gray-mid); }

/* --- Success Screen --- */
.booking-success {
  text-align: center;
  padding: 32px 0;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 200, 150, 0.12);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.booking-success h2 {
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 8px;
}

.booking-success p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 24px;
}

.success-details {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 24px;
  display: inline-block;
  text-align: left;
  min-width: 300px;
  margin-bottom: 32px;
}

.success-details dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  font-size: 15px;
}

.success-details dt { color: var(--text-muted); font-weight: 500; }
.success-details dd { color: var(--text); font-weight: 500; }

/* --- Error / Empty --- */
.booking-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.booking-error-msg {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .service-select-grid {
    grid-template-columns: 1fr;
  }
  .slot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .booking-calendar {
    padding: 16px;
  }
  .success-details {
    min-width: auto;
    width: 100%;
  }
}
