/* Import professional fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=SF+Pro+Display:wght@400;500;600&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=SF+Pro+Display:wght@400;500;600&display=swap');

/* AI Chatbot Styles */
.ai-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.ai-chatbot-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.ai-chatbot-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.ai-chatbot-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary-color, #007cba) 0%, #0056b3 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 24px;
}

.ai-chatbot-toggle:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.35), 0 3px 10px rgba(0, 0, 0, 0.15);
}

.ai-chatbot-widget {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.08);
    display: none;
    flex-direction: column;
    overflow: hidden;
    max-width: calc(100vw - 40px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-chatbot-widget.active {
    display: flex;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.ai-chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary-color, #007cba) 0%, #0056b3 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.ai-chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

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

.ai-chatbot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fafafa;
}

.ai-chatbot-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.ai-chatbot-message.user {
    background: linear-gradient(135deg, var(--chatbot-primary-color, #007cba) 0%, #0056b3 100%);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.ai-chatbot-message.bot {
    background: white;
    color: #2d3748;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ai-chatbot-message.bot strong {
    font-weight: 600;
    color: #1a202c;
}

.ai-chatbot-message.bot ul, .ai-chatbot-message.bot ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-chatbot-message.bot li {
    margin: 4px 0;
}

.ai-chatbot-input-container {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: white;
}

.ai-chatbot-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    resize: none;
    max-height: 100px;
    min-height: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f8fafc;
}

.ai-chatbot-input:focus {
    border-color: var(--chatbot-primary-color, #007cba);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ai-chatbot-input::placeholder {
    color: #a0aec0;
}

.ai-chatbot-send {
    background: linear-gradient(135deg, var(--chatbot-primary-color, #007cba) 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.ai-chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.ai-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-chatbot-typing {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    color: #718096;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    margin: 0 24px 8px 24px;
    align-self: flex-start;
    max-width: 85%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-bottom-left-radius: 6px;
}

.ai-chatbot-typing.active {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

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

.ai-chatbot-typing-text {
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
}

.ai-chatbot-typing-dots {
    display: flex;
    gap: 2px;
    align-items: center;
    margin-left: 6px;
}

.ai-chatbot-typing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
    animation: professionalTyping 1.8s infinite ease-in-out;
    opacity: 0.3;
}

.ai-chatbot-typing-dot:nth-child(1) {
    animation-delay: 0s;
}
.ai-chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}
.ai-chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes professionalTyping {
    0% {
        opacity: 0.3;
        transform: translateY(0px);
    }
    25% {
        opacity: 0.8;
        transform: translateY(-2px);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
    75% {
        opacity: 0.8;
        transform: translateY(-2px);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0px);
    }
}
/* Mobile responsive */
@media (max-width: 768px) {
    .ai-chatbot-widget {
        width: calc(100vw - 40px);
        height: 75vh;
        bottom: 85px;
        right: 20px;
    }
    
    .ai-chatbot-container.bottom-left .ai-chatbot-widget {
        left: 20px;
        right: auto;
    }
    
    .ai-chatbot-messages {
        padding: 20px;
        gap: 14px;
    }
    
    .ai-chatbot-input-container {
        padding: 16px 20px;
    }
}

/* Custom scrollbar */
.ai-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.ai-chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.ai-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Professional text formatting */
.ai-chatbot-message.bot p {
    margin: 0 0 8px 0;
}

.ai-chatbot-message.bot p:last-child {
    margin-bottom: 0;
}

.ai-chatbot-message.bot h1, .ai-chatbot-message.bot h2, .ai-chatbot-message.bot h3 {
    font-weight: 600;
    margin: 12px 0 6px 0;
    color: #1a202c;
}

.ai-chatbot-message.bot code {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    color: #e53e3e;
}
