﻿body, h1, h2, h3, h4, h5, h6, .nav-link {
    font-family: Roboto, sans-serif !important;
}

/* Logo trang đăng nhập / quên mật khẩu — giữ trong khung, không tràn card */
.auth-logo-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
    text-decoration: none;
}

.auth-logo-wrap .auth-logo-img {
    display: block;
    max-width: 100%;
    max-height: 88px;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}
.navbar-menu {
    z-index: 1005 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Velzon template scrolls #scrollbar via SimpleBar (app.js); enable native scroll for Blazor */
.navbar-menu #scrollbar {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.4) transparent;
    -ms-overflow-style: none;
}

/* 03/10/2026: thanh cuon MANH thay vi an han.
   An hoan toan thi menu cuon duoc ma khong co dau hieu nao cho biet - nguoi dung
   tuong muc cuoi la het. Dong bo voi SuperAdmin (app.css ban 1.5). */
.navbar-menu #scrollbar::-webkit-scrollbar {
    width: 6px;
}

.navbar-menu #scrollbar::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.4);
    border-radius: 3px;
}

.navbar-menu #scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

/* Mau Velzon chua 95px cuoi .navbar-menu cho o thong tin nguoi dung - du an khong
   dung, de nguyen thi mat 95px vung menu nhin thay duoc. */
.app-menu.navbar-menu {
    padding-bottom: 0;
}

/* Mũi tên collapse (::after position:absolute) phải neo theo từng dòng menu khi scroll */
.navbar-menu #scrollbar .navbar-nav .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}
.ck-content .image > figcaption {
    min-height: 5px !important;
}
.mud-input {
    font-size: .8125rem;
}
.mud-icon-size-medium {
    font-size: 1.25rem;
}
.box-loading {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.schedule-table tbody td {
    transition: background-color 0.2s ease;
}

.schedule-table tbody td:hover {
    background-color: #e9ecef;
    cursor: pointer;
}

/* Đồng bộ chiều cao vùng logo sidebar với topbar (Velzon mặc định ~70px) */
#page-topbar .navbar-header,
.navbar-menu .navbar-brand-box {
    min-height: 70px;
    height: 70px;
    align-items: center;
}

.navbar-menu .navbar-brand-box {
    width: 100%;
    padding: 0 1rem;
}

.navbar-menu .navbar-brand-box .logo {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.navbar-menu .navbar-brand-box .logo img {
    max-height: 50px;
    width: 100%;
    object-fit: contain;
}

/* Logo topbar — chỉ mobile */
.topbar-logo-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.topbar-logo-center .logo {
    pointer-events: auto;
}

.topbar-logo-center img {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}
/* Pure Blazor CSS for Mobile Sidebar Toggle */
@media (max-width: 767.98px) {
    /* Ẩn menu đi theo mặc định trên mobile */
    .app-menu:not(.sm-menu-open) {
        transform: translate3d(-100%, 0, 0) !important;
        visibility: hidden !important;
    }

    .vertical-overlay:not(.sm-menu-open) {
        display: none !important;
    }

    /* Hiện menu khi click icon bar */
    .app-menu.sm-menu-open {
        transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
        left: 0 !important;
    }

    .vertical-overlay.sm-menu-open {
        display: block !important;
        opacity: 1 !important;
        z-index: 1004 !important;
    }
}

/* ==========================================================================
   Learning Material Tab Redesign (Chapter Tree & Playlist)
   ========================================================================== */
.chapter-tree-card {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.chapter-tree-list {
    display: flex;
    flex-direction: column;
}

.tree-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-left: 3px solid transparent;
    user-select: none;
}

.tree-item:hover {
    background-color: rgba(64, 93, 230, 0.04);
}

.tree-item.active {
    background-color: rgba(64, 93, 230, 0.08);
    border-left-color: #405ded;
}

.tree-item-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tree-children {
    background-color: rgba(0, 0, 0, 0.015);
    padding-bottom: 6px;
    border-left: 1px dashed rgba(0, 0, 0, 0.08);
    margin-left: 28px;
}

.child-item {
    border-left: 3px solid transparent;
}

.child-item.active {
    background-color: rgba(64, 93, 230, 0.08);
    border-left-color: #405ded;
}

/* Tree Alignment Containers */
.tree-toggle-container {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    flex-shrink: 0;
}

.tree-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.tree-name-wrapper {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-grow: 1;
}

.grandchild-tree-children {
    margin-left: 20px;
    border-left: 1px dotted rgba(0, 0, 0, 0.08);
}

.setting-btn {
    opacity: 0.3;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-item:hover .setting-btn,
.setting-btn:focus,
.setting-btn[aria-expanded="true"] {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Toggle button styling */
.toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* Playlist / Preview Styles */
.preview-area {
    background-color: #0c101b;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-area iframe {
    background-color: #ffffff;
}

.material-playlist {
    padding: 12px;
    scrollbar-width: thin;
    max-height: 280px;
    overflow-y: auto;
}

.material-playlist::-webkit-scrollbar {
    width: 6px;
}

.material-playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.material-playlist::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.material-playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.playlist-item {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border-left: 3px solid transparent;
}

.playlist-item:hover {
    background-color: #f8f9fa;
    border-color: rgba(64, 93, 230, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(64, 93, 230, 0.04);
}

.playlist-item.active {
    background-color: rgba(64, 93, 230, 0.05);
    border-color: rgba(64, 93, 230, 0.3);
    box-shadow: 0 4px 10px rgba(64, 93, 230, 0.06);
    border-left-color: #405ded;
}

.playlist-item:hover .playlist-delete-btn {
    opacity: 1 !important;
}

.playlist-delete-btn {
    transition: all 0.2s ease;
}

/* ── Vùng kéo thả tệp (26/11/2026) ─────────────────────────────────────────────────
   Viền đứt là tín hiệu "thả được vào đây". Không có nó thì người dùng không có cách
   nào đoán ra khung này nhận kéo thả, và tính năng coi như không tồn tại.
   Lớp .dang-keo-tep do keo-tha-tep.js bật/tắt khi con trỏ mang tệp đi vào/ra. */
.vung-keo-tha {
    border: 2px dashed transparent;
    border-radius: 6px;
    padding: 6px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.vung-keo-tha.dang-keo-tep {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.06);
}

.vung-keo-tha .goi-y-keo-tha {
    opacity: 0.75;
}

.vung-keo-tha.dang-keo-tep .goi-y-keo-tha {
    opacity: 1;
    color: #0d6efd !important;
}
