/* Simple Toast Notification Styles */

:root {
    --toast-width: 380px;
    --toast-bg: rgba(255, 255, 255, 0.95);
    --toast-border: 1px solid rgba(226, 232, 240, 0.8);
    --toast-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --toast-radius: 12px;
}

#toast-container {
    position: fixed !important;
    top: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 999999 !important; /* Always on top */
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    pointer-events: none !important; /* Let clicks pass through empty space */
    visibility: visible !important;
}

.toast {
    width: var(--toast-width);
    max-width: 90vw;
    background: var(--toast-bg);
    border: var(--toast-border);
    border-radius: var(--toast-radius);
    box-shadow: var(--toast-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    padding: 1rem;
    display: flex !important;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    pointer-events: auto !important;

    opacity: 1 !important; /* Force visible */
    visibility: visible !important;
    transform: translate3d(0, 0, 0);

    animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.toast-success { border-left: 4px solid #10b981; }
.toast.toast-error   { border-left: 4px solid #ef4444; }
.toast.toast-warning { border-left: 4px solid #f59e0b; }
.toast.toast-info    { border-left: 4px solid #3b82f6; }

.toast-icon {
    flex-shrink: 0;
    margin-right: 0.875rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    height: 1.5rem; /* Optical alignment with text */
}

.toast-success .toast-icon { color: #059669; }
.toast-error .toast-icon   { color: #dc2626; }
.toast-warning .toast-icon { color: #d97706; }
.toast-info .toast-icon    { color: #2563eb; }

.toast-close {
    flex-shrink: 0;
    margin-left: 0.75rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

.toast-body {
    flex-grow: 1;
    color: #1e293b; /* Slate-800 */
    font-size: 0.925rem;
    line-height: 1.5;
    font-weight: 500;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.08);
    transform-origin: left;
    /* Animation handled by JS adding a class/style */
}
/* Hover Effect: Pause Animation */
.toast:hover .toast-progress {
    animation-play-state: paused !important;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateX(10px);
    }
}

.toast.hiding {
    animation: toastFadeOut 0.3s ease forwards;
}