/* ============================================================================
   styles.css — Estilos complementarios al utilitario de Tailwind (CDN)
   Principalmente para el stepper/timeline y pequeñas animaciones.
   ============================================================================ */

:root {
  --step-line: #e2e8f0;
  --step-line-done: #2563eb;
}
.dark {
  --step-line: #334155;
  --step-line-done: #3b82f6;
}

/* Animación de aparición de la sección de resultados */
.fade-in {
  animation: fadeIn 0.35s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------------------
   STEPPER — layout horizontal (escritorio)
   ---------------------------------------------------------------------------- */
.stepper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .stepper {
    flex-direction: row;
    gap: 0;
  }
}

.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}

/* Línea conectora */
.step::before {
  content: "";
  position: absolute;
  background: var(--step-line);
  z-index: 0;
}

/* Vertical (móvil): línea hacia abajo desde el ícono */
.step::before {
  left: 15px;
  top: 32px;
  width: 2px;
  height: calc(100% + 1.25rem - 32px);
}
.step:last-child::before { display: none; }

/* Horizontal (escritorio): línea hacia la derecha */
@media (min-width: 768px) {
  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
  .step::before {
    left: 50%;
    top: 16px;
    width: 100%;
    height: 2px;
  }
  .step:last-child::before { display: none; }
}

/* Línea completada */
.step.done::before,
.step.current::before {
  background: var(--step-line-done);
}

/* Círculo del hito */
.step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 32px;
  width: 32px;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid var(--step-line);
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.dark .step-dot { background: #1e293b; }

.step.done .step-dot {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.step.current .step-dot {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.step.current .step-dot .pulse {
  height: 10px; width: 10px; border-radius: 9999px; background: #2563eb;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}
.step.pending .step-label { color: #94a3b8; }

.step-sub {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Scrollbar sutil para la tabla en móvil */
.overflow-x-auto::-webkit-scrollbar { height: 6px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.dark .overflow-x-auto::-webkit-scrollbar-thumb { background: #475569; }
