/* ============================================
   AORI K-Beauty — Skin Quiz Styles
   ============================================ */

/* ===== PROGRESS BAR ===== */
.quiz-progress-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 0;
}
.quiz-progress-bar {
  height: 4px;
  background: #f0e8e8;
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), #BE7DF5);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.quiz-progress-text {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
  font-weight: 500;
}

/* ===== QUIZ CONTAINER ===== */
.quiz-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  min-height: 70vh;
}

/* ===== STEP TRANSITIONS ===== */
.quiz-step {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.quiz-step.active {
  opacity: 1;
  transform: translateX(0);
}
.quiz-step.slide-left {
  opacity: 0;
  transform: translateX(-30px);
}
.quiz-step.slide-right {
  opacity: 0;
  transform: translateX(30px);
}

/* ===== STEP CONTENT ===== */
.quiz-step-content {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ===== INTRO (STEP 0) ===== */
.intro-content {
  text-align: center;
}
.intro-illustration {
  margin-bottom: 24px;
}
.intro-illustration svg {
  max-width: 120px;
  height: auto;
}
.quiz-intro-headline {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}
.quiz-intro-subtitle {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ===== QUESTIONS ===== */
.quiz-question {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  margin-bottom: 8px;
}
.quiz-question-subtitle {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin-bottom: 28px;
}

/* ===== OPTION CARDS — Step 1 (grid with icons) ===== */
.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.quiz-option-card {
  border: 2px solid #eee;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}
.quiz-option-card:hover {
  border-color: var(--pink);
  background: #FFF5F8;
}
.quiz-option-card.selected {
  border-color: var(--pink);
  background: #FFF5F8;
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}
.quiz-option-card .option-icon,
.quiz-option-card .emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}
.quiz-option-card .option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* ===== OPTION BUTTONS — Steps 2, 3, 5 (list style) ===== */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.quiz-option-button {
  border: 2px solid #eee;
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
}
.quiz-option-button:hover {
  border-color: var(--pink);
  background: #FFF5F8;
  color: var(--pink);
}
.quiz-option-button.selected {
  border-color: var(--pink);
  background: #FFF5F8;
  color: var(--pink);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
  font-weight: 600;
}

/* ===== MULTI-SELECT CHIPS — Step 4 ===== */
.quiz-options-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.quiz-chip-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 2px solid #eee;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: var(--dark);
}
.quiz-chip-option:hover {
  border-color: var(--pink);
  color: var(--pink);
}
.quiz-chip-option.selected {
  background: var(--pink);
  color: white;
  border-color: var(--pink);
}
.quiz-chip-option .chip-emoji {
  font-size: 16px;
}
.quiz-chip-option .chip-label {
  font-size: 13px;
}

/* ===== STEP CONTROLS (back + next) ===== */
.quiz-step-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}
.quiz-btn-primary {
  background: var(--pink);
  color: white;
}
.quiz-btn-primary:hover {
  background: #d1177d;
  transform: translateY(-1px);
}
.quiz-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.quiz-btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid #ddd;
  padding: 10px 20px;
  font-size: 13px;
}
.quiz-btn-secondary:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: transparent;
}
.quiz-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.quiz-back-btn::before {
  content: '\2190';
  margin-right: 4px;
}
.quiz-start-btn {
  margin-top: 8px;
}

/* ===== LEAD CAPTURE FORM (Step 6) ===== */
.quiz-form {
  max-width: 420px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.form-label .required {
  color: var(--pink);
  margin-left: 2px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0d8d8;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background: white;
  color: var(--dark);
  box-sizing: border-box;
}
.form-input:focus {
  border-color: var(--pink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}
.form-input::placeholder {
  color: #ccc;
}
.form-error {
  display: block;
  font-size: 12px;
  color: #e53e3e;
  margin-top: 4px;
  min-height: 16px;
}
.form-privacy-note {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-top: 16px;
  margin-bottom: 8px;
}
.form-privacy-note::before {
  content: '\1F512 ';
}

/* ===== RESULTS (Step 7) ===== */
.quiz-results-headline {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  margin-bottom: 16px;
}
.quiz-profile-summary {
  text-align: center;
  margin-bottom: 28px;
}
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.profile-badge {
  background: #FFF5F8;
  color: var(--pink);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

/* Results product grid */
.quiz-results-grid {
  min-height: 200px;
}
.quiz-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.quiz-product-card {
  background: #fafafa;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.quiz-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.quiz-product-img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  display: block;
}
.quiz-product-info {
  padding: 14px;
}
.quiz-product-brand {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  display: block;
}
.quiz-product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin: 4px 0;
}
.quiz-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink);
}

/* Results CTAs */
.quiz-results-cta {
  text-align: center;
  margin-bottom: 24px;
}

/* WhatsApp Asesoría CTA */
.quiz-whatsapp-cta {
  margin-bottom: 24px;
}
.quiz-whatsapp-inner {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border: 1.5px solid #c8e6c9;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}
.quiz-whatsapp-text strong {
  display: block;
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 6px;
}
.quiz-whatsapp-text p {
  font-size: 13px;
  color: #666;
  margin: 0 0 16px;
  line-height: 1.5;
}
.quiz-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  font-family: inherit;
}
.quiz-whatsapp-btn:hover {
  background: #1fb855;
  transform: translateY(-1px);
}
.quiz-whatsapp-btn svg {
  flex-shrink: 0;
}

.quiz-results-footer {
  text-align: center;
  padding-top: 8px;
}

/* ===== LOADING ===== */
.quiz-loading {
  text-align: center;
  padding: 40px 20px;
}
.quiz-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--pink);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: quizSpin 0.8s linear infinite;
}
.loading-message {
  color: #888;
  font-size: 14px;
}
@keyframes quizSpin {
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .quiz-step-content {
    padding: 32px 20px;
    border-radius: 20px;
  }
  .quiz-intro-headline {
    font-size: 26px;
  }
  .quiz-question {
    font-size: 18px;
  }
  .quiz-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quiz-products-grid {
    grid-template-columns: 1fr;
  }
  .quiz-btn {
    width: 100%;
    justify-content: center;
  }
  .quiz-step-controls {
    flex-direction: column-reverse;
  }
  .quiz-step-controls .quiz-btn {
    width: 100%;
  }
  .quiz-form {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .quiz-container {
    padding: 20px 16px 40px;
  }
  .quiz-progress-wrapper {
    padding: 16px 16px 0;
  }
  .quiz-step-content {
    padding: 24px 16px;
  }
  .quiz-intro-headline {
    font-size: 22px;
  }
  .quiz-intro-subtitle {
    font-size: 14px;
  }
  .quiz-question {
    font-size: 16px;
  }
  .quiz-options-grid {
    gap: 10px;
  }
  .quiz-option-card {
    padding: 14px 10px;
  }
  .quiz-option-card .option-icon,
  .quiz-option-card .emoji {
    font-size: 24px;
  }
  .quiz-option-card .option-label {
    font-size: 13px;
  }
  .quiz-options-chips {
    gap: 8px;
  }
  .quiz-chip-option {
    padding: 8px 14px;
    font-size: 12px;
  }
  .quiz-results-headline {
    font-size: 22px;
  }
}
