/**
 * Banza Bridge Foundation - AI Assistant Styles
 * Interactive AI assistant for guiding users through the website
 */

/* AI Assistant Container */
.ai-assistant {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 350px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(235, 181, 64, 0.3);
    z-index: 1000;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ai-assistant.active {
    transform: translateY(0);
    opacity: 1;
}

/* AI Assistant Header */
.ai-assistant-header {
    background: linear-gradient(135deg, #EBB540, #D9A429);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.ai-assistant-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.ai-assistant-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.ai-assistant-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.ai-assistant-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.ai-assistant-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* AI Assistant Content */
.ai-assistant-content {
    padding: 1.5rem;
    max-height: 350px;
    overflow-y: auto;
}

.ai-message {
    background: #f8f9fa;
    border-radius: 15px 15px 15px 5px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: slideInMessage 0.3s ease-out;
}

.ai-message::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5px;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-right-color: #f8f9fa;
    border-bottom: 0;
}

.ai-message.typing {
    opacity: 0.7;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #EBB540;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* AI Assistant Actions */
.ai-assistant-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-action-btn {
    background: #EBB540;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.ai-action-btn:hover {
    background: #D9A429;
    transform: translateY(-1px);
}

.ai-action-btn.secondary {
    background: transparent;
    color: #EBB540;
    border: 1px solid #EBB540;
}

.ai-action-btn.secondary:hover {
    background: #EBB540;
    color: white;
}

/* AI Assistant Toggle Button */
.ai-assistant-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #EBB540, #D9A429);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(235, 181, 64, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.ai-assistant-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(235, 181, 64, 0.6);
}

.ai-assistant-toggle.active {
    background: #666;
    animation: none;
}

/* Tour Highlight Overlay */
.tour-highlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tour-highlight.active {
    opacity: 1;
    visibility: visible;
}

.tour-spotlight {
    position: absolute;
    background: transparent;
    border: 3px solid #EBB540;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    pointer-events: none;
}

.tour-tooltip {
    position: absolute;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    z-index: 1001;
}

.tour-tooltip h4 {
    margin: 0 0 0.5rem 0;
    color: #EBB540;
    font-size: 1rem;
}

.tour-tooltip p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Dark Mode Styles */
.dark-mode .ai-assistant {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(235, 181, 64, 0.5);
}

.dark-mode .ai-message {
    background: #333;
    color: #e0e0e0;
}

.dark-mode .ai-message::before {
    border-right-color: #333;
}

.dark-mode .ai-assistant-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .tour-tooltip {
    background: #333;
    color: #e0e0e0;
}

/* Animations */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(235, 181, 64, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(235, 181, 64, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(235, 181, 64, 0.4);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-assistant {
        width: 300px;
        left: 20px;
        bottom: 80px;
    }
    
    .ai-assistant-toggle {
        left: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .tour-tooltip {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .ai-assistant {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
    
    .ai-assistant-actions {
        flex-direction: column;
    }
    
    .ai-action-btn {
        min-width: auto;
    }
}
