/* --- Syllabus Manager Wrapper --- */
#aiginex-syllabus-manager-wrapper {
    margin: 20px 0;
    border: 1px solid #ccd0d4;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

/* --- Navigation Tabs --- */
#aiginex-manager-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ccd0d4;
    background: #f6f7f7;
    padding: 10px 10px 0 10px;
}

.nav-tab {
    background: #e9eaeb;
    border: 1px solid #ccc;
    border-bottom: 0;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: -1px; /* Overlaps bottom border */
    border-radius: 4px 4px 0 0;
    color: #444;
}

.nav-tab:hover {
    background: #f0f0f1;
}

.nav-tab.nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #000;
}

/* --- Content Area --- */
#aiginex-manager-content {
    padding: 20px;
    min-height: 300px;
}

#aiginex-loader {
    font-size: 1.2em;
    color: #555;
}

/* --- Forms and Tables --- */
.aiginex-form-container {
    border: 1px solid #e0e0e0;
    padding: 0 20px 20px 20px;
    margin-bottom: 20px;
    background: #fdfdfd;
}

.aiginex-list-container {
    border: 1px solid #e0e0e0;
    padding: 20px;
    background: #fdfdfd;
}

.aiginex-form-container h3,
.aiginex-list-container h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 10px;
}

/* AJAX Response Messages */
#aiginex-class-form-response .notice {
    margin: 10px 0 0 0;
}

.button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}
.button-danger:hover {
    background: #b02a2c;
    border-color: #b02a2c;
    color: #fff;
}

/*
 * --- STYLES FOR SYLLABUS VIEWER [aiginex_syllabus_viewer] ---
 */

#aiginex-syllabus-viewer-wrapper {
    margin: 20px 0;
    border: 1px solid #ccd0d4;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

/* --- Viewer Filters --- */
#aiginex-syllabus-viewer-filters {
    padding: 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #ccd0d4;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #333;
}
.filter-group select {
    min-width: 200px;
}

/* --- Viewer Results Area --- */
#aiginex-viewer-results {
    padding: 10px 30px 30px 30px;
}

.aiginex-syllabus-report-header {
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}
.aiginex-syllabus-report-header h2 {
    font-size: 24px;
    margin: 0;
}
.aiginex-syllabus-report-header h3 {
    font-size: 20px;
    margin: 5px 0 0 0;
    color: #444;
}
.aiginex-syllabus-report-header h4 {
    font-size: 18px;
    margin: 5px 0 0 0;
    color: #666;
}

.subject-syllabus-block {
    margin-bottom: 20px;
    /* This CSS is important for printing */
    page-break-inside: avoid;
}

.subject-syllabus-block .subject-title {
    font-size: 22px;
    background: #444;
    color: #fff;
    padding: 10px 15px;
    margin: 20px 0 15px 0;
    border-radius: 4px;
}

.syllabus-section {
    margin-bottom: 25px;
    padding-left: 15px;
}

.syllabus-section h4 {
    font-size: 18px;
    color: #222;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.topics-section ul {
    list-style-type: disc;
    margin-left: 20px;
}
.topics-section ul li {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.marks-dist-table {
    margin-top: 10px;
}
.marks-dist-table th {
    background: #f9f9f9;
}

/* --- ALIGNMENT FIX: Right align Marks Format (2) and Total Marks (3) --- */
.marks-dist-table th:nth-child(2), 
.marks-dist-table td:nth-child(2), 
.marks-dist-table th:nth-child(3), 
.marks-dist-table td:nth-child(3) {
    text-align: right;
}

/* Ensure the first column (Pattern Details) stays left-aligned */
.marks-dist-table th:first-child, 
.marks-dist-table td:first-child {
    text-align: left;
}

.marks-dist-table tr.total-row td {
    border-top: 2px solid #999;
    font-size: 16px;
}

/* This is the page break div, invisible by default */
.aiginex-print-page-break {
    display: none;
}