/* Shared styles for all test player components (MathTest, PracticeTest, etc.) */

/* === OVERLAY & CONTAINER === */

.practice-test-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: practiceTestFadeIn 0.2s ease-out;
    padding: 1rem;
}

@keyframes practiceTestFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.practice-test-container {
    background: var(--bg-secondary);
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* === HEADER === */

.practice-test-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.practice-test-progress-container {
    flex: 1;
    max-width: 400px;
}

.practice-test-progress-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.practice-test-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.practice-test-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* === CONTENT AREA === */

.practice-test-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.practice-test-question-number {
    color: var(--accent-blue);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.practice-test-question {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* === FEEDBACK SECTION === */

.practice-test-feedback {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid;
}

.practice-test-feedback.correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-green);
}

.practice-test-feedback.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
}

.practice-test-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.practice-test-feedback.correct .practice-test-feedback-header {
    color: var(--accent-green);
}

.practice-test-feedback.incorrect .practice-test-feedback-header {
    color: var(--accent-danger);
}

.practice-test-explanation {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
    white-space: pre-line;
}

/* === FOOTER & CONTROLS === */

.practice-test-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-top: 1px solid var(--border-primary);
    gap: 1rem;
    flex-wrap: wrap;
}

.practice-test-footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-practice-tts {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.btn-practice-tts:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    transform: scale(1.05);
}

.btn-practice-tts.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: #60a5fa;
}

.btn-practice-tts.active:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.btn-practice-tts i {
    font-size: 18px;
}

.practice-test-score {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.practice-test-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.practice-test-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    width: 100%;
    order: 3;
}

/* === SUMMARY SCREEN === */

.practice-test-summary {
    background: var(--bg-secondary);
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    padding: 3rem;
    position: relative;
    text-align: center;
}

.practice-test-summary .practice-test-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.practice-test-summary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.practice-test-summary-icon {
    font-size: 5rem;
    color: var(--accent-green);
}

.practice-test-summary h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.practice-test-summary-score {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.practice-test-summary-score-main {
    color: var(--text-primary);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.practice-test-summary-score-percent {
    color: var(--accent-green);
    font-size: 2rem;
    font-weight: 600;
}

.practice-test-summary-message {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 400px;
}

.practice-test-summary-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* === MOBILE RESPONSIVE === */

@media (max-width: 768px) {
    .practice-test-container {
        max-height: 95vh;
    }

    .practice-test-content {
        padding: 1.5rem;
    }

    .practice-test-question {
        font-size: 1.25rem;
    }

    .practice-test-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .practice-test-footer-left {
        justify-content: center;
    }

    .practice-test-score {
        text-align: center;
    }

    .practice-test-controls {
        justify-content: center;
    }

    .practice-test-summary {
        padding: 2rem 1.5rem;
    }

    .practice-test-summary h2 {
        font-size: 2rem;
    }

    .practice-test-summary-score-main {
        font-size: 3rem;
    }

    .practice-test-summary-actions {
        flex-direction: column;
        width: 100%;
    }

    .practice-test-summary-actions .btn {
        width: 100%;
    }
}
