/* ============================================
   Global AI Auto-Reply Toggle - Styles
   ============================================ */

/* Global AI Toggle - Floating (appears on all pages) */
.global-ai-floating-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideInFromRight 0.5s ease-out;
}

.global-ai-toggle-btn-floating {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(42, 57, 66, 0.95) 0%, rgba(26, 39, 48, 0.95) 100%);
    border: 2px solid #374045;
    border-radius: 30px;
    color: #8696a0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.global-ai-toggle-btn-floating:hover {
    background: linear-gradient(135deg, rgba(42, 57, 66, 1) 0%, rgba(26, 39, 48, 1) 100%);
    border-color: #00a884;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 168, 132, 0.3);
}

.global-ai-toggle-btn-floating.active {
    background: linear-gradient(135deg, rgba(0, 168, 132, 0.9) 0%, rgba(0, 217, 168, 0.9) 100%);
    border-color: #00a884;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 168, 132, 0.4);
}

.global-ai-toggle-btn-floating.active:hover {
    background: linear-gradient(135deg, rgba(0, 168, 132, 1) 0%, rgba(0, 217, 168, 1) 100%);
    box-shadow: 0 6px 24px rgba(0, 168, 132, 0.5);
}

.global-ai-toggle-btn-floating .ai-icon {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.global-ai-toggle-btn-floating .ai-status-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.global-ai-toggle-btn-floating.active .ai-status-text {
    color: #fff;
}

.global-ai-toggle-btn-floating .toggle-switch {
    width: 44px;
    height: 24px;
    background: #374045;
    border-radius: 24px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.global-ai-toggle-btn-floating.active .toggle-switch {
    background: rgba(255, 255, 255, 0.3);
}

.global-ai-toggle-btn-floating .toggle-slider {
    width: 20px;
    height: 20px;
    background: #8696a0;
    border-radius: 50%;
    position: relative;
    left: 2px;
    transition: all 0.3s ease;
}

.global-ai-toggle-btn-floating.active .toggle-slider {
    background: #fff;
    left: 22px;
}

.global-ai-toggle-btn-floating:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Notification Styles */
.global-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 100000;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    max-width: 400px;
    color: white;
    will-change: opacity, transform;
}

.global-notification.success {
    background: #00a884;
}

.global-notification.warning {
    background: #ff9800;
}

.global-notification.error {
    background: #d32f2f;
}

.global-notification-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    will-change: opacity;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .global-ai-floating-toggle {
        top: 10px;
        right: 10px;
    }
    
    .global-ai-toggle-btn-floating {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .global-ai-toggle-btn-floating .ai-icon {
        font-size: 20px;
    }
    
    .global-ai-toggle-btn-floating .ai-status-text {
        display: none; /* Hide text on mobile to save space */
    }
}
