/* RoomLearningModern.css */
/* Giao diện sáng, hiện đại, màu nền pastel nhẹ nhàng */
#div-roomlearning {
    background: linear-gradient(135deg, #d5ffff 0%, #b6eaea 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    overflow: hidden; /* Ẩn scrollbar ngoài cùng để tránh xếp chồng */
}

    /* Đảm bảo box-sizing cho các element không bị đội kích thước */
    #div-roomlearning * {
        box-sizing: border-box;
    }

    /* Hiệu ứng mờ như kính (Glassmorphism) cho tiêu đề và toolbar */
    #div-roomlearning .card-header,
    #div-roomlearning .nav-pills,
    #div-info,
    #content {
        background: rgba(255, 255, 255, 0.4) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        margin-bottom: 3px; /*Tạo shadow*/
    }

    #div-roomlearning .nav-pills {
        padding: 5px;
        margin: 5px auto;
    }

#div-info {
    border-radius: 0 0 15px 15px;
    border-top: none;
    padding: 3px 15px;
    margin-bottom:0.2rem;
}

#div-info-content {
    align-items: center;
}

    /* Các nút bấm trên thanh info sẽ tự động cách đều và đẹp hơn khi bị JS ẩn hiện */
    #div-info-content > div:last-child {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

/* Các thanh điều hướng (pills) dùng flex để bố trí đều đặn thay vì float */
#div-roomlearning .nav-pills {
    padding: 5px;
    margin: 5px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

    #div-roomlearning .nav-pills .nav-item {
        margin: 0 !important;
        flex: 1; /* Thay thế width cố định để phân chia đều đặn */
        max-width: fit-content;
    }

#div-roomlearning .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

    #div-roomlearning .nav-link i.icon-tab {
        margin: 0;
        font-size: 1.2rem;
    }

    #div-roomlearning .nav-link .p-name-tab {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 500;
    }

/* Glassmorphism cho các khung nội dung và thanh bên */
#div-roomlearning .dock.tab-pane,
#div-roomlearning .tab-content,
#div-roomlearning #div-left,
#div-roomlearning #div-wrapper {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
#div-roomlearning .dock.tab-pane {
    background: transparent !important;
}
    #div-roomlearning .tab-content, #div-roomlearning .dock.tab-pane {
        overflow: hidden !important;
        flex-direction: column;
    }

#chat-show, #chat-show-desk, #div-online-content, #div-online-content-desk {
    flex: 1; /* Thay thế việc gán cứng height 100% - auto co giãn */
    overflow-y: auto !important;
    height: auto !important;
}

/* Bo góc mềm mại cho các control (nút bấm, ô nhập liệu) */
#div-roomlearning .btn,
#div-roomlearning .tvGButton,
#div-roomlearning input.form-control {
    border-radius: 12px;
    transition: all 0.3s ease;
    border-color: rgba(4, 101, 139, 0.3);
}

    /* Hiệu ứng 3D cho các nút bấm khi hover */
    #div-roomlearning .btn:hover,
    #div-roomlearning .tvGButton:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(4, 101, 139, 0.2);
    }

/* Điều chỉnh border-radius cho các group input để không bị lệch góc */
#div-roomlearning .input-group > .form-control {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#div-roomlearning .input-group > .input-group-append > .btn {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#div-roomlearning .input-group-append .btn,
#div-roomlearning .input-group-prepend .input-group-text {
    border-radius: 12px;
}

/* Tiêu đề chat và thảo luận */
#div-roomlearning #div-title-chat {
    background: rgba(4, 101, 139, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px 15px 0 0;
    color: #04658b;
    font-weight: bold;
    border-bottom: 1px solid rgba(4, 101, 139, 0.2);
    padding: 10px;
}

/* Bong bóng chat hiện đại, nổi bật */
#div-roomlearning .content-msg p.msg {
    border-radius: 15px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#chat-show .content-msg.me p.msg,
#chat-show-desk .content-msg.me p.msg {
    background: linear-gradient(135deg, #00658d 0%, #34c4ff 100%) !important;
    border-bottom-right-radius: 0 !important;
    color: #ffffff;
}

#chat-show .content-msg.dif p.msg,
#chat-show-desk .content-msg.dif p.msg {
    background: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%) !important;
    border-bottom-left-radius: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Màn hình khóa phòng (Overlay) */
#div-roomlearning .div_lock_room {
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
}

/* Thanh cuộn (Scrollbar) tùy chỉnh cho đẹp mắt */
#div-roomlearning ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#div-roomlearning ::-webkit-scrollbar-track {
    background: rgba(4, 101, 139, 0.1);
    border-radius: 10px;
}

#div-roomlearning ::-webkit-scrollbar-thumb {
    background: rgba(4, 101, 139, 0.4);
    border-radius: 10px;
}

    #div-roomlearning ::-webkit-scrollbar-thumb:hover {
        background: rgba(4, 101, 139, 0.6);
    }

/* Các tab (Pills) đang được chọn */
#div-roomlearning .nav-pills .nav-link.active,
#div-roomlearning .nav-pills .show > .nav-link {
    background: linear-gradient(135deg, #afe8ff 0%, #08b6e2 100%);
    box-shadow: 0 4px 10px rgb(8 117 160 / 40%);
    color: white !important;
    border-radius: 12px;
}

/* Cácfieldset và legend cho khu vực tài liệu */
#div-roomlearning fieldset {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgb(214 214 214);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
}

#div-roomlearning legend {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    padding: 0 5px;
    width: auto;
}

.light-box {
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
    background:white!important;
    border-radius:0.5rem;
}

div#chat-content, div#div-chat-desk {
    height: 100%;
}

div#div-chat-desk {
    padding: 0;
    border-bottom-right-radius: 5px;
    min-width: 340px; /*Nhỏ quá bị rớt dòng*/
}



#content p {
    margin: 0;
}

#content {
    width: 100% !important;
    color: #0b649c;
    border-radius: 20px;
}


    #content button {
        background: #fff;
        color: #0b649c;
        font-weight: bold;
        padding: 0px 4px;
        margin-left: 5px;
    }

        #content button:hover {
            background-color: lightblue;
        }
#div-container li.nav-item a.nav-link i.tab-close {
    margin-left: 10px;
    color: #666;
    /*position: absolute;*/
}

#div-container li.nav-item a.nav-link.active i.tab-close {
    color: red;
}

#div-container li.nav-item.mobile.active a.nav-link.active i.icon-tab {
    color: white;
}

#div-container a.nav-link.active {
    color: #f05451;
    background: #eaeaea;
}

#div-container li.nav-item.mobile.active a.nav-link.active {
    color: white;
    background: transparent;
    border-radius: 0;
}

#div-container li.nav-item {
    margin: 0 auto;
}

#div-container .nav.nav-pills.mobile {
    position: fixed;
    bottom: 30%;
    right: 50px;
    display: none;
    z-index: 10;
}

    #div-container .nav.nav-pills.mobile.show {
        display: flex !important;
    }

#div-container li.nav-item.mobile {
    margin: 0 3px;
    border: solid 1px #186c79;
    width: 50px;
    border-radius: 15px;
    background: #fff;
}

    #div-container li.nav-item.mobile.active {
        background: #186c79;
    }

