#toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}
#toast-container * {
    box-sizing: border-box;
}
#toast-container > div {
    pointer-events: auto;
}

.toast-top-center { top: 0; right: 0; width: 100%; }
.toast-bottom-center { bottom: 0; right: 0; width: 100%; }
.toast-top-full-width { top: 0; right: 0; width: 100%; }
.toast-bottom-full-width { bottom: 0; right: 0; width: 100%; }
.toast-top-left { top: 20px; left: 20px; }
.toast-top-right { top: 20px; right: 20px; }
.toast-bottom-right { right: 20px; bottom: 20px; }
.toast-bottom-left { bottom: 20px; left: 20px; }

#toast-container > .toast {
    position: relative;
    overflow: hidden;
    margin: 0 0 12px;
    min-width: 288px;
    max-width: 420px;
    padding: 16px 44px 20px 56px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-size: 0.875rem;
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 24px 24px;
    opacity: 1;
    animation: fx-toast-in 0.12s ease-out forwards;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
#toast-container { z-index: 2147483000 !important; }
#toast-container > .toast:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}
#toast-container > .toast.rtl {
    direction: rtl;
    padding: 16px 56px 20px 44px;
    background-position: right 18px center;
}

#toast-container > .toast-success {
    background-color: rgba(22,163,74,0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}
#toast-container > .toast-error {
    background-color: rgba(220,38,38,0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E");
}
#toast-container > .toast-warning {
    background-color: rgba(202,138,4,0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}
#toast-container > .toast-info {
    background-color: rgba(37,99,235,0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

#toast-container > .toast .toast-title {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
#toast-container > .toast .toast-message {
    font-size: 0.8125rem;
    opacity: 0.95;
    line-height: 1.45;
    word-wrap: break-word;
}
#toast-container > .toast .toast-message a,
#toast-container > .toast .toast-message label {
    color: #fff;
}
#toast-container > .toast .toast-message a:hover {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

#toast-container > .toast .toast-close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
}
#toast-container > .toast .toast-close-button:hover,
#toast-container > .toast .toast-close-button:focus {
    background: rgba(255,255,255,0.25);
    opacity: 1;
    outline: none;
}
.rtl #toast-container > .toast .toast-close-button {
    right: auto;
    left: 12px;
}

#toast-container > .toast .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.35);
    border-radius: 0 0 14px 14px;
}

#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
    margin-left: auto;
    margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
    width: 96%;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fx-toast-in {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

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

@media (max-width: 480px) {
    #toast-container {
        left: 0;
        right: 0;
        width: 100%;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    #toast-container > .toast {
        min-width: 0;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 10px;
        padding: 13px 40px 14px 48px;
        border-radius: 12px;
        font-size: 0.8rem;
    }
    #toast-container > .toast .toast-message {
        font-size: 0.77rem;
        line-height: 1.35;
    }
    #toast-container > .toast .toast-close-button {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }
    #toast-container > .toast.rtl {
        padding: 13px 48px 14px 40px;
    }
    .toast-top-right,
    .toast-bottom-right { right: 0; left: 0; width: 100%; }
    .toast-top-left,
    .toast-bottom-left { left: 0; right: 0; width: 100%; }
    .toast-bottom-center {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}
