/* Grand Ellora AI Chatbot Widget */

/* ── WhatsApp Floating Button ── */
#ge-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

#ge-whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
}

#ge-whatsapp-btn svg {
    width: 30px;
    height: 30px;
    fill: #FFFFFF;
}

/* WhatsApp tooltip */
#ge-whatsapp-btn .ge-wa-tooltip {
    position: absolute;
    right: 66px;
    white-space: nowrap;
    background: #FFFFFF;
    color: #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#ge-whatsapp-btn .ge-wa-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #FFFFFF;
    border-right: none;
}

#ge-whatsapp-btn:hover .ge-wa-tooltip {
    opacity: 1;
}

/* ── Chat Toggle Button ── */
#ge-chatbot-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4A84B 0%, #B8923D 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 168, 75, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#ge-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(212, 168, 75, 0.6);
}

#ge-chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: #0A2E2A;
}

#ge-chatbot-toggle .close-icon {
    display: none;
    font-size: 28px;
    color: #0A2E2A;
    font-weight: bold;
    line-height: 1;
}

#ge-chatbot-toggle.active svg {
    display: none;
}

#ge-chatbot-toggle.active .close-icon {
    display: block;
}

/* Pulse ring animation on chat button */
#ge-chatbot-toggle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(212, 168, 75, 0.6);
    animation: gePulseRing 2.5s ease-out infinite;
}

#ge-chatbot-toggle.active::before {
    display: none;
}

@keyframes gePulseRing {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Notification badge on chat button */
.ge-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #E53935;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    animation: geBadgePop 0.4s ease;
}

@keyframes geBadgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#ge-chatbot-toggle.active .ge-chat-badge {
    display: none;
}

/* Chat CTA label — slides in from right */
.ge-chat-cta {
    position: fixed;
    bottom: 110px;
    right: 100px;
    background: #FFFFFF;
    color: #0A2E2A;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
    z-index: 9997;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    animation: geCTASlideIn 0.5s ease 3s forwards;
    cursor: pointer;
}

.ge-chat-cta::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: #FFFFFF;
    border-right: none;
}

.ge-chat-cta .ge-cta-close {
    margin-left: 10px;
    opacity: 0.4;
    font-weight: 400;
    font-size: 15px;
    cursor: pointer;
}

.ge-chat-cta .ge-cta-close:hover {
    opacity: 1;
}

#ge-chatbot-toggle.active ~ .ge-chat-cta {
    display: none;
}

@keyframes geCTASlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Chat Panel */
#ge-chatbot-panel {
    display: none;
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.3s ease forwards;
}

#ge-chatbot-panel.active {
    display: flex;
}

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

/* Chat Header */
.ge-chat-header {
    background: linear-gradient(135deg, #0A2E2A 0%, #0D3D38 100%);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ge-chat-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ge-chat-header-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ge-chat-header-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: #D4A84B;
    margin: 0;
    line-height: 1.2;
}

.ge-chat-header-info p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin: 2px 0 0;
}

/* Close button inside chat header */
.ge-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 26px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.ge-chat-close:hover {
    color: #FFFFFF;
}

/* Chat Messages */
.ge-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F8FAF8;
}

.ge-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.ge-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 75, 0.3);
    border-radius: 2px;
}

.ge-chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 12px;
    word-wrap: break-word;
}

.ge-chat-msg.bot {
    background: #0A2E2A;
    color: #FFFFFF;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ge-chat-msg.user {
    background: #D4A84B;
    color: #0A2E2A;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.ge-chat-msg.bot a {
    color: #E8C068;
    text-decoration: underline;
}

.ge-chat-typing {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: #0A2E2A;
    align-self: flex-start;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    max-width: 80px;
}

.ge-chat-typing span {
    width: 8px;
    height: 8px;
    background: #D4A84B;
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* Chat Input */
.ge-chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: #FFFFFF;
    flex-shrink: 0;
}

.ge-chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.ge-chat-input-area input:focus {
    border-color: #D4A84B;
}

.ge-chat-input-area button {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #D4A84B;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.ge-chat-input-area button:hover {
    background: #B8923D;
}

.ge-chat-input-area button svg {
    width: 20px;
    height: 20px;
    fill: #0A2E2A;
}

/* ── Voice Mic Button ── */
#ge-chat-mic {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #0A2E2A;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

#ge-chat-mic:hover {
    background: #134840;
}

#ge-chat-mic svg {
    width: 20px;
    height: 20px;
    fill: #D4A84B;
}

#ge-chat-mic.ge-mic-active {
    background: #D4A84B;
    animation: geMicPulse 1.5s ease-in-out infinite;
}

#ge-chat-mic.ge-mic-active svg {
    fill: #0A2E2A;
}

@keyframes geMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 75, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(212, 168, 75, 0); }
}

/* ── Speaker Toggle Button ── */
.ge-voice-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.ge-voice-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ge-voice-toggle svg {
    width: 20px;
    height: 20px;
    fill: rgba(255, 255, 255, 0.7);
    transition: fill 0.3s ease;
}

.ge-voice-toggle:hover svg {
    fill: #D4A84B;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #ge-chatbot-panel {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    /* WhatsApp → bottom-left */
    #ge-whatsapp-btn {
        bottom: 20px;
        left: 20px;
        right: auto;
        width: 50px;
        height: 50px;
    }

    #ge-whatsapp-btn svg {
        width: 26px;
        height: 26px;
    }

    #ge-whatsapp-btn .ge-wa-tooltip {
        display: none;
    }

    /* Chat toggle → bottom-right */
    #ge-chatbot-toggle {
        bottom: 20px;
        right: 20px;
    }

    /* CTA centered between WhatsApp (left) and Chat (right) */
    .ge-chat-cta {
        bottom: 25px;
        left: 80px;
        right: 90px;
        font-size: 11px;
        padding: 10px 12px;
        text-align: center;
        white-space: normal;
        max-width: none;
    }

    /* Hide arrow on mobile — CTA sits between buttons */
    .ge-chat-cta::after {
        display: none;
    }
}
