/* AI Assistant Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    animation: pulse-glow 3s infinite;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.5); }
}

.chat-icon {
    font-size: 1.25rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.chat-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-container {
    display: none;
    flex-direction: column;
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

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

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25rem;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-input-container {
    display: flex;
    padding: 1rem;
    gap: 0.5rem;
    border-top: 1px solid var(--border-primary);
}

#chatInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

#chatInput:focus {
    border-color: var(--primary);
}

#chatSend {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

#chatSend:hover {
    transform: translateY(-1px);
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
}

.quick-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 4.5rem;
        left: 50%;
        transform: translateX(-80px);
        right: auto;
    }
    
    .chat-container {
        width: calc(100vw - 2rem);
        max-width: 350px;
        height: 450px;
        left: 0;
        right: auto;
    }
    
    .chat-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .chat-text {
        display: none;
    }
    
    .chat-icon {
        font-size: 1rem;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}