/**
 * Hello Plataforma · Onboarding Styles
 *
 * Wizard premium:
 * - 5 pasos con transiciones smooth
 * - Avatar/hero uploaders con preview
 * - Modal celebratorio
 * - Banner sutil de progreso
 */


/* ============================================================
   1. WRAPPER + LAYOUT
   ============================================================ */

.hp-ob-wrapper {
  background: var(--hp-bg-secondary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}


/* ============================================================
   2. HEADER · BARRA DE PROGRESO
   ============================================================ */

.hp-ob-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 244, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--hp-border-subtle);
  padding: 14px 20px 12px;
}

.hp-ob-step-indicator {
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 700;
  color: var(--hp-purple-deep);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 10px;
}

.hp-ob-progress-bar {
  height: 4px;
  background: rgba(212, 191, 232, 0.30);
  border-radius: 99px;
  overflow: hidden;
}

.hp-ob-progress-fill {
  height: 100%;
  background: var(--hp-gradient-purple-button);
  border-radius: 99px;
  transition: width 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 4px rgba(105, 73, 158, 0.30);
}


/* ============================================================
   3. MAIN · CONTENEDOR DE PASOS
   ============================================================ */

.hp-ob-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px 40px;
  position: relative;
}

.hp-ob-step {
  width: 100%;
  max-width: 440px;
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: hpObStepIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hp-ob-step.is-active {
  display: flex;
}

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


/* ============================================================
   4. HERO POR PASO (icon + titulo + sub)
   ============================================================ */

.hp-ob-hero {
  text-align: center;
  margin-bottom: 6px;
}

.hp-ob-greeting {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-purple-deep);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.1px;
}

.hp-ob-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hp-ob-icon--purple {
  background: linear-gradient(135deg, #9575CD 0%, #69499E 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 28px -6px rgba(105, 73, 158, 0.35);
}

.hp-ob-icon--bronze {
  background: linear-gradient(135deg, #DCB877 0%, #C9A961 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 28px -6px rgba(201, 169, 97, 0.35);
}

.hp-ob-icon i {
  font-size: 30px;
  color: #FFF;
}

.hp-ob-title {
  font-family: var(--hp-font-base);
  font-size: 24px;
  font-weight: 800;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

.hp-ob-sub {
  font-family: var(--hp-font-base);
  font-size: 14px;
  color: var(--hp-text-secondary);
  margin: 8px auto 0;
  line-height: 1.5;
  max-width: 360px;
}


/* ============================================================
   5. AVATAR UPLOADER (PASO 1)
   ============================================================ */

.hp-ob-avatar-uploader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hp-ob-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.30) 0%, rgba(168, 135, 208, 0.15) 100%);
  border: 2px dashed rgba(149, 117, 205, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              border-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-avatar-preview:hover {
  transform: scale(1.02);
  border-color: var(--hp-purple-deep);
}

.hp-ob-avatar-preview.has-image {
  border: 3px solid var(--hp-purple-deep);
  background: transparent;
  box-shadow: 0 16px 32px -8px rgba(105, 73, 158, 0.35);
}

.hp-ob-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-ob-avatar-preview i {
  font-size: 44px;
  color: var(--hp-purple-deep);
  opacity: 0.5;
}

.hp-ob-hint {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  text-align: center;
  margin: 4px 0 0;
}


/* ============================================================
   6. HERO UPLOADER (PASO 4)
   ============================================================ */

.hp-ob-hero-uploader {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.30) 0%, rgba(168, 135, 208, 0.15) 100%);
  border: 2px dashed rgba(149, 117, 205, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              border-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-hero-uploader:hover {
  border-color: var(--hp-purple-deep);
}

.hp-ob-hero-uploader.has-image {
  border: 3px solid var(--hp-purple-deep);
  background: transparent;
  box-shadow: 0 20px 40px -10px rgba(105, 73, 158, 0.30);
}

.hp-ob-hero-uploader img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-ob-hero-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--hp-purple-deep);
}

.hp-ob-hero-placeholder i {
  font-size: 44px;
  opacity: 0.6;
}

.hp-ob-hero-placeholder span {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 600;
}

.hp-ob-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 22, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FFF;
  opacity: 0;
  transition: opacity var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-hero-uploader.has-image:hover .hp-ob-hero-overlay {
  opacity: 1;
}

.hp-ob-hero-overlay i { font-size: 28px; }
.hp-ob-hero-overlay span {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
}


/* ============================================================
   7. CHAR COUNT
   ============================================================ */

.hp-ob-char-count {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 4px 0 0;
  text-align: right;
}


/* ============================================================
   8. INFO BOX (PASO 2 cobros)
   ============================================================ */

.hp-ob-info-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(168, 208, 162, 0.18) 0%, rgba(125, 175, 119, 0.04) 100%);
  border: 0.5px solid rgba(125, 175, 119, 0.30);
  border-radius: 12px;
}

.hp-ob-info-box i {
  font-size: 18px;
  color: #5C8A56;
  flex-shrink: 0;
  margin-top: 1px;
}

.hp-ob-info-box p {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  margin: 0;
  line-height: 1.5;
}


/* ============================================================
   9. INPUT PREFIX (precios)
   ============================================================ */

.hp-input-prefix {
  position: relative;
}

.hp-input-prefix-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text-secondary);
  pointer-events: none;
}

.hp-input-prefix-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--hp-font-base);
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-text-tertiary);
  pointer-events: none;
  letter-spacing: 0.3px;
}

.hp-input-prefix input { padding-left: 28px; padding-right: 50px; }


/* ============================================================
   10. TÉRMINOS (PASO 5)
   ============================================================ */

.hp-ob-terms-box {
  background: var(--hp-bg-primary);
  border: 0.5px solid var(--hp-border-subtle);
  border-radius: 14px;
  padding: 18px 16px;
}

.hp-ob-terms-pending {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: rgba(212, 191, 232, 0.15);
  border-radius: 10px;
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  margin: 0 0 14px;
  line-height: 1.5;
}

.hp-ob-terms-pending i {
  font-size: 14px;
  color: var(--hp-purple-deep);
  flex-shrink: 0;
  margin-top: 1px;
}

.hp-ob-terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-ob-terms-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-primary);
  line-height: 1.5;
}

.hp-ob-terms-list i {
  font-size: 16px;
  color: #5C8A56;
  flex-shrink: 0;
  margin-top: 1px;
}


/* Checkbox custom */

.hp-ob-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: var(--hp-bg-primary);
  border: 0.5px solid var(--hp-border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color var(--hp-duration-normal) var(--hp-ease),
              background var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-checkbox-label:has(.hp-ob-checkbox:checked) {
  border-color: var(--hp-purple-deep);
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.18) 0%, rgba(168, 135, 208, 0.04) 100%);
}

.hp-ob-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hp-ob-checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--hp-border-subtle);
  background: var(--hp-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-checkbox-box i {
  font-size: 14px;
  color: #FFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-checkbox:checked + .hp-ob-checkbox-box {
  background: var(--hp-purple-deep);
  border-color: var(--hp-purple-deep);
}

.hp-ob-checkbox:checked + .hp-ob-checkbox-box i {
  opacity: 1;
  transform: scale(1);
}

.hp-ob-checkbox-text {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-primary);
  font-weight: 600;
  line-height: 1.4;
}


/* ============================================================
   11. FOOTER · BOTONES
   ============================================================ */

.hp-ob-footer {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-ob-footer-split {
  flex-direction: row;
  gap: 8px;
}

.hp-ob-footer-split .hp-btn-secondary { flex: 0 0 auto; padding-left: 16px; padding-right: 16px; }
.hp-ob-footer-split .hp-btn-purple { flex: 1; }


/* ============================================================
   12. MODAL CELEBRATORIO
   ============================================================ */

.hp-ob-success-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 14, 22, 0.75);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hp-ob-success-modal[aria-hidden="false"] {
  display: flex;
  animation: hpObSuccessFadeIn 300ms ease-out;
}

@keyframes hpObSuccessFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hp-ob-success-card {
  max-width: 400px;
  width: 100%;
  background: #FFF;
  border-radius: 22px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 32px 80px -12px rgba(105, 73, 158, 0.40);
  animation: hpObSuccessCard 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes hpObSuccessCard {
  from { transform: translateY(30px) scale(0.92); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.hp-ob-success-icon {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: linear-gradient(135deg, #DCB877 0%, #C9A961 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 20px 40px -8px rgba(201, 169, 97, 0.50);
  animation: hpObConfettiPulse 1.6s ease-in-out infinite;
}

@keyframes hpObConfettiPulse {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 20px 40px -8px rgba(201,169,97,0.50), 0 0 0 0 rgba(201,169,97,0.5);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 20px 40px -8px rgba(201,169,97,0.50), 0 0 0 18px rgba(201,169,97,0);
  }
}

.hp-ob-success-icon i {
  font-size: 42px;
  color: #FFF;
}

.hp-ob-success-title {
  font-family: var(--hp-font-base);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--hp-text-primary);
  margin: 0 0 8px;
  line-height: 1.2;
}

.hp-ob-success-sub {
  font-family: var(--hp-font-base);
  font-size: 14px;
  color: var(--hp-text-secondary);
  margin: 0 0 24px;
  line-height: 1.5;
}


/* ============================================================
   13. BANNER DE PROGRESO (en /mi-panel/)
   ============================================================ */

.hp-ob-banner {
  margin: 0 0 16px;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.20) 0%, rgba(168, 135, 208, 0.06) 100%);
  border: 0.5px solid rgba(149, 117, 205, 0.30);
  border-radius: 14px;
  padding: 14px 16px;
}

.hp-ob-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-ob-banner-info {
  flex: 1;
  min-width: 0;
}

.hp-ob-banner-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.hp-ob-banner-title i {
  font-size: 16px;
  color: var(--hp-purple-deep);
}

.hp-ob-banner-sub {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-secondary);
  margin: 3px 0 8px;
}

.hp-ob-banner-progress {
  height: 4px;
  background: rgba(212, 191, 232, 0.40);
  border-radius: 99px;
  overflow: hidden;
}

.hp-ob-banner-progress-fill {
  height: 100%;
  background: var(--hp-gradient-purple-button);
  border-radius: 99px;
  transition: width 350ms ease-out;
}


/* ============================================================
   14. UPLOADING STATE
   ============================================================ */

.hp-ob-avatar-preview.is-uploading,
.hp-ob-hero-uploader.is-uploading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.hp-ob-avatar-preview.is-uploading::after,
.hp-ob-hero-uploader.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-ob-avatar-preview.is-uploading::before,
.hp-ob-hero-uploader.is-uploading::before {
  content: '⏳';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  z-index: 1;
  animation: hpObSpin 1.5s linear infinite;
}

@keyframes hpObSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}


@media (prefers-reduced-motion: reduce) {
  .hp-ob-step,
  .hp-ob-success-modal,
  .hp-ob-success-card,
  .hp-ob-success-icon,
  .hp-ob-progress-fill { animation: none !important; transition: none !important; }
}


/* ============================================================
   RADIO CARDS · tipo de contenido
   ============================================================ */

.hp-ob-content-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hp-ob-radio-card {
  cursor: pointer;
  display: block;
}

.hp-ob-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hp-ob-radio-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 14px 10px;
  background: var(--hp-bg-primary);
  border: 1.5px solid var(--hp-border-subtle);
  border-radius: 14px;
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-radio-card-inner i {
  font-size: 28px;
  color: var(--hp-text-tertiary);
  margin-bottom: 4px;
  transition: color var(--hp-duration-normal) var(--hp-ease);
}

.hp-ob-radio-card-inner strong {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text-primary);
}

.hp-ob-radio-card-inner span {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-secondary);
  line-height: 1.3;
}

.hp-ob-radio-card input[type="radio"]:checked + .hp-ob-radio-card-inner {
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.15) 0%, rgba(168, 135, 208, 0.04) 100%);
  border-color: var(--hp-purple-deep);
  box-shadow: 0 4px 12px -2px rgba(105, 73, 158, 0.15);
}

.hp-ob-radio-card input[type="radio"]:checked + .hp-ob-radio-card-inner i {
  color: var(--hp-purple-deep);
}