/**
 * styles.css — Girag S.A. · Registro Demográfico
 * Estilos complementarios al Shell del Wizard y los fragmentos de pasos.
 * El sistema de tokens de color y tipografía está definido via Tailwind config.
 */

/* ── Reset base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Sistema tipográfico ─────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Material Symbols ────────────────────────────────────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  vertical-align: middle;
}

/* ── Animaciones de transición entre pasos ───────────────────────────────── */
.wizard-step-enter {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-step-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Animación del modal de éxito ────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Sombras editoriales ("Air Shadow") ──────────────────────────────────── */
.editorial-shadow {
  box-shadow: 0 8px 24px rgba(25, 30, 115, 0.05);
}

/* ── Efecto glassmorfismo (utilizado en el nav y elementos flotantes) ─────── */
.soft-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Barra de progreso líquida ────────────────────────────────────────────── */
.liquid-progress {
  background: linear-gradient(90deg, #ffdbcd 0%, #fc6716 100%);
  transition: width 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ── Stepper dots ────────────────────────────────────────────────────────── */
.step-dot {
  display: inline-block;
  transition: width 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
}

/* ── Inputs: mínimo tap target de 48px ───────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
  min-height: 48px;
  font-family: 'Inter', sans-serif;
}

/* ── Eliminar flechas nativas en inputs tipo number ──────────────────────── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ── Ocultar el picker nativo de fechas en algunos navegadores ───────────── */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}

/* ── Botones pill: estado activo visual unificado ────────────────────────── */
button.pill-active {
  background-color: #191e73 !important;
  color: #ffffff !important;
}

/* ── Focus ring accesible para teclado ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid #191e73;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Scrollbar minimalista (Webkit) ──────────────────────────────────────── */
::-webkit-scrollbar          { width: 6px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: #c7c5d3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #191e73; }

/* ── Animación spin para el loader ──────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 0.8s linear infinite;
}

/* ── Selección de texto con colores de marca ─────────────────────────────── */
::selection {
  background-color: #ffdbcd;
  color: #191e73;
}

/* ── Responsive: asegurar que el contenedor de cada paso no desborde ──────── */
#wizard-container > div {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Estado deshabilitado del botón anterior ─────────────────────────────── */
#btn-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Toast transition ────────────────────────────────────────────────────── */
#toast {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* ── Efecto hover en botones de steps ────────────────────────────────────── */
#btn-next {
  transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
}
#btn-next:hover  { transform: scale(1.03); }
#btn-next:active { transform: scale(0.96); }

/* ── Mejorar contraste de selects nativos ────────────────────────────────── */
select {
  cursor: pointer;
  background-image: none;
}

/* ── Estilos globales para los fragmentos de cada paso ───────────────────── */
/* Asegura que el header del paso ya no intente ser fixed (se inyecta en el DOM) */
#step-content header.fixed,
#step-content nav.fixed {
  position: static !important;
  backdrop-filter: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Ocultar el progress ribbon y topbar propios de cada fragmento (el shell los provee) */
#step-content > div:first-child:has(.liquid-progress),
#step-content > div:first-child:has(.progress-ribbon) {
  display: none;
}
