/* ===== Toastr حديث ===== */
#toast-container {
    z-index: 999999;
}

#toast-container>div,
#toast-container>div.rtl {
    --c: #16a34a;
    position: relative;
    overflow: hidden;
    width: 392px;
    max-width: calc(100vw - 24px);
    margin: 0 auto 10px;
    /* !important: إعداد toastr rtl بيضيف كلاس .rtl بـ padding أقوى فكان النص يدخل تحت الأيقونة */
    padding-block: 14px !important;
    padding-inline-start: 72px !important;
    padding-inline-end: 46px !important;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    background: #fff;
    color: #1f2430;
    opacity: 1;
    background-image: none !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .06);
    animation: fx-toast-in .38s cubic-bezier(.22, 1, .36, 1);
}

#toast-container>div:hover {
    opacity: 1;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .22);
}

#toast-container>.toast-success {
    --c: #16a34a;
    --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

#toast-container>.toast-error {
    --c: #e11d48;
    --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

#toast-container>.toast-warning {
    --c: #f59e0b;
    --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}

#toast-container>.toast-info {
    --c: #0ea5e9;
    --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E");
}

/* الأيقونة: مربع ناعم + رمز ملوّن (في بداية البطاقة، والنص بعدها) */
#toast-container>div::before,
#toast-container>div::after {
    content: '';
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
}

#toast-container>div::before {
    border-radius: 13px;
    background: color-mix(in srgb, var(--c) 14%, #fff);
}

#toast-container>div::after {
    background: var(--c);
    -webkit-mask: var(--ico) center / 22px no-repeat;
    mask: var(--ico) center / 22px no-repeat;
}

#toast-container .toast-title {
    font-weight: 800;
    font-size: 14.5px;
    margin-bottom: 2px;
    text-align: start;
}

#toast-container .toast-message {
    font-size: 14px;
    line-height: 1.7;
    color: #2b303b;
    word-break: break-word;
    text-align: start;
}

#toast-container .toast-title+.toast-message {
    color: #6b7280;
}

#toast-container>div .toast-close-button {
    position: absolute;
    top: 8px;
    right: auto;
    left: auto;
    float: none;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 400;
    color: #9aa0b0;
    text-shadow: none;
    opacity: 1;
    inset-inline-end: 8px;
}

#toast-container>div .toast-close-button:hover {
    background: #f1f2f6;
    color: #222;
}

#toast-container .toast-progress {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    height: 3px;
    background: var(--c);
    opacity: .9;
    border-radius: 0 3px 3px 0;
}

@keyframes fx-toast-in {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 575px) {
    #toast-container {
        top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
        padding: 0 10px;
    }

    #toast-container>div {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #toast-container>div {
        animation: none;
    }
}