
/* ======================================= */
/* --------  Notifications Button Style   ------   */
/* ======================================= */
/* Base style for all buttons with class "notification-trigger" */
.notification-trigger {
    padding: 12px 24px;
    margin: 10px 0; /* Add some space between buttons */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 8px; /* Slightly rounded corners */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow for a modern look */
}

/* Specific styles for different button types */
.notification-trigger[data-title="Cập nhật quan trọng"] {
    background-color: #007bff; /* Blue for primary/info */
    color: white;
}

.notification-trigger[data-title="Lỗi hệ thống"] {
    background-color: #dc3545; /* Red for error/danger */
    color: white;
}

.notification-trigger[data-title="Khuyến mãi đặc biệt"] {
    background-color: #28a745; /* Green for success/promo */
    color: white;
}

/* Hover and active effects */
.notification-trigger:hover {
    transform: translateY(-2px); /* Lift the button slightly on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); /* A slightly bigger shadow */
}

.notification-trigger:active {
    transform: translateY(0); /* Return to original position on click */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Smaller shadow to simulate being pressed */
}

/* ======================================= */
/* --------  MODAL    ------   */
/* ======================================= */
/* Container chứa các modal */
#modalContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Thêm thuộc tính này để mặc định không chặn tương tác */
    pointer-events: none;
}
.modal {
    display: none;
    position: fixed;
    z-index: 100; /* Đặt z-index cao hơn để modal hiển thị trên lớp phủ */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #eee;
    padding-top: 100px;
    pointer-events: auto; /* Bật lại tương tác cho modal */
}

/* Hộp thoại modal */
.modal-dialog {
    position: relative;    
    margin: auto;
    padding: auto;
    border: 0px solid #ddd;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Nội dung bên trong hộp thoại */
.modal-content {
    background-color: #fefefe;
    border-radius: 8px;
    border: 0px solid #888;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Phần tiêu đề modal */
.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

/* Nút đóng modal */
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

/* Phần nội dung chính của modal */
.modal-body {
    padding: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

/* Phần chân modal */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Kiểu dáng cho nút "Ok" */
.btn-primary {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Hiệu ứng chuyển động */
/* Add Animation */
@-webkit-keyframes animatetop {
  from {top:-300px; opacity:0} 
  to {top:0; opacity:1}
}

@keyframes animatetop {
  from {top:-300px; opacity:0}
  to {top:0; opacity:1}
}

.brand-logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.modal-brand-logo {
    height: 36px;
    width: auto;
    margin-right: 12px;
}

/* Media query cho màn hình có chiều rộng tối đa 500px */
@media screen and (max-width: 500px) {
    /* Các quy tắc CSS sẽ được áp dụng cho màn hình nhỏ */
    .modal-dialog {
        /*
          * Bỏ thuộc tính margin trên màn hình nhỏ để modal chiếm toàn bộ chiều cao màn hình.
          * Hoặc có thể giảm margin để nó không bị ép sát vào các cạnh.
          */
        margin: 0;
        
        /* Đảm bảo modal chiếm toàn bộ chiều rộng có thể */
        width: 100%;
        max-width: 100%;
        
        /* Tùy chỉnh padding và font-size để phù hợp với màn hình nhỏ */
        padding: 10px;
    }
    
    .modal-body {
        font-size: 0.9rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    /* Có thể ẩn logo nếu nó chiếm quá nhiều diện tích */
    .modal-brand-logo {
        height: 30px;
        margin-right: 8px;
    }
    
    /* Điều chỉnh animation */
    @keyframes animatetop {
        from { top: -200px; opacity: 0; } 
        to { top: 0; opacity: 1; }
    }
}