/* ═══════════════════════════════════════════════════════════════
   assets/css/reserva.css
   Estilos del flujo público de reserva (/reserva/).
   Depende de: base.css, components.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout general ─────────────────────────────────────────── */
.reserva-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-lg) var(--space-md) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Patrón de cuadros decorativo (igual al hero de la landing) */
.reserva-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
/* Brillo central sutil */
.reserva-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(61,170,110,.18) 0%, transparent 70%);
  pointer-events: none;
}
/* Fila logo + nombre */
.reserva-header-top {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px var(--space-sm);
}
.reserva-logo {
  flex-shrink: 0;
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  background: rgba(255,255,255,.08);
}
.reserva-header-info {
  text-align: left;
}
.reserva-negocio-nombre {
  font-size: var(--font-size-lg);
  font-weight: 800;
  margin-bottom: 2px;
  line-height: 1.2;
}
.reserva-negocio-meta {
  font-size: var(--font-size-sm);
  opacity: .75;
}
/* Descripción del negocio */
.reserva-negocio-desc {
  position: relative; z-index: 1;
  font-size: 0.78rem;
  opacity: .8;
  line-height: 1.5;
  padding: var(--space-sm) 4px;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2px;
  text-align: left;
}

/* ── Pasos (stepper) ─────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  background: transparent;
  position: relative; z-index: 1;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .3s;
}
.step-dot.active  { background: var(--color-accent); color: var(--color-primary); }
.step-dot.done    { background: rgba(255,255,255,.5); }
.step-line {
  flex: 1; height: 2px;
  background: rgba(255,255,255,.2);
  max-width: 40px;
}

/* ── Contenido de cada paso ──────────────────────────────────── */
.paso {
  display: none;
  padding: var(--space-md);
  animation: fadeIn .2s ease;
}
.paso.active { display: block; }

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

.paso-titulo {
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* ── Cards de selección (profesional / servicio) ────────────── */
.seleccion-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sel-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.sel-card:active,
.sel-card.selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(61,170,110,.15);
}

.sel-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.sel-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sel-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.sel-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }

.sel-body { flex: 1; min-width: 0; }
.sel-nombre { font-weight: 700; }
.sel-meta   { font-size: var(--font-size-sm); color: var(--color-text-soft); margin-top: 2px; }

.sel-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  transition: background .15s, border-color .15s;
}
.sel-card.selected .sel-check {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── Selector de fecha ───────────────────────────────────────── */
.fecha-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: var(--space-md);
}
.fecha-btn {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.fecha-btn:active,
.fecha-btn.selected {
  border-color: var(--color-accent);
  background: rgba(61,170,110,.07);
}
.fecha-btn.disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}
.fecha-dia-semana {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text-soft);
  font-weight: 600;
  letter-spacing: .3px;
}
.fecha-dia-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.1;
}
.fecha-mes {
  font-size: 11px;
  color: var(--color-text-soft);
}

/* ── Botón "Ver más fechas" ──────────────────────────────────── */
.ver-mas-fechas {
  grid-column: 1 / -1;
  background: none;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ver-mas-fechas:active,
.ver-mas-fechas:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ── Filtros de franja horaria ───────────────────────────────── */
#slots-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.franja-chip {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-soft);
  transition: border-color .15s, color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.franja-chip.active,
.franja-chip:active {
  border-color: var(--color-accent);
  background: rgba(61,170,110,.10);
  color: var(--color-accent);
}

/* ── Slots de hora ───────────────────────────────────────────── */
.slots-titulo {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: var(--space-sm);
}
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slot-btn {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.slot-btn:active,
.slot-btn.selected {
  border-color: var(--color-accent);
  background: rgba(61,170,110,.07);
  color: var(--color-accent);
}

/* ── Resumen de reserva ──────────────────────────────────────── */
.resumen-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.resumen-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  gap: var(--space-sm);
}
.resumen-row:last-child { border-bottom: none; }
.resumen-label { color: var(--color-text-soft); font-weight: 600; white-space: nowrap; }
.resumen-valor { font-weight: 700; text-align: right; }

/* ── Confirmación final ──────────────────────────────────────── */
.confirmacion-wrap {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}
.confirmacion-icon {
  font-size: 64px;
  margin-bottom: var(--space-md);
  animation: popIn .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.confirmacion-titulo {
  font-size: var(--font-size-lg);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}
.confirmacion-texto {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

/* ── Empty state dentro del flujo ───────────────────────────── */
.reserva-empty {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  color: var(--color-text-soft);
}
.reserva-empty-icon { font-size: 40px; margin-bottom: var(--space-sm); }

/* ── Barra inferior fija (botón siguiente) ───────────────────── */
.reserva-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--color-primary);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: var(--space-sm) var(--space-md);
  z-index: 80;
  display: flex;
  gap: 10px;
  align-items: center;
}
#btn-volver {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}
#btn-volver:hover { background: rgba(255,255,255,.08); }
#btn-siguiente { flex: 2; }

/* espacio para que el contenido no quede bajo el footer */
.reserva-body { padding-bottom: 80px; }

/* ── Checkbox Términos y Condiciones ─────────────────────────── */
.field--tc {
  margin-top: 8px;
}

.tc-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.4;
  user-select: none;
}

.tc-label input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 3px;
  border: 1.5px solid var(--color-border, #d1d5db);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
}

.tc-label input[type="checkbox"]::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  line-height: 1;
  color: transparent;
  transition: color 0.1s;
}

.tc-label input[type="checkbox"]:checked {
  background: var(--color-accent, #3DAA6E);
  border-color: var(--color-accent, #3DAA6E);
}

.tc-label input[type="checkbox"]:checked::after {
  color: #fff;
}

.tc-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-accent, #3DAA6E);
  outline-offset: 2px;
}

.tc-label a {
  color: #3DAA6E;
  text-decoration: underline;
  font-weight: 500;
}

.tc-label a:hover {
  color: #0F2E32;
}

.field-error {
  display: block;
  font-size: 0.82rem;
  color: #dc2626;
  margin-top: 4px;
}

/* ── Descripción de servicio (toggle PEN-02) ────────────────── */
.serv-detalle-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--color-accent, #3DAA6E);
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.4;
}

.serv-detalle-btn:hover {
  color: #2d8a58;
}

.serv-detalle {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
  white-space: pre-wrap;
}
