/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000; /* Cao hơn cả Modal */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background-color: #ffffff; /* Background trắng */
    color: #333; /* Chữ đen */
    padding: 16px 24px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%); /* Hiện ra từ bên phải */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.35);
    min-width: 280px;
    max-width: 400px;
    position: relative;
    overflow: hidden; /* Để ẩn thanh progress tràn ra ngoài border-radius */
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-message {
    font-weight: 600; /* Chữ hơi đậm */
    font-size: 15px;
}

/* Thanh vạch thời gian ở dưới */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(0,0,0,0.1);
}

.toast-progress::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #ddd; /* Màu mặc định */
}

/* Màu sắc theo loại Toast */
.toast.success .toast-progress::before { background-color: #28a745; }
.toast.error .toast-progress::before { background-color: #dc3545; }
.toast.info .toast-progress::before { background-color: #17a2b8; }

/* Animation cho thanh progress */
@keyframes progressAnim {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.show .toast-progress::before {
    animation: progressAnim 3s linear forwards; /* 3s trùng với thời gian tắt trong JS */
}