    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-color: #ffffff;
    --msg-bg-ai: #f3f4f6;
    --text-main: #1f2937;
    --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.2);
}
/* 🚫 Sirf Inbox page par AI ko hide karne ke liye */
.inbox-page #ai-fab, 
.inbox-page #ai-greeting-bubble {
    display: none !important;
}
/* 👋 Proactive Greeting Bubble */
#ai-greeting-bubble {
    position: fixed;
    bottom: 150px;
    right: 30px;
    background: white;
    color: #1f2937;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; /* Click through initially */
}
#ai-greeting-bubble.show {
    animation: bubblePulse 2s infinite ease-in-out;
}

@keyframes bubblePulse {
    0% { box-shadow: 0 5px 20px rgba(99, 102, 241, 0.15); }
    50% { box-shadow: 0 5px 30px rgba(99, 102, 241, 0.4); }
    100% { box-shadow: 0 5px 20px rgba(99, 102, 241, 0.15); }
}
/* Bubble Tail (Niche ka tikona) */
#ai-greeting-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
}

/* Active State */
#ai-greeting-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
    cursor: pointer;
}

/* Close 'X' inside bubble */
.bubble-close {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
    cursor: pointer;
}
.bubble-close:hover { color: #ef4444; }
/* 1. Floating Button (Sparkle Icon Support) */
#ai-fab {
    position: fixed; bottom: 70px; right: 20px;
    width: 60px; height: 60px;
    background: var(--primary-grad);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    z-index: 10000; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#ai-fab:hover { transform: scale(1.1); }
#ai-fab svg { width: 20px; height: 20px; }

/* 2. Chat Box Container */
#ai-box {
    position: fixed; bottom: 150px; right: 20px;
    width: 420px; height: 700px; max-height: 80vh;
    background: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: flex; flex-direction: column;
    font-family: 'Inter', sans-serif;
    z-index: 10000;
    opacity: 0; transform: translateY(20px) scale(0.98);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#ai-box.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* Mobile Support */
@media (max-width: 480px) {
    #ai-box { width: 90%; right: 5%; left: 5%; bottom: 100px; height: 70vh; }
}

/* 3. Header */
#ai-header {
    background: var(--primary-grad);
    padding: 20px; color: white;
    border-radius: 16px 16px 0 0;
    display: flex; justify-content: space-between; align-items: center;
}
.ai-title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ai-close { cursor: pointer; font-size: 18px; opacity: 0.8; }
.dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block; }

/* 4. Messages */
#ai-messages {
    flex: 1; padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 15px;
}
.msg {
    max-width: 80%; padding: 12px 16px;
    font-size: 14px; line-height: 1.5;
    border-radius: 18px; position: relative; word-wrap: break-word;
}
.msg.ai { background: var(--msg-bg-ai); color: var(--text-main); border-bottom-left-radius: 4px; }
.msg.user { background: var(--text-main); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

/* Professional Links (Pills) */
.msg a {
    color: #4f46e5; text-decoration: none; font-weight: 600;
    background: rgba(79, 70, 229, 0.1); padding: 2px 8px;
    border-radius: 6px; transition: all 0.2s;
}
.msg.user a { color: #fff; background: rgba(255,255,255,0.2); }
.msg a:hover { background: #4f46e5; color: white; }

/* 5. FIVERR NEO STYLE MENU (Vertical List) */
#ai-menu-list {
    display: flex; flex-direction: column; gap: 10px; margin-top: 15px; padding: 0 5px;
}
#ai-menu-list button {
    display: flex; align-items: center; background: #ffffff;
    border: 1px solid #e5e7eb; padding: 12px 16px; border-radius: 12px;
    cursor: pointer; text-align: left; transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); width: 100%;
    font-family: inherit;
}
#ai-menu-list button:hover {
    border-color: #6366f1; background: #fdfdff;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
.menu-icon {
    font-size: 20px; margin-right: 15px; background: #f3f4f6;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.menu-text { flex: 1; display: flex; flex-direction: column; }
.menu-text .title { font-weight: 600; color: #1f2937; font-size: 14px; }
.menu-text .desc { font-size: 11px; color: #6b7280; margin-top: 2px; }
.arrow { color: #9ca3af; font-size: 18px; font-weight: bold; }

/* 6. Input Area */
#ai-input-wrapper {
    padding: 15px; border-top: 1px solid #eee; display: flex; gap: 10px; align-items: center;
}
#ai-input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; }
#ai-send {
    background: transparent; color: #4f46e5; border: none; width: 45px; height: 45px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
#ai-send:not(:disabled):hover { background: #f3f4f6; border-radius: 50%; transform: scale(1.1); }
#ai-send:disabled { color: #cbd5e1; cursor: not-allowed; }
/* Time Stamp Styling */
.msg-time {
    display: block;          /* New line par laye */
    font-size: 10px;         /* ✅ Text bahut chhota */
    color: rgba(0, 0, 0, 0.5); /* Halka Grey Color (Kam highlight ho) */
    margin-top: 4px;
    text-align: right;       /* Right side shift karein */
    font-weight: 500;
}
/* Feature 1: Chat Images Styling */
.ai-chat-img {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: block;
}
/* User wale msg me time ka color thoda light white ho */
.msg.user .msg-time {
    color: rgba(255, 255, 255, 0.7);
}
/* 7. Typing Animation */
#ai-typing { padding: 10px 20px; display: flex; gap: 4px; }
#ai-typing span {
    width: 6px; height: 6px; background: #ccc; border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
#ai-typing span:nth-child(1) { animation-delay: -0.32s; }
#ai-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }