/* ============================================
   FGA QUIZ v2 — Messaging Health Check
   Conforme charte Fast Growth Advisors
   ============================================ */

/* --- Container --- */
.fga-quiz {
    background-color: #0A0C10;
    border: 1px solid #1E2130;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    max-width: 680px;
}

.fga-quiz::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7FAE48, transparent);
    border-radius: 2px;
    z-index: 1;
}

/* --- Steps --- */
.fga-quiz__step-inner {
    padding: 40px 40px 44px;
}

.fga-quiz__step-title {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(20px, 2.5vw, 26px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    color: #F0F2F5 !important;
    margin-bottom: 8px !important;
}

.fga-quiz__step-desc {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: #9BA1B0;
    margin-bottom: 28px;
}

/* --- Form elements --- */
.fga-quiz__form-group {
    margin-bottom: 16px;
}

.fga-quiz__form-group label {
    display: block;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #C8CCD5;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.fga-quiz__input {
    width: 100%;
    background-color: #161922 !important;
    border: 1px solid #1E2130;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: #F0F2F5 !important;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-sizing: border-box;
}

.fga-quiz__input:focus {
    border-color: #7FAE48;
    box-shadow: 0 0 0 2px rgba(127, 174, 72, 0.15);
}

.fga-quiz__input::placeholder {
    color: #3D4250;
}


.fga-quiz__textarea {
    width: 100%;
    background-color: #161922 !important;
    border: 1px solid #1E2130;
    border-radius: 6px;
    padding: 14px 16px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: #F0F2F5 !important;
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-sizing: border-box;
}

.fga-quiz__textarea:focus {
    border-color: #7FAE48;
    box-shadow: 0 0 0 2px rgba(127, 174, 72, 0.15);
}

.fga-quiz__textarea::placeholder {
    color: #3D4250;
}


.fga-quiz__char-count {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #3D4250;
}

.fga-quiz__field-hint {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #6B7280;
    margin-top: 6px;
    font-style: italic;
}

.fga-quiz__email-error {
    color: #E85D5D !important;
    font-style: normal;
}

.fga-quiz__legal {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #3D4250;
    margin-top: 16px;
    text-align: center;
}

/* --- Next button --- */
.fga-quiz__next-btn {
    margin-top: 24px;
    width: 100%;
    justify-content: center;
}

.fga-quiz__next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Progress bar --- */
.fga-quiz__progress {
    padding: 20px 40px 0;
    position: relative;
}

.fga-quiz__progress-bar {
    height: 3px;
    background-color: #1E2130;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.fga-quiz__progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--quiz-progress, 0%);
    background-color: #7FAE48;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fga-quiz__progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6B7280;
}

.fga-quiz__step-label {
    color: #7FAE48;
}

/* --- Questions --- */
.fga-quiz__question {
    padding: 36px 40px 44px;
    animation: fga-quiz-fadein 0.35s ease-out;
}

@keyframes fga-quiz-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .fga-quiz__question,
    .fga-quiz__step,
    .fga-quiz__gap-reveal { animation: none; }
}

.fga-quiz__q-text {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 600 !important;
    font-size: clamp(17px, 2vw, 20px) !important;
    line-height: 1.35 !important;
    color: #F0F2F5 !important;
    margin-bottom: 10px !important;
}

.fga-quiz__q-context {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #6B7280;
    font-style: italic;
    margin-bottom: 28px;
    max-width: 540px;
}

/* --- Answer buttons --- */
.fga-quiz__answers {
    display: flex;
    gap: 12px;
}

.fga-quiz__answer {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #161922;
    color: #C8CCD5;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 16px 24px;
    border: 1px solid #1E2130;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.fga-quiz__answer:hover {
    background-color: #1C1F2E;
    border-color: rgba(127, 174, 72, 0.4);
    color: #F0F2F5;
    box-shadow: 0 0 16px rgba(127, 174, 72, 0.1);
}

.fga-quiz__answer:focus-visible {
    border-color: #7FAE48;
    box-shadow: 0 0 0 2px rgba(127, 174, 72, 0.3);
}

.fga-quiz__answer:active,
.fga-quiz__answer.is-selected {
    background-color: rgba(127, 174, 72, 0.12);
    border-color: #7FAE48;
    color: #7FAE48;
}

/* --- Loader / Analysis --- */
.fga-quiz__analysis-loader {
    text-align: center;
    padding: 60px 40px;
}

.fga-quiz__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #1E2130;
    border-top-color: #7FAE48;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: fga-quiz-spin 0.8s linear infinite;
}

@keyframes fga-quiz-spin {
    to { transform: rotate(360deg); }
}

.fga-quiz__loader-status {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 20px;
    min-height: 20px;
}

.fga-quiz__loader-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background-color: #1E2130;
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.fga-quiz__loader-fill {
    height: 100%;
    width: 0%;
    background-color: #7FAE48;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* --- Results --- */
.fga-quiz__score-section {
    text-align: center;
    margin-bottom: 28px;
}

.fga-quiz__score-badge {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 8px;
}

.fga-quiz__score-value {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: 56px;
    letter-spacing: -0.03em;
    line-height: 1;
}

.fga-quiz__score-max {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 22px;
    color: #6B7280;
    margin-left: 2px;
}

.fga-quiz__score-badge--critical .fga-quiz__score-value { color: #E85D5D; }
.fga-quiz__score-badge--fragile .fga-quiz__score-value  { color: #E8A94D; }
.fga-quiz__score-badge--solid .fga-quiz__score-value    { color: #7FAE48; }

.fga-quiz__score-label {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #9BA1B0;
}

/* --- Gap reveal --- */
.fga-quiz__gap-reveal {
    background-color: #161922;
    border: 1px solid #1E2130;
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 28px;
    animation: fga-quiz-fadein 0.5s ease-out 0.3s both;
}

.fga-quiz__gap-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

/* Gap meter bar (green → red) */
.fga-quiz__gap-meter {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #7FAE48 0%, #E8A94D 50%, #E85D5D 100%);
    border-radius: 8px;
    position: relative;
    margin: 20px 0 8px;
}

.fga-quiz__gap-indicator {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background-color: #F0F2F5;
    border: 2px solid #0A0C10;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.fga-quiz__gap-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3D4250;
}

.fga-quiz__gap-title {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(17px, 2vw, 20px) !important;
    line-height: 1.25 !important;
    color: #F0F2F5 !important;
    margin-bottom: 10px !important;
}

.fga-quiz__gap-text {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #9BA1B0;
}

/* --- Results CTA --- */
.fga-quiz__results-cta {
    text-align: center;
}

.fga-quiz__email-teaser {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #F0F2F5;
    margin-bottom: 20px;
}

.fga-quiz__cta {
    font-size: 15px !important;
    padding: 14px 28px !important;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    .fga-quiz__step-inner {
        padding: 32px 24px 36px;
    }
    .fga-quiz__progress {
        padding: 16px 24px 0;
    }
    .fga-quiz__question {
        padding: 28px 24px 36px;
    }
    .fga-quiz__answers {
        flex-direction: column;
        gap: 10px;
    }
    .fga-quiz__analysis-loader {
        padding: 48px 24px;
    }
    .fga-quiz__score-value {
        font-size: 44px;
    }
}

/* --- Hidden utility --- */
.fga-quiz [hidden] {
    display: none !important;
}

/* --- Consent checkbox --- */
.fga-quiz__consent-group {
    margin: 16px 0;
}
.fga-quiz__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.5;
    cursor: pointer;
}
.fga-quiz__consent-check {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #7FAE48;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
    vertical-align: top;
}
.fga-quiz__consent-check:checked {
    background: #7FAE48;
    border-color: #7FAE48;
}
.fga-quiz__consent-check:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    font-size: 14px;
    color: #0F1117;
    font-weight: 700;
    line-height: 1;
}
.fga-quiz__consent-label a {
    color: #7FAE48;
    text-decoration: underline;
}
