/* Floating Wrapper - defensively isolated */
.gmp-ai-chatbot-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 2147483647 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    direction: rtl !important;
    color: white !important;
}

.gmp-ai-chatbot-wrapper * {
    box-sizing: border-box !important;
    line-height: normal !important;
}

/* Toggle Button */
.gmp-ai-chatbot-toggle-btn {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background-color: #00b140 !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gmp-ai-chatbot-toggle-btn svg {
    stroke: white !important;
    fill: none !important;
}

.gmp-ai-chatbot-toggle-btn:hover {
    transform: scale(1.05) !important;
}

/* Chat Window */
.gmp-ai-chatbot-window {
    position: absolute !important;
    bottom: 80px !important;
    right: 0 !important;
    width: 350px !important;
    height: 500px !important;
    max-height: 80vh !important;
    background-color: #1a1a1a !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    transform-origin: bottom right !important;
    border: 1px solid #333 !important;
}

.gmp-ai-chatbot-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.9) !important;
}

/* Header */
.gmp-ai-chatbot-header {
    background-color: #00b140 !important;
    color: white !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
}

.gmp-ai-chatbot-title {
    margin: 0 !important;
    color: white !important;
}

.gmp-ai-chatbot-close-btn {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
}

.gmp-ai-chatbot-close-btn:hover {
    color: #e0e0e0 !important;
}

/* Messages Area */
.gmp-ai-chatbot-messages {
    flex: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    background-color: #121212 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* Scrollbar */
.gmp-ai-chatbot-messages::-webkit-scrollbar {
    width: 6px !important;
}
.gmp-ai-chatbot-messages::-webkit-scrollbar-track {
    background: #1a1a1a !important;
}
.gmp-ai-chatbot-messages::-webkit-scrollbar-thumb {
    background: #444 !important;
    border-radius: 3px !important;
}

/* Message Bubbles */
.gmp-ai-chatbot-message {
    max-width: 85% !important;
    padding: 10px 15px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
}

.gmp-ai-chatbot-bot {
    align-self: flex-start !important;
    background-color: #2a2a2a !important;
    color: #f0f0f0 !important;
    border-bottom-right-radius: 2px !important;
}

.gmp-ai-chatbot-user {
    align-self: flex-end !important;
    background-color: #00b140 !important;
    color: white !important;
    border-bottom-left-radius: 2px !important;
}

/* Typing Indicator */
.gmp-ai-chatbot-typing {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 15px !important;
}

.gmp-ai-chatbot-dot {
    width: 8px !important;
    height: 8px !important;
    background-color: #888 !important;
    border-radius: 50% !important;
    animation: gmp-ai-chatbot-bounce 1.4s infinite ease-in-out both !important;
}

.gmp-ai-chatbot-dot:nth-child(1) { animation-delay: -0.32s !important; }
.gmp-ai-chatbot-dot:nth-child(2) { animation-delay: -0.16s !important; }

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

/* Input Area */
.gmp-ai-chatbot-input-area {
    display: flex !important;
    padding: 15px !important;
    background-color: #1a1a1a !important;
    border-top: 1px solid #333 !important;
    gap: 10px !important;
    align-items: center !important;
}

.gmp-ai-chatbot-input {
    flex: 1 !important;
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    border-radius: 20px !important;
    padding: 10px 15px !important;
    color: white !important;
    outline: none !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.gmp-ai-chatbot-input::placeholder {
    color: #aaa !important;
}

.gmp-ai-chatbot-input:focus {
    border-color: #00b140 !important;
}

.gmp-ai-chatbot-send-btn {
    background-color: #00b140 !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.gmp-ai-chatbot-send-btn svg {
    stroke: white !important;
    fill: none !important;
    margin-left: -2px !important; /* Visual center */
}

.gmp-ai-chatbot-send-btn:hover {
    background-color: #009938 !important;
}

/* Quick Buttons */
.gmp-ai-chatbot-quick-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.gmp-ai-chatbot-quick-btn {
    background-color: #2a2a2a !important; /* Changed to dark instead of transparent */
    border: 1px solid #444 !important; /* Neutral border instead of green */
    color: white !important; /* Force white text */
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    font-family: inherit !important;
    margin: 0 !important;
}

.gmp-ai-chatbot-quick-btn:hover {
    background-color: #00b140 !important;
    border-color: #00b140 !important;
    color: white !important;
}

/* Contact Info HTML Content */
.gmp-ai-chatbot-html-content {
    background-color: #2a2a2a !important;
    color: #f0f0f0 !important;
    border-radius: 12px !important;
    border-bottom-right-radius: 2px !important;
    padding: 15px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    max-width: 85% !important;
}

.gmp-ai-chatbot-html-content.gmp-ai-chatbot-user {
    background-color: #00b140 !important;
    border-bottom-right-radius: 12px !important;
    border-bottom-left-radius: 2px !important;
}

.gmp-ai-chatbot-contact-info p {
    margin: 0 0 5px 0 !important;
    color: #f0f0f0 !important;
}

.gmp-ai-chatbot-contact-info p:first-child {
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

.gmp-ai-chatbot-contact-buttons {
    display: flex !important;
    gap: 10px !important;
    margin-top: 15px !important;
    flex-wrap: wrap !important;
}

.gmp-ai-chatbot-btn-call,
.gmp-ai-chatbot-btn-wa {
    display: inline-block !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-align: center !important;
    transition: opacity 0.2s ease !important;
    margin: 0 !important;
}

.gmp-ai-chatbot-btn-call {
    background-color: #007bff !important;
    color: white !important;
}

.gmp-ai-chatbot-btn-wa {
    background-color: #25D366 !important;
    color: white !important;
}

.gmp-ai-chatbot-btn-call:hover,
.gmp-ai-chatbot-btn-wa:hover {
    opacity: 0.85 !important;
    color: white !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gmp-ai-chatbot-wrapper {
        bottom: 15px !important;
        right: 15px !important;
    }
    .gmp-ai-chatbot-window {
        width: calc(100vw - 30px) !important;
        height: 75vh !important;
        max-height: 550px !important;
        bottom: 75px !important;
        right: 0 !important;
    }
}
