﻿/* =========================================
   COMPONENT: TOAST NOTIFICATIONS
   ========================================= */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 350px;
    background-color: var(--bg-card);
    color: var(--text-main);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.4s forwards cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 5px solid transparent;
    position: relative;
    overflow: hidden;
}

    .toast.success {
        border-left-color: var(--toast-success-bg);
    }

    .toast.error {
        border-left-color: var(--toast-error-bg);
    }

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast.success .toast-icon svg {
    fill: var(--toast-success-bg);
}

.toast.error .toast-icon svg {
    fill: var(--toast-error-bg);
}

.toast-content {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

    .toast-close:hover {
        color: var(--text-main);
        background-color: var(--disabled-bg);
    }

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Responsive Overrides */
@media (max-width: 480px) {
    #toast-container {
        right: 0;
        left: 0;
        top: 0;
        width: 100%;
        padding: 10px;
        align-items: center;
    }

    .toast {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}
