/* ==========================================================================
   ZLH Travel - Premium AI Chatbot Styling
   ========================================================================== */

/* Floating Chat Bubble Toggle */
.zlh-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.zlh-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1b814, #cca010);
    box-shadow: 0 8px 32px rgba(241, 184, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.zlh-chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(241, 184, 20, 0.6);
}

.zlh-chat-bubble svg {
    width: 28px;
    height: 28px;
    fill: #000;
}

/* Chat Window Container */
.zlh-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 390px;
    height: 540px;
    background: rgba(12, 13, 16, 0.88);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 1px rgba(241, 184, 20, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    z-index: 2147483647 !important;
}

.zlh-chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header styling */
.zlh-chat-header {
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zlh-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zlh-chat-header-status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #2ec4b6;
    box-shadow: 0 0 10px #2ec4b6;
    animation: glow-pulse 1.8s infinite ease-in-out;
}

.zlh-chat-header-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.zlh-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zlh-chat-action-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.zlh-chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

.zlh-chat-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.zlh-chat-close-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* Chat Messages Log */
.zlh-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: radial-gradient(circle at bottom right, rgba(241, 184, 20, 0.025), transparent 70%);
}

.zlh-message-bubble {
    max-width: 82%;
    padding: 13px 17px;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.5;
    animation: message-slide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    word-break: break-word;
}

.zlh-message-bubble.assistant {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.93);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zlh-message-bubble.user {
    background: linear-gradient(135deg, #f1b814, #d49c0d);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(241, 184, 20, 0.25);
}

/* Typing indicator */
.zlh-typing-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.zlh-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #f1b814;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

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

/* Input Controls Footer */
.zlh-chat-input-area {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: center;
}

.zlh-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 12px 16px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
}

.zlh-chat-input:focus {
    border-color: rgba(241, 184, 20, 0.6);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(241, 184, 20, 0.12);
}

.zlh-chat-send-btn {
    background: linear-gradient(135deg, #f1b814, #d49c0d);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(241, 184, 20, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.zlh-chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 184, 20, 0.45);
}

.zlh-chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #000;
}

/* Attachment button */
#zlh-attach-btn {
    flex-shrink: 0;
    transition: all 0.2s ease;
}

#zlh-attach-btn:hover {
    background: rgba(241, 184, 20, 0.15) !important;
    border-color: rgba(241, 184, 20, 0.4) !important;
    transform: scale(1.05);
}


/* Animations */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(46, 196, 182, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 196, 182, 0);
    }
}

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

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

/* Custom Scrollbar for Messages */
.zlh-chat-messages::-webkit-scrollbar {
    width: 5px;
}

.zlh-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.zlh-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.zlh-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile Touch Smoothness & Bottom-Sheet Layout */
.zlh-chat-window {
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}

.zlh-chat-messages {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 480px) {
    .zlh-chat-widget {
        bottom: 16px !important;
        right: 16px !important;
    }
    .zlh-chat-bubble {
        width: 52px !important;
        height: 52px !important;
    }
    .zlh-chat-window {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: auto !important;
        border-radius: 0 !important;
        max-height: none !important;
    }
    .zlh-chat-input {
        font-size: 15px !important; /* Touch friendly font size */
    }
}


/* CTA Launch Chat Button Styling & Spacing */
.chat-launch-button {
    margin-top: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.chat-launch-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(241, 184, 20, 0.25) !important;
}

/* RTL Support for Arabic Language */
[dir="rtl"] .zlh-chat-window {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .zlh-chat-header-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .zlh-chat-input-area {
    flex-direction: row-reverse;
}

[dir="rtl"] .zlh-message-bubble.assistant {
    align-self: flex-start;
    border-radius: 18px 18px 4px 18px;
}

[dir="rtl"] .zlh-message-bubble.user {
    align-self: flex-end;
    border-radius: 18px 18px 18px 4px;
}


