.swal2-container {
    top: 1rem !important;
    left: 1rem !important;
    align-items: flex-start !important; /* اعلان‌ها سمت بالا قرار بگیرند */
    justify-content: flex-start !important; /* سمت چپ */
}

.swal2-popup.custom-toast {
    animation: slideInFromRight 0.6s ease-out, slideOutToLeft 0.6s ease-in 3.5s;
    border-radius: 20px; /* گوشه‌های گرد */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    font-weight: bold;
    color: #111 !important;
    min-width: 300px;
}

    /* پس‌زمینه و رنگ متن هماهنگ با نوع اعلان */
    .swal2-popup.custom-toast.swal2-success {
        background: linear-gradient(45deg, #a8e063, #56ab2f);
        color: #111 !important;
    }

    .swal2-popup.custom-toast.swal2-error {
        background: linear-gradient(45deg, #f85032, #e73827);
        color: #111 !important;
    }

    .swal2-popup.custom-toast.swal2-warning {
        background: linear-gradient(45deg, #f7971e, #ffd200);
        color: #111 !important;
    }

    .swal2-popup.custom-toast.swal2-info {
        background: linear-gradient(45deg, #56ccf2, #2f80ed);
        color: #111 !important;
    }

/* انیمیشن ورودی از راست و خروج به چپ */
@keyframes slideInFromRight {
    0% {
        transform: translateX(150%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-150%);
        opacity: 0;
    }
}


/* ردیف سبز */
.toast-line-success {
    background-color: #d4edda;
    color: #155724;
    border-right: 5px solid #28a745;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 13px;
}

/* ردیف زرد */
.toast-line-warning {
    background-color: #fff3cd;
    color: #856404;
    border-right: 5px solid #ffc107;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 13px;
}

/* ردیف قرمز */
.toast-line-error {
    background-color: #f8d7da;
    color: #721c24;
    border-right: 5px solid #dc3545;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 13px;
}
/* دکمه بستن در بالا سمت راست */
.swal2-popup.toast-group-popup .swal2-close {
    position: absolute;
    top: 10px;
    right: 10px; /* به جای left، از right استفاده کن */
    left: auto !important;
    font-size: 1.2rem;
    color: #333;
    z-index: 12000 !important;
}

/* عرض بیشتر برای Popup مرکزی */
.swal2-popup.toast-group-popup {
    width: 750px !important;
    max-width: 90%;
}

/* کادر محتوای Toast */
.custom-toast-group {
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    font-size: 14px;
    text-align: right;
    direction: rtl;
}

#toast-container .swal2-container {
    z-index: 15000 !important;
    pointer-events: none; /* جلوی مسدود کردن کلیک‌ها رو می‌گیره */
}

#toast-container .swal2-popup.custom-toast {
    z-index: 15001 !important;
    pointer-events: auto;
}