/* ==========================================================================
   Toast Notification System
   ========================================================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: toastSlideIn 0.3s ease-out;
    border-left: 4px solid var(--secondary);
    pointer-events: auto;
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: #7c3aed;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mobile toast adjustments */
@media (max-width: 480px) {
    #toast-container {
        left: 8px;
        right: 8px;
        top: 12px;
    }

    .toast {
        min-width: unset;
        max-width: 100%;
    }
}

/* Dark Mode */
body.dark-mode .toast {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #334155;
}

body.dark-mode .toast-message {
    color: #e2e8f0;
}
