/* AI Business Chatbot Widget Styles */
#aibc-widget {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#aibc-widget.aibc-right { right: 20px; }
#aibc-widget.aibc-left { left: 20px; }

#aibc-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #fff;
}

#aibc-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

#aibc-toggle svg { width: 28px; height: 28px; }

#aibc-chat-container {
    position: absolute;
    bottom: 70px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#aibc-widget.aibc-right #aibc-chat-container { right: 0; }
#aibc-widget.aibc-left #aibc-chat-container { left: 0; }

#aibc-chat-container.aibc-hidden { display: none; }
#aibc-toggle.aibc-hidden { display: none; }

#aibc-header {
    padding: 16px 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

#aibc-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#aibc-close:hover { opacity: 1; }

#aibc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aibc-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
}

.aibc-user {
    background: #007bff;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.aibc-assistant {
    background: #f1f3f4;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#aibc-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.aibc-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: aibc-bounce 1.4s infinite ease-in-out;
}

.aibc-dot:nth-child(1) { animation-delay: -0.32s; }
.aibc-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aibc-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

#aibc-input-area {
    padding: 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

#aibc-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#aibc-input:focus { border-color: #007bff; }

#aibc-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: opacity 0.2s;
}

#aibc-send:hover { opacity: 0.9; }
#aibc-send svg { width: 20px; height: 20px; }

#aibc-lead-form {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

#aibc-lead-form.aibc-hidden { display: none; }

#aibc-lead-form p {
    margin: 0 0 12px;
    font-weight: 500;
}

#aibc-lead-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

#aibc-lead-form input:focus {
    outline: none;
    border-color: #007bff;
}

#aibc-submit-lead {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
}

#aibc-skip-lead {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

#aibc-skip-lead:hover { color: #333; }

/* Mobile Responsive */
@media (max-width: 480px) {
    #aibc-widget { bottom: 10px; }
    #aibc-widget.aibc-right { right: 10px; }
    #aibc-widget.aibc-left { left: 10px; }
    
    #aibc-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 65px;
    }
    
    #aibc-toggle {
        width: 54px;
        height: 54px;
    }
}
