 
        /* ==============================
           CHATBOT WRAPPER
        ============================== */
        #chatbot-wrapper {
            position: fixed;
            right: 25px;
            bottom: 25px;
            z-index: 9999;
            font-family: Arial, sans-serif;
        }

        /* ==============================
           FLOATING CHAT BUTTON
        ============================== */
        .chatbot-toggle-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: none;
            background: #0d6efd;
            color: #fff;
            font-size: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            cursor: pointer;
            transition: all 0.3s ease;
            margin-left: auto;
        }

        .chatbot-toggle-btn:hover {
            transform: scale(1.06);
            background: #0b5ed7;
        }

        /* ==============================
           CHAT WINDOW
        ============================== */
        .chatbot-box {
            width: 370px;
            height: 520px;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
            overflow: hidden;
            display: none;
            flex-direction: column;
            margin-bottom: 15px;
        }

        .chatbot-box.show {
            display: flex;
        }

        /* ==============================
           HEADER
        ============================== */
        .chatbot-header {
            background: #0d6efd;
            color: #fff;
            padding: 15px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

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

        .chatbot-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 21px;
        }

        .chatbot-title {
            font-size: 16px;
            font-weight: 600;
            margin: 0;
        }

        .chatbot-status {
            font-size: 12px;
            opacity: 0.9;
        }

        .chatbot-close {
            border: none;
            background: transparent;
            color: #fff;
            font-size: 25px;
            line-height: 1;
            cursor: pointer;
        }

        /* ==============================
           MESSAGES
        ============================== */
        .chatbot-messages {
            flex: 1;
            padding: 16px;
            overflow-y: auto;
            background: #f8f9fa;
        }

        .chat-message {
            display: flex;
            margin-bottom: 14px;
        }

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

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

        .message-bubble {
            max-width: 78%;
            padding: 10px 13px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.5;
            word-break: break-word;
        }

        .bot .message-bubble {
            background: #fff;
            color: #212529;
            border-bottom-left-radius: 4px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        .user .message-bubble {
            background: #0d6efd;
            color: #fff;
            border-bottom-right-radius: 4px;
        }

        /* ==============================
           FOOTER / INPUT
        ============================== */
        .chatbot-footer {
            background: #fff;
            border-top: 1px solid #e9ecef;
            padding: 12px;
        }

        .chatbot-input-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .chatbot-input {
            flex: 1;
            border-radius: 25px;
            padding: 10px 15px;
            font-size: 14px;
        }

        .chatbot-input:focus {
            box-shadow: none;
            border-color: #0d6efd;
        }

        .chatbot-send-btn {
            width: 42px;
            height: 42px;
            flex-shrink: 0;
            border: none;
            border-radius: 50%;
            background: #0d6efd;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .chatbot-send-btn:hover {
            background: #0b5ed7;
        }

        /* ==============================
           MOBILE
        ============================== */
        @media (max-width: 576px) {
            #chatbot-wrapper {
                right: 12px;
                bottom: 12px;
                left: 12px;
            }

            .chatbot-box {
                width: 100%;
                height: 70vh;
            }

            .chatbot-toggle-btn {
                margin-left: auto;
            }
        }


        /* ==========================================
   THINKING / TYPING ANIMATION
========================================== */

.thinking-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.thinking-text {
    font-size: 13px;
    color: #6c757d;
}

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

.typing-dots span {
    width: 7px;
    height: 7px;
    background: #6c757d;
    border-radius: 50%;
    display: inline-block;

    animation: chatbotTyping 1.4s infinite ease-in-out;
}

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

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

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

@keyframes chatbotTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}


/* =========================================================
   AI RESPONSE FORMATTING
========================================================= */

.ai-response {
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}


/* Remove unnecessary first/last spacing */
.ai-response > *:first-child {
    margin-top: 0 !important;
}

.ai-response > *:last-child {
    margin-bottom: 0 !important;
}


/* =========================================================
   PARAGRAPHS
========================================================= */

.ai-response p {
    margin: 0 0 10px;
}


/* =========================================================
   HEADINGS
========================================================= */

.ai-response h1,
.ai-response h2,
.ai-response h3,
.ai-response h4,
.ai-response h5,
.ai-response h6 {
    font-weight: 600;
    line-height: 1.3;
    color: #212529;
    margin-top: 16px;
    margin-bottom: 8px;
}

.ai-response h1 {
    font-size: 20px;
}

.ai-response h2 {
    font-size: 18px;
}

.ai-response h3 {
    font-size: 16px;
}

.ai-response h4,
.ai-response h5,
.ai-response h6 {
    font-size: 14px;
}


/* =========================================================
   LISTS
========================================================= */

.ai-response ul,
.ai-response ol {
    padding-left: 22px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.ai-response li {
    margin-bottom: 5px;
}

.ai-response li:last-child {
    margin-bottom: 0;
}

.ai-response li > ul,
.ai-response li > ol {
    margin-top: 5px;
    margin-bottom: 5px;
}


/* =========================================================
   BOLD / ITALIC
========================================================= */

.ai-response strong {
    font-weight: 600;
}

.ai-response em {
    font-style: italic;
}


/* =========================================================
   LINKS
========================================================= */

.ai-response a {
    color: #0d6efd;
    text-decoration: none;
    word-break: break-word;
}

.ai-response a:hover {
    text-decoration: underline;
}


/* =========================================================
   INLINE CODE
========================================================= */

.ai-response code {
    background: #f1f3f5;
    color: #d63384;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
}


/* =========================================================
   CODE BLOCK
========================================================= */

.ai-response pre {
    position: relative;
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 14px;
    padding-top: 38px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.5;
}

.ai-response pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    white-space: pre;
}


/* Copy button */

.ai-code-copy {
    position: absolute;
    top: 7px;
    right: 7px;

    padding: 3px 8px;

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 5px;

    background: rgba(255,255,255,.1);
    color: #fff;

    font-size: 11px;

    cursor: pointer;
}

.ai-code-copy:hover {
    background: rgba(255,255,255,.2);
}


/* =========================================================
   BLOCKQUOTES
========================================================= */

.ai-response blockquote {
    border-left: 4px solid #0d6efd;

    padding: 8px 12px;
    margin: 12px 0;

    background: #f8f9fa;

    color: #495057;

    border-radius: 0 6px 6px 0;
}

.ai-response blockquote p {
    margin: 0;
}


/* =========================================================
   TABLE
========================================================= */

.ai-response .table-responsive {
    margin: 12px 0;
}

.ai-response table {
    font-size: 12px;
    margin-bottom: 0;
}

.ai-response table th {
    background: #f1f3f5;
    font-weight: 600;
}

.ai-response table th,
.ai-response table td {
    padding: 7px 8px;
    vertical-align: top;
}


/* =========================================================
   HORIZONTAL LINE
========================================================= */

.ai-response hr {
    border: 0;
    border-top: 1px solid #dee2e6;

    margin: 15px 0;
}


/* =========================================================
   IMAGES - if Markdown contains image URL
========================================================= */

.ai-response img {
    max-width: 100%;
    height: auto;

    display: block;

    border-radius: 8px;

    margin: 10px 0;
}


/* =========================================================
   LONG WORD / URL PROTECTION
========================================================= */

.ai-response {
    word-wrap: break-word;
    word-break: normal;
}

.ai-response p,
.ai-response li,
.ai-response td {
    overflow-wrap: anywhere;
}

/* Greeting bubble above chatbot button */
.chatbot-greeting {
    position: absolute;
    right: 0;
    bottom: 75px;

    width: 210px;
    padding: 12px 32px 12px 14px;

    background: #ffffff;
    color: #212529;

    font-size: 14px;
    line-height: 1.4;

    border-radius: 12px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);

    animation: chatbotGreetingIn 0.4s ease;

    cursor: pointer;
}


/* Small triangle pointing toward chatbot */
.chatbot-greeting::after {
    content: "";

    position: absolute;

    right: 22px;
    bottom: -8px;

    width: 0;
    height: 0;

    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
}


/* Greeting close button */
.chatbot-greeting-close {
    position: absolute;

    top: 5px;
    right: 7px;

    border: none;
    background: transparent;

    color: #6c757d;

    font-size: 18px;
    line-height: 1;

    padding: 2px;

    cursor: pointer;
}

.chatbot-greeting-close:hover {
    color: #212529;
}


/* Entrance animation */
@keyframes chatbotGreetingIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
} 