/**
 * happy-path.css
 * Estilos para Caminos Asistidos / Flujos Guiados (Fase 4).
 * Dualidad: Asistente guiado de 3 pasos vs. Modo Libre en Alter.
 */

/* ==========================================================================
   1. BANNER SUPERIOR DE MODO ASISTIDO
   ========================================================================== */
.happy-path-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1e1b4b 0%, #31104b 100%);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  border-bottom: 2px solid rgba(236, 72, 153, 0.4);
  animation: hpSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hp-banner-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.hp-banner-icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  flex-shrink: 0;
}

.hp-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-banner-title {
  font-family: var(--font-title, 'Montserrat', sans-serif);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-badge-assist {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hp-banner-sub {
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.hp-btn-wizard {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-title, sans-serif);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  transition: all 0.2s ease;
}

.hp-btn-wizard:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
}

.hp-btn-exit {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-title, sans-serif);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.hp-btn-exit:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   2. MODALES DEL FLUJO GUIADO
   ========================================================================== */
.hp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hp-modal-overlay.active {
  display: flex !important;
}

.hp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hp-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: hpScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hp-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.hp-modal-title {
  margin: 0;
  font-family: var(--font-title, sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hp-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.hp-modal-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.hp-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Indicador de Pasos (Step Bar) */
.hp-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
  padding: 0 0.5rem;
}

.hp-step-bar::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
}

.hp-step-bar-progress {
  position: absolute;
  top: 16px;
  left: 2rem;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  z-index: 1;
  transition: width 0.3s ease;
}

.hp-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.hp-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
}

.hp-step-item.active .hp-step-circle {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.hp-step-item.completed .hp-step-circle {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.hp-step-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  font-family: var(--font-title, sans-serif);
}

.hp-step-item.active .hp-step-label {
  color: #0f172a;
}

/* Tarjetas de Ocasión / Selector de Caminos */
.hp-occasions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.hp-occasion-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hp-occasion-card:hover {
  transform: translateY(-3px);
  border-color: #8b5cf6;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
}

.hp-occasion-card.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.hp-occasion-icon {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.hp-occasion-title {
  font-family: var(--font-title, sans-serif);
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.hp-occasion-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

/* Formulario dinámico de campos wizard (Paso 2) */
.hp-form-group {
  margin-bottom: 1rem;
}

.hp-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.4rem;
  font-family: var(--font-title, sans-serif);
}

.hp-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.hp-form-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Modal Footer */
.hp-modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

/* ==========================================================================
   5. ONBOARDING CALLOUT & DUAL ENTRY (MODO GUIADO VS MODO LIBRE)
   ========================================================================== */
.hp-onboarding-callout {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.08));
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.08);
}

.hp-onboarding-callout-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hp-onboarding-callout-icon {
  font-size: 2rem;
  line-height: 1;
}

.hp-onboarding-callout-title {
  margin: 0 0 0.2rem 0;
  font-family: var(--font-title, 'Montserrat', sans-serif);
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.hp-onboarding-callout-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.hp-btn-choose-occasion {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-title, sans-serif);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.hp-btn-choose-occasion:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.hp-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0 0 1.25rem 0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hp-or-divider::before,
.hp-or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.hp-or-divider span {
  padding: 0 0.75rem;
}

/* Selector de Producto en Wizard (Step 1) */
.hp-product-selector-pills {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hp-pills-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.hp-pills-row {
  display: flex;
  gap: 0.5rem;
}

.hp-prod-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hp-prod-pill.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Color Chips en Wizard (Step 2) */
.hp-wizard-colors-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
}

.hp-wizard-colors-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
}

.hp-wizard-colors-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.hp-color-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.hp-color-chip:hover {
  transform: scale(1.15);
}

.hp-color-chip.active {
  border-color: #8b5cf6;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #8b5cf6;
}

/* Responsive */
@media (max-width: 640px) {
  .happy-path-banner {
    padding: 0.5rem 0.85rem;
  }
  .hp-banner-sub {
    display: none;
  }
  .hp-btn-wizard span {
    font-size: 0.75rem;
  }
  .hp-btn-exit span {
    font-size: 0.75rem;
  }
  .hp-occasions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hp-onboarding-callout {
    flex-direction: column;
    align-items: flex-start;
  }
  .hp-btn-choose-occasion {
    width: 100%;
  }
  .hp-product-selector-pills {
    flex-direction: column;
    align-items: flex-start;
  }
}

