/* ===================================
   Toast Notification Component
   =================================== */

.toast-container {
    position: fixed;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 14px;
}

.toast-success .toast-icon {
    background-color: var(--color-success);
    color: white;
}

.toast-error .toast-icon {
    background-color: var(--color-danger);
    color: white;
}

.toast-warning .toast-icon {
    background-color: var(--color-warning);
    color: white;
}

.toast-info .toast-icon {
    background-color: var(--color-info);
    color: white;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.toast-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--color-text);
}

.toast-message {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.5;
}

.toast-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--color-text);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: var(--spacing-lg);
        right: var(--spacing-md);
        left: var(--spacing-md);
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
