/* ═══════════════════════════════════════════════
   TMFC Clinical Quiz — Premium Frontend Styles
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Spin animation ── */
@keyframes tmfc-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tmfc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes tmfc-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tmfc-pulse {

    0%,
    100% {  
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}
 
/* ── Wrapper ── */
.tmfc-quiz-wrapper {
    --tmfc-primary: #029382;
    --tmfc-secondary: #5a8a89;
    --tmfc-primary-light: #77a5a415;
    --tmfc-bg: #ffffff;
    --tmfc-text: #2d3748;
    --tmfc-text-light: #718096;
    --tmfc-border: #e2e8f0;
    --tmfc-radius: 16px;
    --tmfc-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --tmfc-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 100%;
    margin: 0px auto;
    /*font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;*/
    color: var(--tmfc-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Progress ── */
.tmfc-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.tmfc-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--tmfc-border);
    border-radius: 3px;
    overflow: hidden;
}

.tmfc-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--tmfc-primary), var(--tmfc-secondary));
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tmfc-step-counter {
    font-size: 13px;
    font-weight: 600;
    color: var(--tmfc-text-light);
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

.tmfc-current-step {
    color: var(--tmfc-primary);
    font-weight: 700;
}

/* ── Screens ── */
.tmfc-screen {
    display: none;
    background: var(--tmfc-bg);
    border-radius: var(--tmfc-radius);
    box-shadow: var(--tmfc-shadow);
    overflow: hidden;
}

.tmfc-screen.active {
    display: block;
    animation: tmfc-fadeInUp 0.4s ease-out;
}

.tmfc-screen-inner {
    padding: 40px 36px;
}

/* ── Intro Screen ── */
.tmfc-intro-heading {
    font-size: 26px !important;
    /*font-weight: 700;*/
    line-height: 1.3 !important;
    margin: 0 0 12px 0;
    color: var(--tmfc-text);
}

.tmfc-intro-text {
    font-size: 15px;
    color: var(--tmfc-text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.tmfc-intro-text p {
    margin: 0 0 10px;
}

/* ── Lead Capture ── */
.tmfc-lead-heading {
    font-size: 22px !important;
    /*font-weight: 700;*/
    margin: 0 0 6px;
}

.tmfc-lead-subtext {
    color: var(--tmfc-text-light);
    margin: 0 0 24px;
    font-size: 14px;
}

.tmfc-lead-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.tmfc-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--tmfc-text);
}

.tmfc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--tmfc-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
    background: #fff;
}

.tmfc-input:focus {
    border-color: var(--tmfc-primary);
    box-shadow: 0 0 0 3px var(--tmfc-primary-light);
}

.tmfc-input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

textarea.tmfc-input {
    resize: vertical;
}

/* ── Questions ── */
.tmfc-question-text {
    /*font-size: 20px !important;*/
    /*font-weight: 700;*/
    line-height: 1.4;
    margin: 0 0 8px;
    font-family: var(--h2_typography-font-family);
}

.tmfc-question-desc {
    font-size: 14px;
    color: var(--tmfc-text-light);
    margin: 0 0 20px;
    line-height: 1.5;
}

.tmfc-question-img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ── Options ── */
.tmfc-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.tmfc-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--tmfc-border);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-family: inherit;
    color: var(--tmfc-text);
    transition: all 0.2s ease;
    position: relative;
}

.tmfc-option-btn:hover {
    border-color: var(--tmfc-primary);
    background: var(--tmfc-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tmfc-option-btn.selected {
    border-color: var(--tmfc-primary);
    background: var(--tmfc-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tmfc-option-check {
    display: none;
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
}

.tmfc-option-btn.selected .tmfc-option-check {
    display: inline;
}

.tmfc-option-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.tmfc-option-label {
    flex: 1;
    font-weight: 500;
}

/* ── Text Input ── */
.tmfc-text-input-wrap {
    margin-top: 16px;
}

/* ── Navigation ── */
.tmfc-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 0 4px;
}

.tmfc-nav-spacer {
    flex: 1;
}

/* ── Buttons ── */
.tmfc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    /*font-weight: 600;*/
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tmfc-btn-primary {
    background: var(--tmfc-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tmfc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
    color: #fff;
}
.tmfc-btn-outline {
        background: #fff;
    color: var(--tmfc-text-light);
    border: 2px solid var(--tmfc-border);
}

.tmfc-btn-outline:hover {
    border-color: var(--tmfc-text-light);
    color: var(--tmfc-text);
}

/* ── Result Screen ── */
.tmfc-result-screen .tmfc-screen-inner { 
    text-align: center;
    padding: 48px 36px;
}

.tmfc-result-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: tmfc-pulse 2s ease-in-out infinite;
}

.tmfc-result-title {
    font-size: 24px !important;
    font-family: var(--h2_typography-font-family);
    /*font-weight: 700;*/
    margin: 0 0 16px;
    color: var(--tmfc-primary);
}

.tmfc-result-description {
    font-size: 15px;
    color: var(--tmfc-text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.tmfc-result-description p {
    margin: 0 0 12px;
}

.tmfc-result-recommendation {
    background: var(--tmfc-primary-light);
    border-left: 4px solid var(--tmfc-primary);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--tmfc-text);
}

.tmfc-result-recommendation:empty {
    display: none;
}

.tmfc-result-recommendation p {
    margin: 0 0 8px;
}

.tmfc-result-cta {
    margin-top: 8px;
    padding: 14px 36px;
    font-size: 16px;
}

/* ── Validation ── */
.tmfc-shake {
    animation: tmfc-shake 0.4s ease;
}

@keyframes tmfc-shake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(4px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-6px);
    }

    40%,
    60% {
        transform: translateX(6px);
    }
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .tmfc-quiz-wrapper {
        /*margin: 20px 12px;*/
    }

    .tmfc-screen-inner {
        padding: 28px 20px;
    }

    .tmfc-intro-heading {
        font-size: 22px !important;
    }

    .tmfc-question-text {
        font-size: 18px;
    }

    .tmfc-option-btn {
        padding: 12px 14px;
        font-size: 14px;
    }

    .tmfc-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .tmfc-result-screen .tmfc-screen-inner {
        padding: 32px 20px;
    }
}

.tmfc-result-recommendation p:last-child {
    margin-bottom: 0;
}


.tmfc-lead-form input::-webkit-input-placeholder { color: #999; }
.tmfc-lead-form input:-ms-input-placeholder { color: #999; }
.tmfc-lead-form input::-ms-input-placeholder { color: #999; }
.tmfc-lead-form input::placeholder { color: #999; }

.tmfc-lead-form input:focus::placeholder {
  color: transparent;
}
