/* ==================== EXAM ANALYSIS RESPONSIVE STYLES ==================== */

/* Table Card Container */
.table-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
}

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
}

/* Modern Table Styles */
.modern-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;
}

.modern-table thead {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
}

.modern-table thead th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.modern-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.modern-table tbody tr:hover {
    background-color: #f8fafc;
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody td {
    padding: 10px 8px;
    color: var(--text-light);
    font-size: 13px;
}

/* Exam Analysis Specific Styles */
#examAnalysisSection {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

#examAnalysisContent {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

#examAnalysisContent .table-card {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

#examAnalysisContent .table-responsive {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

#examAnalysisContent .modern-table {
    min-width: 500px;
    max-width: 100%;
}

/* Grade Level Header Responsive */
.grade-level-header {
    flex-wrap: wrap !important;
    gap: 15px !important;
}

.grade-level-header>div {
    flex: 1;
    min-width: 250px;
}

/* Section Header Responsive */
#examAnalysisSection .section-header {
    flex-wrap: wrap;
    gap: 15px;
}

#examAnalysisSection .section-header>div {
    flex: 1;
    min-width: 200px;
}

/* Filter Bar Responsive */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.btn-filter {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* Responsive Design for Smaller Screens */
@media (max-width: 1200px) {
    #examAnalysisContent .modern-table {
        font-size: 13px;
    }

    #examAnalysisContent .modern-table thead th,
    #examAnalysisContent .modern-table tbody td {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .grade-level-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .grade-level-header>div {
        width: 100%;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }
}

/* Content Section Styles */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h1 i {
    color: var(--primary);
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary);
}

.section-header p {
    color: var(--text-gray);
    font-size: 14px;
}