/* Global Toast Notification System */
.global-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    max-width: 400px;
    min-width: 300px;
    color: #1f2937;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.global-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.global-toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Toast Types */
.global-toast.success {
    border-left: 4px solid #10b981;
}

.global-toast.error {
    border-left: 4px solid #ef4444;
}

.global-toast.warning {
    border-left: 4px solid #f59e0b;
}

.global-toast.info {
    border-left: 4px solid #3b82f6;
}

/* Toast Content */
.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.global-toast.success .toast-icon {
    background: #10b981;
    color: white;
}

.global-toast.error .toast-icon {
    background: #ef4444;
    color: white;
}

.global-toast.warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.global-toast.info .toast-icon {
    background: #3b82f6;
    color: white;
}

.toast-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0;
}

.toast-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.toast-action-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toast-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.toast-action-btn.primary {
    background: #3b82f6;
    color: white;
}

.toast-action-btn.primary:hover {
    background: #2563eb;
}

.toast-action-btn.danger {
    background: #ef4444;
    color: white;
}

.toast-action-btn.danger:hover {
    background: #dc2626;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6b7280;
    opacity: 1;
}

.toast-close svg {
    width: 12px;
    height: 12px;
}

/* Stacking for multiple toasts - handled by JavaScript */

/* Mobile responsiveness */
@media (max-width: 768px) {
    .global-toast {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100%);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .global-toast.show {
        transform: translateY(0);
    }
    
    .global-toast.fade-out {
        transform: translateY(-100%);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    /* Mobile stacking handled by JavaScript */
}

/* Animation keyframes */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes toastSlideInMobile {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideOutMobile {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}
