@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');
@import './variables.css';

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Header ── */
.booking-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
}
.header-logo .logo-text {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--purple);
}
.header-logo .logo-dot {
  color: #8a9a5b;
  font-family: var(--font-body);
  font-weight: 400;
}
.header-logo .logo-sub {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--purple);
  opacity: 0.7;
  display: block;
  line-height: 1;
}

/* ── Progress bar ── */
.progress-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.progress-steps {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  position: relative;
  gap: 6px;
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-step:last-child::after { display: none; }

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.progress-step.active .step-dot {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.progress-step.done .step-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.progress-step.done::after { background: var(--green); }
.progress-step.active::after { background: var(--purple-light); }

.step-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
  line-height: 1.2;
}
.progress-step.active .step-label { color: var(--purple); font-weight: 600; }
.progress-step.done .step-label { color: var(--green-dark); }

/* ── Layout principal ── */
.booking-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Cards de paso ── */
.step-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  display: none;
}
.step-card.active { display: block; }

.step-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.step-subtitle {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Términos y condiciones ── */
.terms-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.terms-box h4 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.terms-box h4:first-child { margin-top: 0; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--purple);
  margin-top: 2px;
  cursor: pointer;
}
.checkbox-row label {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-row label a { color: var(--purple); }

/* ── Formulario de datos ── */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Leyenda de ayuda debajo de un campo ── */
.field-hint {
  font-size: 12px;
  color: var(--text-light);
  margin: 5px 0 0;
  line-height: 1.4;
}

/* ── Campo de teléfono con código de país ── */
.tel-field { display: flex; gap: 8px; }
.tel-field select { flex: 0 0 92px; padding-left: 10px; padding-right: 6px; }
.tel-field input { flex: 1 1 auto; min-width: 0; }

/* ── Selección de profesional ── */
.professional-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.prof-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.prof-option:hover { border-color: var(--purple-light); background: var(--purple-light); }
.prof-option.selected { border-color: var(--purple); background: var(--purple-light); }
.prof-option .prof-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple-light);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.prof-option.selected .prof-avatar { background: var(--purple); }
.prof-option .prof-name {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.prof-option .prof-role {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.3;
}

/* ── Calendario ── */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.calendar-header .month-label {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: capitalize;
}
.cal-nav {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-mid);
  transition: all 0.2s;
}
.cal-nav:hover { border-color: var(--purple); color: var(--purple); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 24px;
}
.cal-day-name {
  text-align: center;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  padding: 8px 0;
  letter-spacing: 0.05em;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-dark);
}
.cal-day:hover:not(.disabled):not(.empty) { background: var(--purple-light); color: var(--purple); }
.cal-day.today { font-weight: 700; color: var(--purple); }
.cal-day.has-slots { background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.cal-day.has-slots:hover { background: var(--green); color: var(--white); }
.cal-day.selected { background: var(--purple) !important; color: var(--white) !important; }
.cal-day.disabled { color: var(--border); cursor: default; }
.cal-day.empty { cursor: default; }

/* ── Slots de horario ── */
.slots-section { margin-top: 8px; }
.slots-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slot {
  padding: 10px 4px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-head);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-dark);
}
.slot:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }
.slot.selected { background: var(--purple); border-color: var(--purple); color: var(--white); }
.slot.unavailable { background: var(--bg); color: var(--border); cursor: default; border-color: var(--border); }
.slot-day-shift { font-size: 10px; opacity: 0.7; margin-left: 2px; }
.slots-empty {
  font-size: 13px;
  color: var(--text-light);
  padding: 20px 0;
  text-align: center;
}
.tz-notice {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* ── Resumen ── */
.summary-card {
  background: var(--purple-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(158,114,188,0.15);
  gap: 16px;
}
.summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.summary-row:first-child { padding-top: 0; }
.summary-key {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.summary-val {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
  text-align: right;
}
.summary-price {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--purple-dark);
}
.summary-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
}

.payment-notice {
  background: var(--green-light);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--green-dark);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
}
.btn-primary {
  background: var(--purple);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(158,114,188,0.35);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn-pay {
  background: #009ee3;
  color: var(--white);
  font-size: 15px;
  padding: 16px;
}
.btn-pay:hover {
  background: #0082c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,158,227,0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  width: auto;
  padding: 10px 20px;
}
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

.btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-row .btn-ghost { flex-shrink: 0; }
.btn-row .btn-primary { flex: 1; }

/* ── Confirmación ── */
.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}
.confirm-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}
.confirm-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.6;
}
.confirm-detail {
  background: var(--purple-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

/* ── Aviso de confirmación por pago ── */
.slot-info-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--green-dark);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Detalle de reserva (confirmada + gestionar) ── */
.booking-detail {
  background: var(--purple-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  text-align: left;
}
.booking-detail-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(158,114,188,0.15);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row:first-of-type { padding-top: 0; }
.detail-key {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.detail-val {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
  text-align: right;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .booking-main { padding: 20px 16px 60px; }
  .step-card { padding: 24px 20px; }
  .professional-options { grid-template-columns: 1fr; gap: 8px; }
  .prof-option { display: flex; align-items: center; text-align: left; gap: 14px; padding: 14px 16px; }
  .prof-option .prof-avatar { margin: 0; flex-shrink: 0; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .step-label { display: none; }
}
