/*
| Thang chữ chung toàn hệ thống (SIS).
|
| Vì sao có file này: giao diện gốc dùng bộ chữ nén 10.5-13px rải rác ở nhiều
| stylesheet với !important, chỉnh từng chỗ vừa dễ sót vừa dễ lệch. File này nạp
| SAU CÙNG và khai báo lại cỡ chữ theo từng nhóm phần tử để cả hệ thống dùng
| chung một thang, chỉnh hoặc gỡ chỉ ở một nơi.
|
| Thang áp dụng (nén -> dễ đọc):
|   nền trang 13 -> 14.5 | bảng 12 -> 13.5 | nhãn 11.5 -> 13
|   ô nhập 12 -> 14      | nút 12 -> 14    | chú thích 11 -> 12.5
|
| Selector nhân đôi lớp (.edu-compact-theme.edu-compact-theme) để đủ độ ưu tiên
| so với các rule [data-page-family] trong bộ CSS gốc, không cần tăng !important.
*/

.edu-compact-theme {
    --edu-font-base: 15.5px;
    --edu-font-table: 14.5px;
    --edu-font-label: 14px;
    --edu-font-control: 15px;
    --edu-font-small: 13.5px;
    font-size: var(--edu-font-base);
    line-height: 1.5;
}

.edu-compact-theme.edu-compact-theme :where(.app-content, .portal-content, .fp-content, .hssv-main, .v-application, .app-page-shell) {
    font-size: var(--edu-font-base) !important;
    line-height: 1.5 !important;
}

/* Tiêu đề: giữ đúng thứ bậc, chỉ nâng đều một nấc. */
.edu-compact-theme.edu-compact-theme :where(h1, .h1) { font-size: 24px !important; }
.edu-compact-theme.edu-compact-theme :where(h2, .h2) { font-size: 20px !important; }
.edu-compact-theme.edu-compact-theme :where(h3, .h3) { font-size: 18px !important; }
.edu-compact-theme.edu-compact-theme :where(h4, .h4) { font-size: 16px !important; }
.edu-compact-theme.edu-compact-theme :where(h5, .h5) { font-size: 15px !important; }
.edu-compact-theme.edu-compact-theme :where(h6, .h6) { font-size: 14.5px !important; }

/* Thẻ / khối nội dung. */
.edu-compact-theme.edu-compact-theme :where(.card-header, .panel-heading, .box-header, .app-card__header, .ui-card__header, .sis-card__header) {
    font-size: 15px !important;
}

.edu-compact-theme.edu-compact-theme :where(.card-body, .panel-body, .box-body, .app-card__body, .ui-card__body, .sis-card__body) {
    font-size: var(--edu-font-base) !important;
}

/* Bảng dữ liệu: nâng vừa phải để vẫn xem được nhiều dòng. */
.edu-compact-theme.edu-compact-theme :where(table, .table, .dataTable) {
    font-size: var(--edu-font-table) !important;
}

.edu-compact-theme.edu-compact-theme :where(.table > thead > tr > th, .table > tbody > tr > td, table > thead > tr > th, table > tbody > tr > td) {
    font-size: var(--edu-font-table) !important;
    line-height: 1.45 !important;
}

/* Biểu mẫu. */
.edu-compact-theme.edu-compact-theme :where(label, .form-label, .control-label) {
    font-size: var(--edu-font-label) !important;
    line-height: 1.35 !important;
}

.edu-compact-theme.edu-compact-theme :where(input, select, textarea, .form-control, .form-select, .select2-selection__rendered) {
    font-size: var(--edu-font-control) !important;
    min-height: 36px !important;
    line-height: 1.4 !important;
}

.edu-compact-theme.edu-compact-theme :where(textarea, .form-control[rows]) {
    min-height: 0 !important;
}

.edu-compact-theme.edu-compact-theme :where(.form-text, .help-block, .invalid-feedback) {
    font-size: var(--edu-font-small) !important;
}

/* Nút. */
.edu-compact-theme.edu-compact-theme :where(.btn, button, [type="button"], [type="submit"], .v-btn) {
    font-size: var(--edu-font-control) !important;
    min-height: 34px !important;
    line-height: 1.3 !important;
}

.edu-compact-theme.edu-compact-theme :where(.btn-sm, .btn-xs, .v-btn--size-small) {
    font-size: 13px !important;
    min-height: 30px !important;
}

.edu-compact-theme.edu-compact-theme :where(.btn i, button i) {
    font-size: 13px !important;
}

/* Chữ phụ, nhãn trạng thái, điều hướng. */
.edu-compact-theme.edu-compact-theme :where(small, .small, .text-muted, .muted) {
    font-size: var(--edu-font-small) !important;
}

.edu-compact-theme.edu-compact-theme :where(.badge, .label, .chip, .tag, .status-pill) {
    font-size: 12px !important;
}

.edu-compact-theme.edu-compact-theme :where(.breadcrumb, .sis-breadcrumb, .erpui-menu-trail) {
    font-size: var(--edu-font-label) !important;
}

.edu-compact-theme.edu-compact-theme :where(.nav-link, .nav-tabs > li > a, .nav-pills > li > a, .pagination > li > a, .page-link) {
    font-size: var(--edu-font-control) !important;
}

/* Menu trái và thanh trên. */
.edu-compact-theme.edu-compact-theme :where(.app-sidebar a, .sidebar a, .app-sidebar .menu-item, .sidebar-menu a) {
    font-size: var(--edu-font-control) !important;
}

.edu-compact-theme.edu-compact-theme :where(.app-topbar, .sis-topbar, .portal-topbar, .navbar, .main-header) {
    font-size: var(--edu-font-control) !important;
}

/* Cảnh báo / thông báo. */
.edu-compact-theme.edu-compact-theme :where(.alert, .toast, .flash-message) {
    font-size: var(--edu-font-base) !important;
}
