/* Enhanced Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(10px);
}

.chatbot-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.chatbot-toggle::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    background-color: #2ecc71;
    border-radius: 50%;
    border: 2px solid white;
    animation: online-glow 1.5s infinite ease-in-out;
}

@keyframes online-glow {
    0%, 100% {
        box-shadow: 0 0 5px #2ecc71, 0 0 10px #2ecc71;
    }
    50% {
        box-shadow: 0 0 15px #2ecc71, 0 0 20px #2ecc71;
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3); 
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6); 
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3); 
    }
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.chatbot-toggle::before {
    content: '💬';
    font-size: 18px;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: #f0f2f5;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ddd;
}

.chatbot-header {
    background: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.chatbot-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid white;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.chatbot-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

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

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    background: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 8px;
}

.message.bot {
    background: white;
    color: #333;
    border-bottom-left-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Quick action buttons */
.quick-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 16px;
    margin: 5px 3px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Interactive elements */
.pricing-calculator, .email-capture, .service-discovery {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.pricing-calculator h4, .email-capture h4, .service-discovery h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.calculator-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 14px;
    transition: border 0.3s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calculator-button, .email-submit, .service-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 8px 4px;
    display: inline-block;
}

.calculator-button:hover, .email-submit:hover, .service-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.service-option {
    display: block;
    width: 100%;
    margin: 8px 0;
    text-align: left;
    padding: 15px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.service-option:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(2px);
}

.chatbot-input {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #ddd;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border 0.3s ease;
}

.chatbot-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-input button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loading animation */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #667eea;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Success/confirmation messages */
.success-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive chatbot */
@media (max-width: 480px) {
    .chatbot-window {
        width: 95vw;
        height: 85vh;
        right: 2.5vw;
        bottom: 100px;
        border-radius: 15px;
    }
    
    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
        font-size: 14px;
    }
    
    .quick-action {
        font-size: 12px;
        padding: 8px 12px;
        margin: 3px 2px;
    }
    
    .pricing-calculator, .email-capture, .service-discovery {
        padding: 15px;
    }
}
