/* ═══════════════════════════════════════════════════════════════
   BOOKING MODAL — Ulloa Clínica Dental
   Versión 1.0 | booking-modal.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────── */
.bm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(10, 18, 40, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease;
}
.bm-overlay.bm-open {
  opacity: 1; pointer-events: auto;
}

/* ── Panel ───────────────────────────────────────────────────── */
.bm-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 520px;
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(15,28,63,.35);
  transform: translateY(20px) scale(.98);
  transition: transform 280ms cubic-bezier(.34,1.4,.64,1);
  position: relative;
}
.bm-overlay.bm-open .bm-panel {
  transform: translateY(0) scale(1);
}

/* ── Header ──────────────────────────────────────────────────── */
.bm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #EEF2F2;
  position: sticky; top: 0; background: #fff; z-index: 2;
  border-radius: 20px 20px 0 0;
}
.bm-header-left { display: flex; flex-direction: column; gap: .2rem; }
.bm-title { font-size: .95rem; font-weight: 800; color: #0F1C3F; letter-spacing: -.01em; }
.bm-subtitle { font-size: .7rem; color: #7A8F8F; font-weight: 500; }
.bm-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #F0F4F4; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #3D5252; transition: background 160ms;
  flex-shrink: 0;
}
.bm-close:hover { background: #E0EAEA; }
.bm-close svg { width: 14px; height: 14px; }

/* ── Progress ────────────────────────────────────────────────── */
.bm-progress {
  display: flex; align-items: center;
  padding: .85rem 1.5rem;
  gap: 0; border-bottom: 1px solid #EEF2F2;
}
.bm-step-dot {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  flex: 1;
}
.bm-step-circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
  border: 2px solid #D1DEDE;
  color: #A0B4B4; background: #fff;
  transition: all 200ms;
}
.bm-step-label { font-size: .6rem; font-weight: 600; color: #A0B4B4; text-align: center; white-space: nowrap; }
.bm-step-dot.active .bm-step-circle { border-color: #27ACAF; color: #fff; background: #27ACAF; }
.bm-step-dot.active .bm-step-label { color: #27ACAF; }
.bm-step-dot.done .bm-step-circle { border-color: #27ACAF; color: #27ACAF; background: #E8F7F7; }
.bm-step-dot.done .bm-step-label { color: #27ACAF; }
.bm-step-line { flex: 1; height: 2px; background: #EEF2F2; margin-bottom: 1.2rem; transition: background 200ms; }
.bm-step-line.done { background: #27ACAF; }

/* ── Body ────────────────────────────────────────────────────── */
.bm-body { padding: 1.25rem 1.5rem 1.5rem; }
.bm-step { display: none; }
.bm-step.active { display: block; }

/* ── Paso 1 — Servicio ───────────────────────────────────────── */
.bm-section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #27ACAF; margin-bottom: .6rem;
}
.bm-service-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .5rem; margin-bottom: .75rem;
}
.bm-service-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem .8rem;
  background: #F8FAFA; border: 1.5px solid #D1DEDE;
  border-radius: 10px; cursor: pointer;
  font-size: .75rem; font-weight: 600; color: #0F1C3F;
  transition: all 160ms; text-align: left;
}
.bm-service-btn:hover { border-color: #27ACAF; background: #E8F7F7; }
.bm-service-btn.selected { border-color: #27ACAF; background: #E8F7F7; color: #1A7A7D; }
.bm-service-btn svg { width: 15px; height: 15px; color: #27ACAF; flex-shrink: 0; }
.bm-service-btn .bm-svc-dur {
  font-size: .6rem; font-weight: 500; color: #7A8F8F;
  display: block; margin-top: .1rem;
}
.bm-service-other {
  width: 100%; padding: .65rem .9rem;
  background: #F8FAFA; border: 1.5px solid #D1DEDE;
  border-radius: 10px; cursor: pointer;
  font-size: .75rem; font-weight: 600; color: #0F1C3F;
  transition: all 160ms; text-align: left;
  display: flex; align-items: center; gap: .5rem;
}
.bm-service-other:hover { border-color: #27ACAF; background: #E8F7F7; }
.bm-service-other.selected { border-color: #27ACAF; background: #E8F7F7; color: #1A7A7D; }

/* ── Paso 2 — Fecha y horario ────────────────────────────────── */
.bm-dates-row {
  display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem;
  margin-bottom: 1rem; scrollbar-width: none;
}
.bm-dates-row::-webkit-scrollbar { display: none; }
.bm-date-pill {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: .15rem;
  padding: .55rem .75rem; border-radius: 10px;
  border: 1.5px solid #D1DEDE; background: #F8FAFA;
  cursor: pointer; transition: all 160ms; min-width: 52px;
}
.bm-date-pill:hover { border-color: #27ACAF; background: #E8F7F7; }
.bm-date-pill.selected { border-color: #27ACAF; background: #27ACAF; }
.bm-date-day { font-size: .6rem; font-weight: 600; color: #7A8F8F; text-transform: uppercase; }
.bm-date-num { font-size: .95rem; font-weight: 800; color: #0F1C3F; }
.bm-date-pill.selected .bm-date-day,
.bm-date-pill.selected .bm-date-num { color: #fff; }
.bm-date-pill.disabled { opacity: .35; pointer-events: none; }

.bm-slots-label { font-size: .65rem; font-weight: 700; color: #7A8F8F; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.bm-slots-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .4rem; margin-bottom: .75rem;
}
.bm-slot {
  padding: .55rem .3rem; border-radius: 8px;
  border: 1.5px solid #D1DEDE; background: #F8FAFA;
  font-size: .75rem; font-weight: 700; color: #0F1C3F;
  cursor: pointer; text-align: center; transition: all 160ms;
}
.bm-slot:hover { border-color: #27ACAF; background: #E8F7F7; }
.bm-slot.selected { border-color: #27ACAF; background: #27ACAF; color: #fff; }
.bm-slot.busy { background: #F0F0F0; color: #C0C8C8; border-color: #E0E8E8; pointer-events: none; text-decoration: line-through; }
.bm-slots-loading { text-align: center; padding: 1.5rem 0; color: #7A8F8F; font-size: .8rem; }
.bm-slots-empty { text-align: center; padding: 1.25rem 0; color: #7A8F8F; font-size: .8rem; }

/* ── Paso 3 — Datos ──────────────────────────────────────────── */
.bm-resumen {
  background: #E8F7F7; border: 1.5px solid #9CD2CE;
  border-radius: 10px; padding: .75rem 1rem;
  margin-bottom: 1rem;
  display: flex; gap: .75rem; align-items: flex-start;
}
.bm-resumen svg { width: 16px; height: 16px; color: #27ACAF; flex-shrink: 0; margin-top: .1rem; }
.bm-resumen-text { font-size: .75rem; color: #1A5A5C; line-height: 1.5; }
.bm-resumen-text strong { color: #0F3D3E; }

.bm-form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .7rem; }
.bm-label { font-size: .68rem; font-weight: 700; color: #3D5252; letter-spacing: .04em; text-transform: uppercase; }
.bm-label span { color: #27ACAF; }
.bm-input, .bm-textarea {
  padding: .65rem .9rem;
  border: 1.5px solid #D1DEDE; border-radius: 10px;
  font-family: 'Montserrat', sans-serif; font-size: .82rem;
  color: #0F1C3F; background: #fff; outline: none;
  transition: border-color 160ms;
}
.bm-input:focus, .bm-textarea:focus { border-color: #27ACAF; }
.bm-input.error, .bm-textarea.error { border-color: #FF6B6B; }
.bm-input::placeholder, .bm-textarea::placeholder { color: #B0C4C4; }
.bm-textarea { resize: vertical; min-height: 60px; }
.bm-field-error { font-size: .67rem; color: #D44; min-height: .9rem; }

.bm-check-row { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .85rem; }
.bm-check-row input[type="checkbox"] { width: 15px; height: 15px; margin-top: .15rem; accent-color: #27ACAF; cursor: pointer; flex-shrink: 0; }
.bm-check-row label { font-size: .7rem; color: #5a7070; line-height: 1.5; cursor: pointer; }
.bm-check-row label a { color: #27ACAF; text-decoration: underline; }

/* ── Botones navegación ──────────────────────────────────────── */
.bm-actions { display: flex; gap: .6rem; margin-top: .25rem; }
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.25rem; border-radius: 99px;
  font-family: 'Montserrat', sans-serif; font-size: .82rem; font-weight: 700;
  cursor: pointer; transition: all 180ms; border: none;
}
.bm-btn-primary {
  background: linear-gradient(135deg, #27ACAF 0%, #155384 100%);
  color: #fff; flex: 1;
  box-shadow: 0 6px 20px rgba(39,172,175,.3);
}
.bm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(39,172,175,.4); }
.bm-btn-primary:disabled { opacity: .55; pointer-events: none; }
.bm-btn-back {
  background: #F0F4F4; color: #3D5252;
  padding: .75rem 1rem;
}
.bm-btn-back:hover { background: #E0EAEA; }
.bm-btn-wa {
  background: #25D366; color: #fff;
  flex: 1;
}
.bm-btn-wa:hover { background: #1ebe5c; transform: translateY(-1px); }
.bm-btn svg { width: 15px; height: 15px; }

/* ── Divider ─────────────────────────────────────────────────── */
.bm-divider {
  display: flex; align-items: center; gap: .6rem;
  font-size: .65rem; color: #B0C4C4; font-weight: 600;
  margin: .75rem 0;
}
.bm-divider::before, .bm-divider::after {
  content: ''; flex: 1; height: 1px; background: #EEF2F2;
}

/* ── Info footer ─────────────────────────────────────────────── */
.bm-info-footer {
  text-align: center; font-size: .67rem; color: #A0B4B4;
  margin-top: 1rem; line-height: 1.6;
}
.bm-info-footer svg { width: 11px; height: 11px; vertical-align: middle; margin-right: .2rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 540px) {
  .bm-panel { border-radius: 16px 16px 0 0; max-height: 96vh; }
  .bm-overlay { align-items: flex-end; padding: 0; }
  .bm-service-grid { grid-template-columns: 1fr; }
  .bm-slots-grid { grid-template-columns: repeat(3, 1fr); }
  .bm-body { padding: 1rem 1.1rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════
   ADDITIONS v2 — Tipo de cita cards
   ═══════════════════════════════════════════════════════════ */
.bm-tipo-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .65rem; margin-bottom: .5rem;
}
.bm-tipo-grid--single { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto .5rem; }

.bm-tipo-card {
  display: flex; flex-direction: column; gap: .5rem;
  padding: .9rem 1rem;
  background: #F8FAFA; border: 1.5px solid #D1DEDE;
  border-radius: 12px; cursor: pointer;
  text-align: left; transition: all 180ms;
}
.bm-tipo-card:hover { border-color: #27ACAF; background: #E8F7F7; }
.bm-tipo-card--selected { border-color: #27ACAF; background: #E8F7F7; box-shadow: 0 0 0 3px rgba(39,172,175,.15); }

.bm-tipo-header { display: flex; justify-content: space-between; align-items: flex-start; }
.bm-tipo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bm-tipo-icon--teal { background: rgba(39,172,175,.15); }
.bm-tipo-icon--teal svg { width: 16px; height: 16px; color: #27ACAF; }
.bm-tipo-icon--navy { background: rgba(23,44,98,.1); }
.bm-tipo-icon--navy svg { width: 16px; height: 16px; color: #172C62; }

.bm-tipo-precio { text-align: right; line-height: 1.1; }
.bm-precio-num { font-size: 1rem; font-weight: 800; color: #0F1C3F; display: block; }
.bm-precio-note { font-size: .6rem; color: #7A8F8F; text-transform: uppercase; letter-spacing: .06em; }

.bm-tipo-card h4 { font-size: .82rem; font-weight: 800; color: #0F1C3F; margin: 0; }
.bm-tipo-card p { font-size: .72rem; color: #5a7070; line-height: 1.5; margin: 0; }

.bm-tipo-doctor {
  display: flex; align-items: center; gap: .35rem;
  font-size: .68rem; font-weight: 700; color: #27ACAF;
}
.bm-tipo-doctor svg { width: 11px; height: 11px; flex-shrink: 0; }

.bm-tipo-disclaimer {
  font-size: .62rem; color: #A0B4B4; line-height: 1.4;
  border-top: 1px solid #E0EAEA; padding-top: .4rem; margin-top: .1rem;
}

@media (max-width: 420px) {
  .bm-tipo-grid { grid-template-columns: 1fr; }
}

/* -- Doctor photo en cards -- */
.bm-doctor-photo {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 2px solid var(--teal-light, #9CD2CE);
  margin-bottom: .35rem;
}
.bm-precio-nota {
  font-size: .65rem; color: #7A8F8F;
  text-align: center; margin-top: .6rem;
  line-height: 1.5;
}

/* -- Doctor picker dinmico -- */
.bm-doctor-picker {
  margin-top: .75rem;
}
.bm-doctor-picker .bm-tipo-grid {
  margin-bottom: 0;
}
