/* Nền tối che toàn màn hình */

.modal-overlay {
    display: none; /* Mặc định ẩn */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;     
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    
    justify-content: center; align-items: center;

    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

/* Khung nội dung Modal */
/* Đảm bảo modal-container là đối tượng duy nhất có thanh cuộn */
.modal-container {
    background: white;
    width: 80%;
    max-width: 1000px;
    height: 85vh;
    border-radius: 15px;
    padding-left: 30px;
    padding-top: 30px;
    padding-bottom: 30px;
    padding-right: 3px;
    position: relative;
    overflow: hidden;
    /* hiệu ứng xuất hiện */
    animation: modalZoom 0.35s ease;
}

/* animation */
@keyframes modalZoom {
    from {
        opacity: 0;

        transform:
            scale(0.85)
            translateY(20px);

        filter: blur(3px);
    }

    to {
        opacity: 1;

        transform:
            scale(1)
            translateY(0);

        filter: blur(0);
    }
}

/* vùng cuộn riêng */
.modal-scroll {
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 25px;       
}

/* scrollbar */
.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: #ffffff;

    border-radius: 999px;

    border: 2px solid white;
    background-clip: content-box;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: #d9e9e1;

    border: 2px solid white;
    background-clip: content-box;
}

.close-btn {
    position: sticky;
    top: -10px; float: right;
    font-size: 35px; cursor: pointer; color: #999;
}

.nutclose {
    position: absolute;
    top: 15px; /* Tăng một chút để không quá sát mép */
    right: 15px;
    width: 36px; /* Kích thước gọn gàng hơn */
    height: 36px;   
    border-radius: 50%;
    background-color: var(--primary-color, #0c826f);
    color: #ffffff;        
  
    /* CĂN GIỮA ICON SVG HOÀN HẢO */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Xóa padding mặc định của button để icon không bị lệch */

    cursor: pointer;
    border: 2px solid #ffffff;
    transition: all 0.2s ease; /* Hiệu ứng mượt hơn */
    z-index: 1001; /* Đảm bảo luôn nằm trên nội dung docx */
}

.nutclose:hover {
    background-color: #d9383a; 
    border-color: #d9383a;
    transform: scale(1.1);
}

/* Thêm hiệu ứng click chuột vào đây */
.nutclose:active {
    transform: scale(0.95);
    /* Giảm nhẹ độ mờ một chút để tạo cảm giác nút đang được nhấn xuống */
    opacity: 0.9; 
}

/* Định dạng nội dung file docx sau khi render */
.docx-render-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
}

.source-link {
    color: var(--primary-color, #0c826f);
    font-size: 14px;
    text-decoration: none;
    margin-right: 15px;     
    transition: all 0.3s ease;
}
.source-link:hover {    
    text-decoration: none; 
    color: color-mix(in srgb, var(--primary-color, #0c826f) 80%, transparent);
    background-color: #ffffff;
    border-radius: 5px;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.source-link i {
    margin-right: 6px;
}

