/**
 * Assessment Styles
 * Matches FFoA LMS design tokens
 */

/* ============================================
   HEADER
   ============================================ */
.assess-header {
    background: linear-gradient(135deg, #3F4F6E 0%, #1F2B3F 100%);
    color: white;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.assess-header__container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.assess-header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.assess-header__back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.assess-header__back:hover {
    color: #C2B97F;
}

.assess-header__title h1 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.assess-header__title p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* Timer */
.assess-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: "Helvetica Neue", Arial, monospace;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

.assess-timer.is-warning {
    background: rgba(255, 165, 0, 0.3);
    color: #FFD580;
}

.assess-timer.is-critical {
    background: rgba(220, 53, 69, 0.3);
    color: #FF8A8A;
    animation: timer-pulse 1s infinite;
}

@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.assess-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ============================================
   CARDS
   ============================================ */
.assess-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.assess-card--success {
    border-left: 4px solid #28A745;
}

.assess-card--warning {
    border-left: 4px solid #FFA500;
}

.assess-card--alert {
    border-left: 4px solid #17A2B8;
}

.assess-card__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.assess-card__header h3 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3F4F6E;
    margin: 0;
}

.assess-card__body {
    padding: 1.5rem;
}

.assess-card__body--table {
    padding: 0;
    overflow-x: auto;
}

/* ============================================
   ALERTS
   ============================================ */
.assess-alert,
.assess-passed-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
}

.assess-alert i,
.assess-passed-banner i {
    font-size: 1.5rem;
    color: #C2B97F;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.assess-passed-banner i {
    color: #28A745;
}

.assess-alert strong,
.assess-passed-banner strong {
    display: block;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    color: #3F4F6E;
    margin-bottom: 0.25rem;
}

.assess-alert p,
.assess-passed-banner p {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============================================
   DESCRIPTION
   ============================================ */
.assess-description {
    color: #374151;
    line-height: 1.7;
    font-size: 1rem;
}

.assess-description p:last-child {
    margin-bottom: 0;
}

.assess-text-muted {
    color: #9ca3af;
}

/* ============================================
   INFO BADGES
   ============================================ */
.assess-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.assess-info-badge {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.25rem 1rem;
    text-align: center;
    border-top: 3px solid #C2B97F;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.assess-info-badge i {
    font-size: 1.25rem;
    color: #C2B97F;
    margin-bottom: 0.25rem;
}

.assess-info-badge__value {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3F4F6E;
    line-height: 1;
}

.assess-info-badge__label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================
   TABLE
   ============================================ */
.assess-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.assess-table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.assess-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.assess-table tbody tr:hover {
    background: #f9fafb;
}

/* Badges */
.assess-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.assess-badge--pass {
    background: #D1FAE5;
    color: #065F46;
}

.assess-badge--fail {
    background: #FEE2E2;
    color: #991B1B;
}

.assess-badge--pending {
    background: #FEF3C7;
    color: #92400E;
}

/* ============================================
   BUTTONS
   ============================================ */
.assess-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.assess-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.assess-btn--primary {
    background: #C2B97F;
    color: white;
    border-color: #C2B97F;
}

.assess-btn--primary:hover:not(:disabled) {
    background: #A89F6A;
    border-color: #A89F6A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(194, 185, 127, 0.3);
}

.assess-btn--secondary {
    background: white;
    color: #3F4F6E;
    border-color: #e5e7eb;
}

.assess-btn--secondary:hover:not(:disabled) {
    border-color: #C2B97F;
    color: #C2B97F;
    background: #fffbf5;
}

.assess-btn--lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ============================================
   ACTIONS
   ============================================ */
.assess-actions {
    text-align: center;
    padding: 1rem 0;
}

/* ============================================
   QUIZ PROGRESS
   ============================================ */
.assess-quiz-progress {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 60px;
    z-index: 100;
}

.assess-quiz-progress__text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

.assess-quiz-progress__bar {
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.assess-quiz-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #C2B97F 0%, #B5A070 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* ============================================
   QUESTIONS
   ============================================ */
.assess-question {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.assess-question.is-correct {
    border-color: #28A745;
}

.assess-question.is-incorrect {
    border-color: #DC3545;
}

.assess-question.is-pending {
    border-color: #FFA500;
}

.assess-question__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.assess-question__number {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    color: #3F4F6E;
    font-size: 0.9rem;
}

.assess-question__points {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
}

.assess-question__text {
    padding: 1.25rem 1.5rem 1rem;
    font-size: 1.05rem;
    color: #3F4F6E;
    line-height: 1.6;
    font-weight: 500;
}

.assess-question__answers {
    padding: 0 1.5rem 1.5rem;
}

/* Radio/checkbox options */
.assess-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.assess-option:hover {
    border-color: #C2B97F;
    background: #fdfcf5;
}

.assess-option:has(input:checked) {
    border-color: #C2B97F;
    background: #FFF7ED;
}

.assess-option__input {
    appearance: none;
    width: 0;
    height: 0;
    position: absolute;
    opacity: 0;
}

.assess-option__marker {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
    position: relative;
}

.assess-option__input:checked + .assess-option__marker {
    border-color: #C2B97F;
    background: #C2B97F;
}

.assess-option__input:checked + .assess-option__marker::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.assess-option__text {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

/* Feedback states for options */
.assess-option.is-correct {
    border-color: #28A745;
    background: #D1FAE5;
}

.assess-option.is-incorrect {
    border-color: #DC3545;
    background: #FEE2E2;
}

.assess-option.is-correct-answer {
    border-color: #28A745;
    background: #ECFDF5;
}

.assess-option.is-correct .assess-option__marker,
.assess-option.is-correct-answer .assess-option__marker {
    border-color: #28A745;
    background: #28A745;
}

.assess-option.is-incorrect .assess-option__marker {
    border-color: #DC3545;
    background: #DC3545;
}

/* Fill in blank */
.assess-fill-blank__input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #3F4F6E;
    transition: border-color 0.2s;
}

.assess-fill-blank__input:focus {
    outline: none;
    border-color: #C2B97F;
    box-shadow: 0 0 0 3px rgba(194, 185, 127, 0.1);
}

.assess-fill-blank__input.is-correct {
    border-color: #28A745;
    background: #D1FAE5;
}

.assess-fill-blank__input.is-incorrect {
    border-color: #DC3545;
    background: #FEE2E2;
}

/* Essay */
.assess-essay__input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #3F4F6E;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.assess-essay__input:focus {
    outline: none;
    border-color: #C2B97F;
    box-shadow: 0 0 0 3px rgba(194, 185, 127, 0.1);
}

/* Question feedback */
.assess-question__feedback {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assess-question__feedback--correct {
    background: #D1FAE5;
    color: #065F46;
}

.assess-question__feedback--incorrect {
    background: #FEE2E2;
    color: #991B1B;
}

.assess-question__feedback--pending {
    background: #FEF3C7;
    color: #92400E;
}

/* ============================================
   QUIZ ACTIONS
   ============================================ */
.assess-quiz-actions {
    text-align: center;
    padding: 1.5rem 0;
}

/* ============================================
   RESULTS: SCORE CARD
   ============================================ */
.assess-score-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.assess-score-card__circle {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.assess-score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.assess-score-ring__bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.assess-score-ring__fill {
    fill: none;
    stroke: #C2B97F;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease;
}

.assess-score-ring__fill.is-pass {
    stroke: #28A745;
}

.assess-score-ring__fill.is-fail {
    stroke: #DC3545;
}

.assess-score-card__value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #3F4F6E;
}

.assess-score-card__info h2 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #3F4F6E;
    margin: 0 0 0.5rem 0;
}

.assess-score-card__info p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.assess-score-card__stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.assess-score-card__stats span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.assess-score-card__stats i {
    color: #C2B97F;
}

/* ============================================
   RESULTS: QUESTION REVIEW
   ============================================ */
.assess-results-questions {
    margin-bottom: 2rem;
}

.assess-results-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .assess-header__title h1 {
        font-size: 0.95rem;
        max-width: 200px;
    }

    .assess-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .assess-score-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }

    .assess-score-card__stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .assess-quiz-progress {
        top: 52px;
    }

    .assess-main {
        padding: 1.5rem 1rem 3rem;
    }
}

@media (max-width: 480px) {
    .assess-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .assess-info-badge {
        padding: 1rem 0.75rem;
    }

    .assess-info-badge__value {
        font-size: 1.25rem;
    }

    .assess-btn--lg {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }

    .assess-results-actions {
        flex-direction: column;
    }

    .assess-results-actions .assess-btn {
        width: 100%;
    }
}
