/* Quiz Component — Mini-consultation */
/* Design system: #c495ff brand, Inter font, 12px radius */

.quiz {
    padding: clamp(3rem, 6vw, 6rem) 0;
}

.quiz__wrapper {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

/* Progress bar */
.quiz__progress {
    height: 4px;
    background: #e9d5ff;
    border-radius: 999px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz__progress-bar {
    height: 100%;
    background: #c495ff;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Steps — hide/show */
.quiz__step {
    display: none;
}

.quiz__step--active {
    display: block;
    animation: quizFadeIn 0.3s ease;
}

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

/* ===== Start Screen ===== */
.quiz__start {
    text-align: center;
    padding: 2rem 0;
}

.quiz__start-label {
    display: inline-block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c495ff;
    background: #f3e8ff;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.quiz__start-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin: 0 0 1rem;
}

.quiz__start-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Buttons ===== */
.quiz__btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #c495ff;
    border: 2px solid #c495ff;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.quiz__btn:hover {
    background: #fff;
    color: #c495ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(196, 149, 255, 0.12);
}

.quiz__btn:active {
    transform: scale(0.98);
}

.quiz__btn--start {
    padding: 1.15rem 2.5rem;
    font-size: 1.1rem;
}

.quiz__btn--cta {
    width: 100%;
    text-align: center;
    padding: 1.15rem 2.5rem;
    font-size: 1.05rem;
}

.quiz__btn--submit {
    width: 100%;
    padding: 1rem 1.5rem;
}

.quiz__btn--submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Question Header ===== */
.quiz__question-header {
    margin-bottom: 1.5rem;
}

.quiz__question-context {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.5rem;
}

.quiz__question-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.quiz__question-hint {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ===== Options ===== */
.quiz__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.quiz__option {
    display: block;
    width: 100%;
    text-align: left;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    color: #1e293b;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quiz__option:hover {
    border-color: #c495ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(196, 149, 255, 0.12);
}

.quiz__option--selected {
    border-color: #c495ff;
    background: #f8efff;
}

.quiz__option--disabled {
    pointer-events: none;
    opacity: 0.5;
}

.quiz__option-text {
    display: block;
    line-height: 1.5;
}

/* Insight — hidden by default, slides in within card */
.quiz__option-insight {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    border-top: 0 solid #e9d5ff;
    margin-top: 0;
    padding-top: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease, border-top-width 0.3s ease;
}

.quiz__option--selected .quiz__option-insight {
    max-height: 200px;
    opacity: 1;
    border-top-width: 1px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

/* ===== Navigation ===== */
.quiz__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.quiz__btn-back {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.quiz__btn-back:hover {
    color: #c495ff;
}

.quiz__btn-next {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #c495ff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: opacity 0.2s ease;
}

.quiz__btn-next--hidden {
    opacity: 0;
    pointer-events: none;
}

.quiz__btn-next--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Auto-advance timer indicator on selected option */
.quiz__option--selected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #c495ff;
    border-radius: 0 0 12px 12px;
    animation: quizTimerBar 1.5s linear forwards;
}

@keyframes quizTimerBar {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== Contact Form (Step 6) ===== */
.quiz__contact {
    text-align: center;
}

.quiz__contact-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
}

.quiz__contact-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 2rem;
}

.quiz__contact-form {
    text-align: left;
    max-width: 420px;
    margin: 0 auto;
}

.quiz__contact-field {
    display: block;
    margin-bottom: 1rem;
}

.quiz__contact-field-label {
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.quiz__contact-input {
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    color: #1e293b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.quiz__contact-input:focus {
    outline: none;
    border-color: #c495ff;
    background: #fff;
}

.quiz__contact-input::placeholder {
    color: #94a3b8;
}

.quiz__contact-agree {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.quiz__contact-agree input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #c495ff;
}

.quiz__contact-agree a {
    color: #c495ff;
    text-decoration: underline;
}

.quiz__contact-note {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    margin: 0.75rem 0 0;
}

/* ===== Result Screen (Step 7) ===== */
.quiz__result {
    padding: 1rem 0;
}

/* Stage dots */
.quiz__result-stage {
    margin-bottom: 2rem;
}

.quiz__stage-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.quiz__stage-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quiz__stage-dot-circle {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e9d5ff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.quiz__stage-dot--active .quiz__stage-dot-circle {
    background: #c495ff;
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(196, 149, 255, 0.2);
}

.quiz__stage-dot-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
}

.quiz__stage-dot--active .quiz__stage-dot-label {
    color: #1e293b;
    font-weight: 600;
}

.quiz__stage-line {
    flex: 1;
    height: 2px;
    background: #e9d5ff;
    min-width: 40px;
    margin: 0 0.5rem;
    margin-bottom: 1.8rem;
}

/* Result sections — animate in */
.quiz__result-section {
    background: #f3e8ff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(10px);
    animation: quizResultIn 0.4s ease forwards;
}

.quiz__result-situation { animation-delay: 0.1s; }
.quiz__result-attention { animation-delay: 0.3s; }
.quiz__result-nextstep { animation-delay: 0.5s; }

@keyframes quizResultIn {
    to { opacity: 1; transform: translateY(0); }
}

.quiz__result-section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem;
}

.quiz__result-section-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Result CTA */
.quiz__result-cta {
    margin-top: 2rem;
    text-align: center;
    opacity: 0;
    animation: quizResultIn 0.4s ease 0.7s forwards;
}

.quiz__result-guarantee {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.75rem 0 0;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .quiz__start-title {
        font-size: 1.4rem;
    }

    .quiz__question-text {
        font-size: 1.2rem;
    }

    .quiz__option {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .quiz__stage-dot-label {
        font-size: 0.7rem;
    }

    .quiz__stage-line {
        min-width: 24px;
    }

    .quiz__result-section {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 640px) {
    .quiz__wrapper {
        max-width: 100%;
    }

    .quiz__start {
        padding: 1rem 0;
    }

    .quiz__btn--start {
        width: 100%;
    }

    .quiz__contact-form {
        max-width: 100%;
    }
}
