/* General Tabs CSS */
.eze-lp-container { max-width: 900px; margin: 0 auto; }
.eze-tabs { display: flex; border-bottom: 2px solid #ccc; margin-bottom: 20px; overflow-x: auto; }
.eze-tab-button { padding: 10px 15px; cursor: pointer; border: 1px solid transparent; border-bottom: none; background-color: #f1f1f1; margin-bottom: -2px; font-weight: bold; color: #555; transition: background-color 0.3s, color 0.3s; white-space: nowrap; }
.eze-tab-button.active { background-color: #fff; border: 1px solid #ccc; border-bottom: 2px solid #fff; color: #000; }
.eze-tab-content { display: none; padding: 10px 0; border: none; }
.eze-tab-content.active { display: block; }

/* Utility Styles */
.table-responsive { overflow-x: auto; width: 100%; }
.lesson-plan-table { min-width: 700px; }
.lessonPlanContent { white-space: pre-wrap; cursor: pointer; }
.masterPlanContent { white-space: pre-wrap; font-size: 13px; }
.message-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #4CAF50; color: white; padding: 15px; border-radius: 5px; z-index: 1000; display: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1001; display: none; }
.loading-spinner { border: 8px solid #f3f3f3; border-top: 8px solid #3498db; border-radius: 50%; width: 60px; height: 60px; animation: spin 2s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.modal { display: none; position: fixed; z-index: 1; padding-top: 100px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); }
.modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 8px; position: relative; }
.close-button { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; }
.close-button:hover, .close-button:focus { color: #000; text-decoration: none; cursor: pointer; }
.assignment-selectors { display: flex; flex-direction: column; gap: 15px; padding: 10px; border: 1px dashed #ccc; margin-top: 10px; background: #f9f9f9; }
.assignment-selectors label { display: block; margin-bottom: 5px; font-weight: bold; }
.section-checkboxes { display: flex; flex-wrap: wrap; gap: 10px 20px; }
#assignMasterPlanContainer { margin-top: 15px; border: 1px solid #ddd; padding: 10px; max-height: 400px; overflow-y: auto; }
.master-plan-select-row:hover { background-color: #f9f9f9; }
.master-plan-select-row.selected { background-color: #e8f4f8 !important; }
.lp-select-check { transform: scale(1.2); cursor: pointer; }
.lp-assign-date { width: 100%; padding: 5px; border: 1px solid #ccc; border-radius: 3px; }

/* Batch Upload Tools Styles */
.batch-upload-tools {
    background-color: #f8f9fa;
    border: 1px solid #e1e4e8;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.batch-upload-tools h4 { margin-top: 0; margin-bottom: 10px; font-size: 16px; color: #23282d; }
.upload-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.file-input { padding: 5px; border: 1px solid #ccc; background: #fff; border-radius: 3px; }
.csv-instruction { font-size: 13px; color: #666; margin: 0; }

/* Print Styles */
.eze-lesson-plan-print, .eze-lesson-plan-print * { font-family: 'Noto Sans Bengali', sans-serif !important; box-sizing: border-box; }
.eze-lesson-plan-print table { width: 100%; border-collapse: collapse; margin-top: 5px; table-layout: fixed; }
.eze-lesson-plan-print th, .eze-lesson-plan-print td { border: 1px solid #ccc; padding: 2px 4px; font-size: 11px; line-height: 1.2; text-align: left; vertical-align: top; word-wrap: break-word; }
.eze-lesson-plan-print table thead th:nth-child(1), .eze-lesson-plan-print table tbody td:nth-child(1) { width: 15%; }
.eze-lesson-plan-print table thead th:nth-child(2), .eze-lesson-plan-print table tbody td:nth-child(2) { width: 20%; }
.eze-lesson-plan-print table thead th:nth-child(3), .eze-lesson-plan-print table tbody td:nth-child(3) { width: 65%; }
.eze-lesson-plan-print th { background: #f0f0f0; }
.eze-lesson-plan-print .print-header { display: none; text-align: center; margin-bottom: 3px; }
.eze-lesson-plan-print .print-header h2 { font-size: 14px; margin: 2px 0; }
.eze-lesson-plan-print .print-header h3 { font-size: 13px; margin: 2px 0; }
.eze-lesson-plan-print .print-header p { font-size: 12px; margin: 2px 0; }
.eze-lesson-plan-print .screen-only h2 { font-size: 14px; margin-bottom: 5px; }
.eze-lesson-plan-print .screen-only h3 { font-size: 13px; margin-bottom: 5px; }
.eze-lesson-plan-print form { gap: 5px !important; }
.eze-lesson-plan-print form label, .eze-lesson-plan-print form input, .eze-lesson-plan-print form select, .eze-lesson-plan-print form button { font-size: 13px; padding: 5px; }

/* --- Class Card System Styles --- */
.eze-class-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
.eze-class-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e1e1e1;
    width: 100%;
}
.eze-class-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #0073aa;
    background-color: #f8fbff;
}
.eze-class-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}
.eze-class-card .card-title {
    font-weight: bold;
    font-size: 15px;
    color: #333;
}
.eze-active-class-header {
    background: #f1f1f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.eze-active-class-header .selected-class-info {
    font-size: 16px;
}
.eze-active-class-header .filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.eze-active-class-header button {
    cursor: pointer;
}
.button-primary {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
}
.button-secondary {
    background-color: #fff;
    color: #d63638;
    border: 1px solid #d63638;
    padding: 5px 10px;
    border-radius: 3px;
}
.button-secondary:hover {
    background-color: #d63638;
    color: #fff;
}

@media print {
    body * { visibility: hidden; }
    .eze-lesson-plan-print, .eze-lesson-plan-print * { visibility: visible; }
    .eze-lesson-plan-print .screen-only { display: none !important; }
    .eze-lesson-plan-print .print-header { display: block; }
    @page { size: A4; margin: 5px 20px 10px 20px; }
}

/* --- Public Page Shortcode Styles --- */
.eze-public-lp-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.eze-public-search-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    margin-bottom: 30px;
}

.eze-public-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.eze-public-form .form-group {
    flex: 1;
    min-width: 150px;
}

.eze-public-form .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.eze-public-form .form-group input,
.eze-public-form .form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.eze-public-form .submit-group {
    flex: 0 0 auto;
}

.eze-public-btn {
    background-color: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    height: 40px; /* Match input height mostly */
    margin-top: 1px;
}

.eze-public-btn:hover {
    background-color: #135e96;
}

/* Results Area */
.eze-info-message, .eze-warning-message {
    padding: 20px;
    background: #e5f5fa;
    border-left: 4px solid #2271b1;
    color: #333;
}

.eze-warning-message {
    background: #fcf0f1;
    border-left-color: #d63638;
}

.eze-results-header {
    margin-bottom: 20px;
    text-align: center;
}

.eze-results-header h3 {
    font-size: 20px;
    color: #23282d;
    margin-bottom: 5px;
}

.eze-results-header p {
    color: #666;
    margin-top: 0;
}

/* Daily Cards */
.eze-daily-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eze-day-card {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.eze-card-header {
    background: #f0f0f1;
    padding: 10px 15px;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eze-card-header .day-name {
    font-weight: bold;
    font-size: 16px;
    color: #2271b1;
}

.eze-card-header .full-date {
    font-size: 13px;
    color: #646970;
}

.eze-card-body {
    padding: 0;
}

.eze-subject-row {
    padding: 15px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    flex-direction: column;
}

.eze-subject-row:last-child {
    border-bottom: none;
}

.eze-subject-row .subject-name {
    font-weight: bold;
    font-size: 15px;
    color: #1d2327;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eze-subject-row .section-badge {
    background: #dcdcde;
    color: #50575e;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
}

.eze-subject-row .plan-content {
    font-size: 14px;
    color: #3c434a;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .eze-public-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .eze-public-btn {
        width: 100%;
    }
}