/**
 * Toast Notification Styles
 * Non-blocking notifications for success, error, info, and warning
 */

/* Toast Container */
.ux-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

/* Toast */
.ux-toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.ux-toast--active {
    transform: translateX(0);
    opacity: 1;
}

.ux-toast--closing {
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
}

/* Toast Content */
.ux-toast__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.ux-toast__icon {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ux-toast__message {
    font-size: 0.9rem;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Toast Actions */
.ux-toast__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ux-toast__btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 500;
}

.ux-toast__btn--undo {
    color: #3a3a7c;
}

.ux-toast__btn--undo:hover {
    background: #f0f0ff;
}

.ux-toast__btn--close {
    color: #666;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ux-toast__btn--close:hover {
    color: #1a1a1a;
    background: #f8f9fa;
}

/* Toast Types */
.ux-toast--success {
    border-left: 4px solid #28a745;
}

.ux-toast--success .ux-toast__icon {
    background: #28a745;
    color: white;
}

.ux-toast--error {
    border-left: 4px solid #dc3545;
}

.ux-toast--error .ux-toast__icon {
    background: #dc3545;
    color: white;
}

.ux-toast--warning {
    border-left: 4px solid #ffc107;
}

.ux-toast--warning .ux-toast__icon {
    background: #ffc107;
    color: #1a1a1a;
}

.ux-toast--info {
    border-left: 4px solid #17a2b8;
}

.ux-toast--info .ux-toast__icon {
    background: #17a2b8;
    color: white;
}

/* Toast Progress Bar */
.ux-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.ux-toast__progress-bar {
    height: 100%;
    background: currentColor;
    animation: toastProgress linear forwards;
    transform-origin: left;
}

.ux-toast--success .ux-toast__progress-bar {
    background: #28a745;
}

.ux-toast--error .ux-toast__progress-bar {
    background: #dc3545;
}

.ux-toast--warning .ux-toast__progress-bar {
    background: #ffc107;
}

.ux-toast--info .ux-toast__progress-bar {
    background: #17a2b8;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .ux-toast-container {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .ux-toast {
        min-width: 0;
        transform: translateY(calc(100% + 2rem));
    }

    .ux-toast--active {
        transform: translateY(0);
    }

    .ux-toast--closing {
        transform: translateY(calc(100% + 2rem));
    }
}
