/*!
 * Bootstrap Docs (https://getbootstrap.com/)
 * Copyright 2011-2023 The Bootstrap Authors
 * Licensed under the Creative Commons Attribution 3.0 Unported License.
 * For details, see https://creativecommons.org/licenses/by/3.0/.
 */

html,
body {
    margin: 0;
    padding: 0;
	padding-top: 0px;    /* space for top navbar */
    padding-bottom: 0px; /* space for bottom nav */
    font-size: 14px;
    font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}

:root,
[data-bs-theme="light"] {
    --bd-purple: #4c0bce;
    --bd-violet: #712cf9;
    --bd-accent: #ffe484;
    --bd-violet-rgb: 112.520718, 44.062154, 249.437846;
    --bd-accent-rgb: 255, 228, 132;
    --bd-pink-rgb: 214, 51, 132;
    --bd-teal-rgb: 32, 201, 151;
    --bd-violet-bg: var(--bd-violet);
    --bd-toc-color: var(--bd-violet);
    --bd-sidebar-link-bg: rgba(var(--bd-violet-rgb), .1);
    --bd-callout-link: 10, 88, 202;
    --bd-callout-code-color: #ab296a;
    --bd-pre-bg: var(--bs-tertiary-bg)
}

[data-bs-theme="dark"] {
    --bd-violet: #9461fb;
    --bd-violet-bg: #712cf9;
    --bd-toc-color: var(--bs-emphasis-color);
    --bd-sidebar-link-bg: rgba(84, 33, 187, .5);
    --bd-callout-link: 110, 168, 254;
    --bd-callout-code-color: #e685b5;
    --bd-pre-bg: #1b1f22
}

.bd-callout {
    --bs-link-color-rgb: var(--bd-callout-link);
    --bs-code-color: var(--bd-callout-code-color);
    padding: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--bd-callout-color, inherit);
    background-color: var(--bd-callout-bg, var(--bs-gray-100));
    border-left: 0.25rem solid var(--bd-callout-border, var(--bs-gray-300))
}

.bd-callout h4 {
    margin-bottom: .25rem
}

.bd-callout>:last-child {
    margin-bottom: 0
}

.bd-callout+.bd-callout {
    margin-top: -.25rem
}

.bd-callout .highlight {
    background-color: rgba(0, 0, 0, 0.05)
}

.bd-callout-info {
    --bd-callout-color: var(--bs-info-text-emphasis);
    --bd-callout-bg: var(--bs-info-bg-subtle);
    --bd-callout-border: var(--bs-info-border-subtle)
}

.bd-callout-warning {
    --bd-callout-color: var(--bs-warning-text-emphasis);
    --bd-callout-bg: var(--bs-warning-bg-subtle);
    --bd-callout-border: var(--bs-warning-border-subtle)
}

.bd-callout-danger {
    --bd-callout-color: var(--bs-danger-text-emphasis);
    --bd-callout-bg: var(--bs-danger-bg-subtle);
    --bd-callout-border: var(--bs-danger-border-subtle)
}

/**** Hide the print elements ****/
@media print {
    .hidden-in-print {
        display: none !important;
    }
}

/**** In trang chủ (nút "In ấn" hoặc Ctrl+P): in cả bảng lịch của tuần. Chỉ áp dụng cho index.php (body.page-home) ****/
/* Trên màn hình bảng nằm trong khung cuộn cao 600px và khung tự cuộn tới hôm nay; không bỏ khung khi in thì giấy chỉ có
   phần đang thấy trong khung (bắt đầu từ hôm nay, và chỉ khoảng 600px) */
@media print {
    .page-home #frm-event .table-responsive {
        max-height: none !important;
        overflow: visible !important;
    }
    /* Thanh điều hướng dưới đáy màn hình điện thoại (partials/footer.php, mobile.css): giấy in hẹp hơn 768px nên thanh này
       hiện ra, và vì nằm cố định nên lặp lại ở mọi trang của bản in, nay bản in đã dài nhiều trang */
    .page-home .mobile-bottom-nav {
        display: none !important;
    }
}

/**** Tiêu đề tuần trên trang chủ: tiêu đề, khoảng ngày và nút "Chuyển lịch tuần sang To do" nằm chung một hàng ****/
/* Hàng tự xuống dòng khi màn hình hẹp. Chỉ áp dụng trên màn hình: khi in, ba dòng vẫn xếp như trước */
@media screen {
    #event-header .event-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 4px 16px;
    }
    #event-header .event-head h5,
    #event-header .event-head h6 {
        margin-bottom: 0;
    }
    /* Dòng "Năm học" đang để trống: không để nó chiếm một khoảng cách trong hàng */
    #event-header .event-head #EventSemester:empty {
        display: none !important;
    }
}

/**** Nhãn "New" nhấp nháy cạnh mục menu mới ****/
.menu-new {
    font-size: .62em;
    vertical-align: super;
    padding: .28em .5em;
    animation: menu-new-blink 1.1s ease-in-out infinite;
}
@keyframes menu-new-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .2; }
}
/* Máy đã bật "giảm chuyển động" (Windows: tắt "Hiệu ứng hoạt ảnh"): vẫn nhấp nháy nhưng chậm và nhẹ hơn */
@media (prefers-reduced-motion: reduce) {
    .menu-new { animation-name: menu-new-pulse; animation-duration: 2.4s; }
}
@keyframes menu-new-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

/**** Thanh menu trên màn hình vừa: thu gọn để các mục, kể cả mục "To do list" mới, vẫn nằm trên một dòng như trước ****/
/* 768–991 px (máy tính bảng dọc, cửa sổ hẹp): chữ menu 13 px thay cho 14 px, khoảng cách giữa các mục hẹp hơn */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar.navbar-expand-md {
        --bs-navbar-nav-link-padding-x: .2rem;
        --bs-navbar-brand-font-size: .95rem;
        --bs-navbar-brand-margin-end: .3rem;
    }
    .navbar.navbar-expand-md .navbar-nav {
        --bs-nav-link-font-size: .93rem;
    }
}
/* 992–1199 px: chỉ menu của quản trị viên (nhiều mục hơn), giữ nguyên cỡ chữ */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar.navbar-expand-md.navbar-admin {
        --bs-navbar-nav-link-padding-x: .25rem;
        --bs-navbar-brand-font-size: 1rem;
        --bs-navbar-brand-margin-end: .35rem;
    }
}

/*.text-primary {
   /*color:darkblue !important;*
   color:#0c0cb8 !important;
}*/

.text-success {
    color: darkgreen !important;
}

/**** Switch between devices ****/

.screen-desktop {
	display: revert;
}

.screen-mobile {
	display: none;
}

#tbl-calendar th.col-day {
	width: 5%;
}
#tbl-calendar th.col-time {
	width: 6%;
}
#tbl-calendar th.col-content {
	width: 20%;
}
#tbl-calendar th.col-participant {
	width: 40%;
}
#tbl-calendar th.col-location {
	width: 15%;
}
#tbl-calendar th.col-host {
	width: 15%;
}
#tbl-calendar .sticky-header {
	top: 0;
	z-index: 20;
	position: sticky;
	position: -webkit-sticky; /* Safari */
	/*background-color: #e9ecef !important;
	border-top: 1px solid #dc3545;*/
	box-shadow: inset 0 1px 0 #ccc/*, 0 2px 3px rgba(0,0,0,0.08)*/;
}
#tbl-calendar .sticky-header th.tr-mobi {
	background-color: #e9ecef !important;
}

/*
/* Màu nền cho các hàng xen kẽ *
.striped-row:nth-child(even) th:not(:first-child),
.striped-row:nth-child(even) td:not(:first-child) {
	background-color: #f2f2f2 !important;
	background-color: #dda23e !important;
	background-color: #ede560 !important;
}

.striped-row:nth-child(odd) th:not(:first-child) {
	background-color: #ffffff !important;
}

/* Đảm bảo hàng đầu tiên không bị ảnh hưởng *
thead tr {
	background-color: inherit !important;
}

/* Loại trừ cột đầu tiên *
tbody tr th:first-child,
tbody tr td:first-child {
	background-color: inherit !important;
}
*/

.striped-row:nth-child(even) td {
	background-color: #f2f2f2; /* Màu nền cho các ô trong hàng chẵn, trừ cột đầu tiên */
}
.striped-row:nth-child(odd) td {
	background-color: #ffffff; /* Màu nền cho các ô trong hàng lẻ, trừ cột đầu tiên */
}
thead tr {
	background-color: inherit; /* Giữ nguyên màu nền của hàng đầu tiên */
}
tbody tr th {
	background-color: inherit; /* Giữ nguyên màu nền cho cột đầu tiên */
}

/* Lịch được mở từ liên kết "về lịch gốc" của VKU To do list (index.php?event=<mã lịch>): nền vàng nhạt, vạch cam bên trái.
   Bootstrap 5.3 tô nền ô bảng bằng box-shadow nên phải đặt cả hai thuộc tính. Ô "Thứ/Ngày" (th) dùng chung cho cả ngày nên giữ nguyên. */
#tbl-calendar tr.event-focus > td {
	background-color: #fff3cd !important;
	box-shadow: inset 0 0 0 9999px #fff3cd !important;
}
#tbl-calendar tr.event-focus > td:first-of-type {
	box-shadow: inset 4px 0 0 #f7951d, inset 0 0 0 9999px #fff3cd !important;
}
/* Khi trang tự cuộn tới lịch này: chừa chỗ cho phần đầu trang đang dính ở trên và thanh điều hướng dính dưới đáy màn hình điện thoại */
#tbl-calendar tr.event-focus {
	scroll-margin-top: 150px;
	scroll-margin-bottom: 60px;
}

/**** Nút chọn ngày trên trang chủ (thay ô đánh dấu "Hôm nay"; xử lý trong assets/js/day-filter.js) ****/
/* Kiểu "chip" và trình đơn lấy theo VKU To do list (public/assets/app.css: .chip, .menu, .menu-item), cùng bảng màu:
   xanh #2B4C9B trên nền xanh nhạt #E9EFFB khi đang lọc, chữ phụ #586174, chữ mờ #8B94A5, viền #E1E5EC, nền khi rê chuột #F3F5F9.
   Chip rộng hết cột và cao bằng các ô chọn bên cạnh (.form-select), như ô "Hôm nay" trước đây */
.day-chip {
	--day-blue: #2B4C9B;
	--day-blue-soft: #E9EFFB;
	--day-blue-ring: rgba(43, 76, 155, .28);
	--day-text: #1C2333;
	--day-text-2: #586174;
	--day-text-3: #8B94A5;
	--day-line: #E1E5EC;
	--day-hover: #F3F5F9;
	display: flex;
	align-items: center;
	width: 100%;
	height: calc(1.5rem + .75rem + var(--bs-border-width) * 2);
	border: var(--bs-border-width) solid var(--bs-border-color);
	border-radius: 999px;
	border-radius: var(--bs-border-radius);
	background: var(--bs-body-bg);
	color: var(--day-text-2);
	font-size: 1rem;
}
.day-chip.is-set {
	border-color: transparent;
	background: var(--day-blue-soft);
	color: var(--day-blue);
	font-weight: 600;
}
.day-chip.is-open {
	border-color: var(--day-blue);
	box-shadow: 0 0 0 3px var(--day-blue-ring);
}
.day-ic {
	width: 16px;
	height: 16px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.day-chip-main {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 10px 0 12px;
	border: 0;
	border-radius: 999px;
	border-radius: var(--bs-border-radius);
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
}
.day-chip-main:hover {
	color: var(--day-text);
}
.day-chip.is-set .day-chip-main:hover {
	color: var(--day-blue);
}
.day-chip-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.day-chip .day-ic-down {
	width: 14px;
	height: 14px;
	opacity: .75;
}
.day-chip.is-set .day-ic-down {
	display: none;
}
.day-chip-x {
	display: grid;
	place-items: center;
	flex: none;
	width: 30px;
	height: 100%;
	margin-left: -6px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	border-radius: var(--bs-border-radius);
	background: none;
	color: inherit;
	opacity: .7;
}
.day-chip-x:hover {
	opacity: 1;
}
.day-chip-x .day-ic {
	width: 14px;
	height: 14px;
}
.day-chip-main:focus-visible,
.day-chip-x:focus-visible {
	outline: 2px solid var(--day-blue);
	outline-offset: -2px;
}

/* Trình đơn: thành phần dropdown của Bootstrap, đổi các biến để giống trình đơn của To do list */
.day-menu.dropdown-menu {
	--bs-dropdown-min-width: max(216px, 100%);
	--bs-dropdown-padding-x: 6px;
	--bs-dropdown-padding-y: 6px;
	--bs-dropdown-font-size: 14px;
	--bs-dropdown-color: var(--day-text);
	--bs-dropdown-border-color: var(--day-line);
	--bs-dropdown-border-radius: 12px;
	--bs-dropdown-link-color: var(--day-text);
	--bs-dropdown-link-hover-color: var(--day-text);
	--bs-dropdown-link-hover-bg: var(--day-hover);
	--bs-dropdown-link-active-color: var(--day-text);
	--bs-dropdown-link-active-bg: var(--day-hover);
	--bs-dropdown-item-padding-x: 10px;
	--bs-dropdown-item-padding-y: 6px;
	--bs-dropdown-item-border-radius: 8px;
	max-width: calc(100vw - 16px);
	font-weight: 400;
	box-shadow: 0 10px 34px rgba(22, 32, 62, .18), 0 2px 6px rgba(22, 32, 62, .08);
}
.day-menu .day-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
}
.day-menu .day-item .day-ic {
	width: 17px;
	height: 17px;
	color: var(--day-text-2);
}
.day-menu .day-item-name {
	flex: 1;
	min-width: 0;
}
.day-menu .day-item small {
	color: var(--day-text-3);
	font-size: 12px;
}
.day-menu .day-item.is-on {
	font-weight: 700;
}
.day-menu .day-item .day-ic-check {
	color: var(--day-blue);
}
.day-menu .dropdown-item:focus-visible {
	outline: 2px solid var(--day-blue);
	outline-offset: -2px;
}
.day-menu-sep {
	height: 1px;
	margin: 6px 4px;
	background: #ECEFF3;
}
.day-menu-actions {
	display: flex;
	justify-content: flex-end;
	padding: 8px 10px 4px;
}
/* Nút "Xem cả tuần": giống nút nhỏ (.btn.btn-sm) của To do list */
.day-menu .dropdown-item.day-btn {
	display: inline-flex;
	align-items: center;
	width: auto;
	height: 30px;
	padding: 0 11px;
	border: 1px solid var(--day-line);
	border-radius: 8px;
	background: var(--bs-body-bg);
	font-size: 13px;
	font-weight: 600;
}
.day-menu .dropdown-item.day-btn:hover,
.day-menu .dropdown-item.day-btn:focus {
	background: var(--day-hover);
}
.day-menu-empty {
	padding: 8px 10px;
	color: var(--day-text-3);
}
/* Điện thoại: cột của chip chỉ rộng chừng 100–115 px; bỏ biểu tượng cuốn lịch, chữ 13 px (như chip của To do list)
   và khoảng đệm hẹp hơn để "Hôm nay", "T3 13/10"… không bị cắt ở màn hình rộng 360 px */
@media (max-width: 575.98px) {
	.day-chip {
		font-size: 13px;
	}
	.day-chip-main {
		padding: 0 6px 0 10px;
	}
	.day-chip-main > .day-ic:first-child {
		display: none;
	}
	.day-chip-x {
		width: 26px;
		margin-left: -4px;
	}
}

/* Nhãn "Hôm nay" cạnh ngày hôm nay: trong bảng lịch (cột Thứ/Ngày, dòng tên ngày trên điện thoại) và trong trình đơn chọn ngày */
.today-tag {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	border-radius: var(--bs-border-radius);
	background: #E9EFFB;
	color: #2B4C9B;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.45;
	white-space: nowrap;
	vertical-align: 1px;
}
@media print {
	.today-tag {
		display: none;
	}
}


@media (max-width: 767px) {
	.screen-mobile {
		display: table-row !important;
	}
	.screen-desktop {
		display: none !important;
	}
	#tbl-calendar th.col-day {
		width: 10%;
	}
	#tbl-calendar th.col-content {
		width: 90%;
	}
}

.icon-bookmark {
	cursor: pointer;
}

/**** CSS for Dashboard ****/

.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .bd-placeholder-img-lg {
        font-size: 3.5rem;
    }
}

.b-example-divider {
    width: 100%;
    height: 3rem;
    background-color: rgba(0, 0, 0, .1);
    border: solid rgba(0, 0, 0, .15);
    border-width: 1px 0;
    box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.b-example-vr {
    flex-shrink: 0;
    width: 1.5rem;
    height: 100vh;
}

.bi {
    vertical-align: -.125em;
    fill: currentColor;
}

.nav-scroller {
    position: relative;
    z-index: 2;
    height: 2.75rem;
    overflow-y: hidden;
}

.nav-scroller .nav {
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 1rem;
    margin-top: -1px;
    overflow-x: auto;
    text-align: center;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.btn-bd-primary {
    --bd-violet-bg: #712cf9;
    --bd-violet-rgb: 112.520718, 44.062154, 249.437846;

    --bs-btn-font-weight: 600;
    --bs-btn-color: var(--bs-white);
    --bs-btn-bg: var(--bd-violet-bg);
    --bs-btn-border-color: var(--bd-violet-bg);
    --bs-btn-hover-color: var(--bs-white);
    --bs-btn-hover-bg: #6528e0;
    --bs-btn-hover-border-color: #6528e0;
    --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
    --bs-btn-active-color: var(--bs-btn-hover-color);
    --bs-btn-active-bg: #5a23c8;
    --bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
    z-index: 1500;
}

.bd-mode-toggle .dropdown-menu .active .bi {
    display: block !important;
}

.password-toggle {
    top: 50%;
    right: 10px;
    cursor: pointer;
    position: absolute;
    transform: translateY(-50%);
}
