/* assessment.css */

.assessment-page {
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.assessment-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 60px 20px;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar-bg {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--hover-blue);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
    text-align: right;
    font-weight: 600;
}

.question-card {
    display: none;
    animation: fadeIn 0.4s ease;
}

.question-card.active {
    display: block;
}

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

.section-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--hover-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.question-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 8px;
    display: flex;
    gap: 16px;
}

.question-number {
    flex-shrink: 0;
}

.question-desc {
    font-size: 15px;
    color: #9CA3AF; /* Light grey like in the screenshot */
    margin-bottom: 50px;
    margin-left: 36px; /* Align with text, assuming number is ~20px + gap */
}

/* Custom Slider Styling to match screenshot */
.slider-container {
    margin-left: 36px;
    margin-bottom: 40px;
    position: relative;
    padding: 0 15px;
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    outline: none;
    padding: 0;
    margin: 0;
}

/* We will use a background gradient dynamically to color the left side green */
.range-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    cursor: pointer;
    background: transparent; /* rely on input background */
    border-radius: 6px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: #10B981; /* Green thumb */
    cursor: pointer;
    margin-top: -10px; /* Center thumb on track */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    /* 3 vertical lines */
    background-image: linear-gradient(to right, transparent 40%, white 40%, white 45%, transparent 45%, transparent 48%, white 48%, white 52%, transparent 52%, transparent 55%, white 55%, white 60%, transparent 60%);
}

.range-slider::-moz-range-thumb {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: #10B981;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background-image: linear-gradient(to right, transparent 40%, white 40%, white 45%, transparent 45%, transparent 48%, white 48%, white 52%, transparent 52%, transparent 55%, white 55%, white 60%, transparent 60%);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 500;
}

.slider-labels span {
    text-align: center;
    width: 30px;
    cursor: pointer;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    margin-left: 36px;
    border-top: 1px solid #F3F4F6;
    padding-top: 30px;
}

.btn-next {
    background: #10B981; /* Green button matching slider */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-next:hover {
    background: #059669;
}

.btn-prev {
    background: transparent;
    color: var(--text-sub);
    border: 1px solid #E5E7EB;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-prev:hover {
    background: #F9FAFB;
    color: var(--text-main);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .assessment-container {
        padding: 30px 20px;
    }

    .progress-container {
        margin-bottom: 30px;
    }

    .question-title {
        font-size: 18px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .question-desc {
        font-size: 14px;
        margin-left: 0;
        margin-bottom: 30px;
    }

    .slider-container {
        margin-left: 0;
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .slider-labels span {
        font-size: 12px;
        flex: 1;
    }

    .slider-labels span small {
        display: none; /* Hide detailed labels on mobile to prevent overlap */
    }

    .question-actions {
        margin-left: 0;
        padding-top: 20px;
        margin-top: 30px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .btn-next, .btn-prev {
        padding: 12px 16px;
        font-size: 14px;
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
        justify-content: center;
    }

    .site-header {
        position: relative;
        padding: 15px 0;
        background: #FFFFFF !important;
        border-bottom: 1px solid var(--border-light);
    }

    .site-header .nav {
        flex-direction: column;
        gap: 12px;
    }

    .site-logo {
        height: 35px !important;
    }

    /* Adjust the specific instructions card */
    .question-card[data-index="0"] .question-title {
        font-size: 20px;
        text-align: center;
    }

    .question-card[data-index="0"] .question-desc {
        text-align: left;
    }

    .question-card[data-index="0"] .question-actions {
        flex-direction: column;
    }
    
    .question-card[data-index="0"] .btn-next {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 480px) {
    .question-title {
        font-size: 16px;
    }

    .assessment-container {
        padding: 20px 15px;
    }

    .site-header .nav div {
        flex-direction: column;
        gap: 8px !important;
        text-align: center;
    }

    .site-header .nav span {
        font-size: 11px;
    }
    
    .btn-next, .btn-prev {
        flex: 1 1 100%; /* Stack on very small screens */
    }
}
