/* ZLD Partners Chatbot Styles */

#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Bubble */
.chatbot-bubble {
    width: 60px;
    height: 60px;
    background: #2c364f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: white;
}

.chatbot-bubble:hover {
    background: #b18f2e;
    transform: scale(1.1);
}

.chatbot-bubble svg {
    width: 28px;
    height: 28px;
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header */
.chatbot-header {
    background: #2c364f;
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-header-content p {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

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

/* Messages Container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

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

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

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

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

/* Message Styles */
.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    animation: messageSlide 0.3s ease;
}

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

.chatbot-message-user {
    justify-content: flex-end;
}

.chatbot-message-bot {
    justify-content: flex-start;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-message-user .chatbot-message-content {
    background: #b18f2e;
    color: white;
    border-bottom-right-radius: 4px;
}

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

/* Input Container */
.chatbot-input-container {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

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

.chatbot-input:focus {
    border-color: #b18f2e;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #b18f2e;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-send:hover {
    background: #967320;
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
}

/* Typing Indicator */
.typing-indicator .chatbot-message-content {
    padding: 16px 20px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

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

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

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

/* Lead Summary Styles */
.lead-summary {
    background: #f8f9fa;
    border: 2px solid #b18f2e;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.lead-summary h4 {
    margin: 0 0 12px;
    color: #2c364f;
    font-size: 16px;
}

.lead-details {
    background: white;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
}

.lead-details p {
    margin: 6px 0;
    font-size: 13px;
}

.lead-details strong {
    color: #2c364f;
}

.demo-note {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 4px;
    margin-top: 12px;
}

.demo-note p {
    margin: 0;
    font-size: 12px;
    color: #1976d2;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-window.active {
        position: fixed;
        top: 0;
        left: 0;
    }
    
    .chatbot-header {
        border-radius: 0;
    }
    
    .chatbot-bubble {
        width: 56px;
        height: 56px;
    }
}

/* Utility Classes */
.chatbot-link {
    color: #b18f2e;
    text-decoration: none;
    font-weight: 500;
}

.chatbot-link:hover {
    text-decoration: underline;
}

.chatbot-button {
    display: inline-block;
    padding: 8px 16px;
    background: #b18f2e;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin: 4px 0;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.chatbot-button:hover {
    background: #967320;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding: 0 4px;
}

.quick-action-button {
    background: #f0f2f5;
    border: 1px solid #e4e6ea;
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 14px;
    color: #2c364f;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-action-button:hover {
    background: #b18f2e;
    color: white;
    border-color: #b18f2e;
    transform: translateY(-1px);
}

.quick-action-button:active {
    transform: translateY(0);
}