/* =========================================================
   TOAST NOTIFICATIONS (Dynamic Alerts)
========================================================= */

/* The container itself is a popover="manual" promoted to Top Layer */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    pointer-events: none; /* Let clicks pass through empty areas */
    /* Only allow popover default overrides */
    max-width: none;
    max-height: none;
}

/* Base style for individual toasts */
.toast {
    position: relative;
    pointer-events: auto; /* Re-enable clicks on the toast itself */
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
    min-width: 300px;
    max-width: 450px;
    border-left: 5px solid transparent;
    
    /* Animation implementation */
    opacity: 0;
    transform: translateX(50px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex-grow: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #1f2937;
}
