/* Notification Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px; /* Tránh dính sát mép màn hình điện thoại */
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    /* Cập nhật quan trọng: Giới hạn chiều cao và cho phép cuộn */
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    /* --------------------------------------------------- */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    color: #1f2937;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 20px;
    flex-shrink: 0; /* Giữ header cố định */
    text-align: center;
}

.modal-header i {
    font-size: 3rem;
    color: #7c3aed;
    margin-bottom: 15px;
    display: block;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.3);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 25px;
    text-align: left;
    /* Cập nhật quan trọng: Cho phép nội dung văn bản cuộn */
    overflow-y: auto;
    padding-right: 10px; /* Tạo khoảng trống cho thanh cuộn */
}

/* Tùy chỉnh thanh cuộn cho đẹp */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #7c3aed;
    border-radius: 10px;
}

.modal-body p {
    margin-bottom: 15px;
    border-bottom: 1px solid #f3f4f6; /* Thêm đường kẻ mờ để phân tách các dòng cho rõ ràng */
    padding-bottom: 10px;
}

.modal-body p:last-child {
    border-bottom: none;
}

.modal-body strong {
    color: #111827;
    font-weight: 700;
}

.modal-footer {
    flex-shrink: 0; /* Giữ nút "Đã hiểu" cố định ở dưới */
}

.modal-footer .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: white;
    transition: transform 0.2s;
}

.modal-footer .btn-primary:hover {
    transform: scale(1.02);
    opacity: 0.9;
}