/* Toast container (hidden automatically when empty) */
.e-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 12000 !important; /* higher than header 1020 */
    pointer-events: none;
    max-width: 520px;
}

/* Hide when no toasts (works with modern :has and fallback :empty) */
.e-toast-container:empty,
.e-toast-container:not(:has(.e-toast)) {
    display: none;
}

/* Individual toast */
.e-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    margin-bottom: 10px;
    border-left: 4px solid #0d6efd;
    display: flex;
    align-items: flex-start;
    animation: toastSlideIn .3s ease-out;
}

.e-toast .e-toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #212529;
}

.e-toast .e-toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
    flex: 1;
}

.e-toast .e-toast-close-icon {
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    margin-left: 12px;
}
.e-toast .e-toast-close-icon:hover {
    color: #212529;
}

/* Variants */
.e-toast.e-toast-success { border-left-color:#198754; background:#d1e7dd; }
.e-toast.e-toast-success .e-toast-title,
.e-toast.e-toast-success .e-toast-message { color:#0f5132; }

.e-toast.e-toast-warning { border-left-color:#ffc107; background:#fff3cd; }
.e-toast.e-toast-warning .e-toast-title,
.e-toast.e-toast-warning .e-toast-message { color:#664d03; }

.e-toast.e-toast-danger { border-left-color:#dc3545; background:#f8d7da; }
.e-toast.e-toast-danger .e-toast-title,
.e-toast.e-toast-danger .e-toast-message { color:#842029; }

.e-toast.e-toast-info { border-left-color:#0dcaf0; background:#cff4fc; }
.e-toast.e-toast-info .e-toast-title,
.e-toast.e-toast-info .e-toast-message { color:#055160; }

/* Animation */
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity:0; }
    to   { transform: translateX(0);   opacity:1; }
}