/* ========== INSTAPTEST SPECIFIC STYLES ========== */

/* Grid layouts for Mathematics B */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Test Interface Styling */
.test-interface {
    min-height: 100vh;
    background: var(--js-light);
}

/* Progress Container */
.progress-container {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-text {
    color: var(--js-dark);
    font-size: 1.1rem;
}

.time-remaining {
    color: var(--js-primary);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--js-gray-100);
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--js-primary), var(--js-success));
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.domain-indicator {
    text-align: center;
    margin-top: 0.5rem;
}

.current-domain {
    background: var(--js-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Question Container */
.question-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--js-gray-100);
    padding-bottom: 1rem;
}

.question-title {
    color: var(--js-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.question-domain {
    background: var(--js-info);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.question-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--js-dark);
}

.question-content p {
    margin-bottom: 1rem;
}

.question-content .math-formula {
    background: var(--js-gray-50);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
}

/* Answer Section */
.answer-section {
    margin-bottom: 2rem;
}

.answer-label {
    display: block;
    font-weight: 600;
    color: var(--js-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.answer-input {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    border: 2px solid var(--js-gray-100);
    border-radius: 0.5rem;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: var(--js-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.answer-hint {
    font-size: 0.9rem;
    color: var(--js-neutral);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Question Navigation */
.question-navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.question-navigation .btn {
    min-width: 120px;
}

/* Domain Stats */
.domain-stats {
    background: rgba(37, 99, 235, 0.1);
    color: var(--js-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

/* Results Section */
.results-section {
    background: var(--js-light);
    min-height: 100vh;
}

.overall-score-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-display {
    margin-bottom: 1.5rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--js-primary);
    line-height: 1;
}

.score-label {
    font-size: 1.2rem;
    color: var(--js-neutral);
    margin-top: 0.5rem;
}

.score-interpretation {
    font-size: 1.1rem;
    color: var(--js-dark);
    max-width: 600px;
    margin: 0 auto;
}

/* Domain Scores */
.domain-scores {
    margin-bottom: 2rem;
}

.domain-scores h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--js-dark);
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.domain-score-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.domain-score-card h4 {
    color: var(--js-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.domain-percentage {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.domain-percentage.excellent { color: var(--js-success); }
.domain-percentage.good { color: var(--js-info); }
.domain-percentage.average { color: var(--js-warning); }
.domain-percentage.poor { color: var(--js-accent); }

.domain-feedback {
    font-size: 0.9rem;
    color: var(--js-neutral);
    margin-top: 1rem;
    font-style: italic;
}

/* Detailed Report */
.detailed-report {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.detailed-report h3 {
    color: var(--js-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.report-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--js-gray-100);
}

.report-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.report-section h4 {
    color: var(--js-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.report-section ul {
    margin-left: 1.5rem;
}

.report-section li {
    margin-bottom: 0.5rem;
    color: var(--js-dark);
}

.strength-item {
    color: var(--js-success);
    font-weight: 600;
}

.weakness-item {
    color: var(--js-accent);
    font-weight: 600;
}

.recommendation-item {
    color: var(--js-info);
    font-weight: 600;
}

/* Result Actions */
.result-actions {
    text-align: center;
    margin-top: 2rem;
}

.result-actions .btn {
    margin: 0 0.5rem;
}

/* Button Variants */
.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-outline {
    background: transparent;
    color: var(--js-primary);
    border: 2px solid var(--js-primary);
}

.btn-outline:hover {
    background: var(--js-primary);
    color: white;
}

/* Time Warning */
.time-warning {
    color: var(--js-accent) !important;
    animation: pulse 1s infinite;
}

/* Time Overtime */
.time-overtime {
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.15) !important;
    animation: flash 1s infinite;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 0.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes flash {
    0%, 100% { background: rgba(220, 38, 38, 0.15); }
    50% { background: rgba(220, 38, 38, 0.25); }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--js-primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .progress-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .question-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .question-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .question-navigation .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .domain-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Print Styles */
@media print {
    .navigation,
    .result-actions,
    .btn {
        display: none;
    }
    
    .results-section {
        background: white;
    }
    
    .overall-score-card,
    .domain-score-card,
    .detailed-report {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Time Feedback Styling */
.time-feedback-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.time-feedback-card.positive {
    border-left: 5px solid var(--js-success);
}

.time-feedback-card.negative {
    border-left: 5px solid var(--js-accent);
}

.time-feedback-card .time-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.time-feedback-card h4 {
    margin-bottom: 1rem;
    color: var(--js-dark);
}

.time-feedback-card p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.time-advice {
    background: var(--js-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    text-align: left;
}

.time-advice strong {
    color: var(--js-primary);
}

.time-advice ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.time-advice li {
    margin-bottom: 0.5rem;
}

.time-advice a {
    color: var(--js-primary);
    text-decoration: none;
    font-weight: 600;
}

.time-advice a:hover {
    text-decoration: underline;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .test-interface {
        background: var(--js-gray-900);
    }
    
    .results-section {
        background: white !important;
        color: var(--js-dark);
    }
    
    .progress-container,
    .question-container,
    .overall-score-card,
    .domain-score-card,
    .detailed-report,
    .time-feedback-card {
        background: var(--js-gray-100);
        color: var(--js-dark);
    }
}
/* ========== NIEUWE ANALYSE STYLING ========== */

/* Learning Advice Component */
.learning-advice {
    margin-top: 1.5rem;
}

.level-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advice-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--js-dark);
}

.advice-text strong {
    color: var(--js-primary);
    font-weight: 600;
}

/* Domain Evaluation Cards */
.domain-evaluation-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--js-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.domain-evaluation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--js-gray-100);
}

.domain-header h4 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--js-dark);
}

.domain-summary {
    background: var(--js-light);
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.domain-summary p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--js-dark);
}

.domain-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-section {
    padding: 1rem;
    border-left: 3px solid var(--js-info);
    background: rgba(8, 145, 178, 0.05);
    border-radius: 0.5rem;
}

.detail-section strong {
    color: var(--js-primary);
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.75rem;
}

.detail-section p {
    margin: 0.5rem 0 0 0;
    line-height: 1.7;
    color: var(--js-neutral);
}

.detail-section ul {
    margin: 0.75rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.detail-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--js-neutral);
}

/* Report Summary Styling */
.report-summary {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--js-light);
    border-radius: 0.75rem;
    text-align: center;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--js-neutral);
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--js-primary);
}

.next-steps-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--js-neutral);
}

.action-buttons a {
    text-decoration: none;
}

/* Mobile responsiveness for new components */
@media (max-width: 768px) {
    .domain-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .domain-percentage {
        align-self: flex-end;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column !important;
    }
    
    .action-buttons a {
        width: 100%;
    }
}

/* ========== PRINTBARE RAPPORT STYLING ========== */

/* Report Header */
.report-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--js-dark);
}

.report-logo img {
    max-height: 60px;
    width: auto;
}

.report-title-block {
    flex: 1;
}

.report-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--js-dark);
    margin: 0 0 0.5rem 0;
}

.report-date {
    font-size: 1rem;
    color: var(--js-neutral);
}

/* Report Intro */
.report-intro {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.report-intro p {
    margin-bottom: 1rem;
    color: var(--js-neutral);
}

/* Total Score Box */
.total-score-box {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid var(--js-dark);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.score-label-inline {
    font-size: 1.1rem;
    color: var(--js-dark);
    font-weight: 500;
}

.score-value-inline {
    font-size: 2rem;
    font-weight: 700;
    color: var(--js-primary);
}

/* Domain Table Introduction */
.domain-table-intro {
    margin-bottom: 1.5rem;
}

.domain-table-intro p {
    line-height: 1.7;
    color: var(--js-neutral);
}

/* Domain Scores Table */
.domain-table-container {
    margin-bottom: 2rem;
}

.domain-scores-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--js-gray-200);
}

.domain-scores-table thead {
    background: var(--js-dark);
    color: white;
}

.domain-scores-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--js-dark);
}

.domain-scores-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--js-gray-200);
    color: var(--js-neutral);
}

.domain-scores-table tbody tr:nth-child(even) {
    background: var(--js-gray-50);
}

/* Learning Advice Section */
.learning-advice-section {
    margin-bottom: 3rem;
}

.advice-heading {
    font-size: 1.3rem;
    color: var(--js-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.advice-content {
    line-height: 1.8;
    color: var(--js-neutral);
}

.advice-content p {
    margin-bottom: 1rem;
}

/* Page Break for Print */
.page-break {
    page-break-before: always;
    margin: 3rem 0;
    border-top: 2px solid var(--js-gray-200);
}

@media screen {
    .page-break {
        margin: 4rem 0;
    }
}

/* Domain Evaluations Section (Page 2) */
.domain-evaluations-section {
    margin-top: 2rem;
}

.evaluations-title {
    font-size: 1.6rem;
    color: var(--js-dark);
    margin-bottom: 2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--js-dark);
    padding-bottom: 0.75rem;
}

.domain-evaluation-section {
    margin-bottom: 2.5rem;
    page-break-inside: avoid;
}

.domain-evaluation-title {
    font-size: 1.2rem;
    color: var(--js-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.evaluation-block {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.evaluation-block p {
    color: var(--js-neutral);
}

.evaluation-block strong {
    color: var(--js-dark);
}

.evaluation-block ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.evaluation-block li {
    margin-bottom: 0.5rem;
    color: var(--js-neutral);
}

/* No Print Elements */
@media print {
    /* Verberg alles behalve de resultaten sectie */
    body > *:not(.results-section),
    .no-print,
    .navigation,
    nav,
    .hero,
    #overzicht,
    #instructies,
    .test-interface {
        display: none !important;
    }
    
    /* Alleen results-section tonen */
    .results-section {
        display: block !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .page-break {
        page-break-before: always;
        border: none;
        margin: 0;
    }
    
    body {
        background: white;
        margin: 0;
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 1cm;
    }
    
    .domain-evaluation-section {
        page-break-inside: avoid;
    }
    
    /* Ensure clean borders in print */
    .domain-scores-table,
    .domain-scores-table th,
    .domain-scores-table td {
        border-color: #000 !important;
    }
    
    /* Logo zichtbaar in print */
    .report-logo img {
        display: block !important;
        max-height: 60px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .total-score-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .domain-scores-table {
        font-size: 0.9rem;
    }
    
    .domain-scores-table th,
    .domain-scores-table td {
        padding: 0.5rem;
    }
}
