.sources {
    font-size: 12px;
    color: #6b7280;
    margin: -6px 0 12px 4px;
}
 
.sources a {
    color: #2563eb;
    text-decoration: none;
}
 
.sources a:hover {
    text-decoration: underline;
}
 
.bot.thinking {
    color: #9ca3af;
    font-style: italic;
}

.chat-launcher {

            position: fixed;

            right: 25px;
            bottom: 25px;

            width: 60px;
            height: 60px;

            border: none;

            border-radius: 50%;

            background: #2563eb;

            color: white;

            cursor: pointer;

            display: flex;

            align-items: center;
            justify-content: center;

            box-shadow:
                0 8px 25px
                rgba(37, 99, 235, 0.35);

            z-index: 9999;

            transition:
                transform 0.2s ease,
                box-shadow 0.2s ease;

        }


        .chat-launcher:hover {

            transform: scale(1.08);

            box-shadow:
                0 10px 30px
                rgba(37, 99, 235, 0.45);

        }


        .chat-launcher svg {

            width: 28px;
            height: 28px;

            fill: none;

            stroke: currentColor;

            stroke-width: 2;

            stroke-linecap: round;
            stroke-linejoin: round;

        }


        /*
        |--------------------------------------------------------------------------
        | Chat Window
        |--------------------------------------------------------------------------
        */

        .chat-widget {

            position: fixed;

            right: 25px;
            bottom: 100px;

            width: 380px;
            height: 560px;

            max-width: calc(100vw - 30px);
            max-height: calc(100vh - 120px);

            background: white;

            border-radius: 16px;

            overflow: hidden;

            box-shadow:
                0 15px 50px
                rgba(0, 0, 0, 0.20);

            display: none;

            flex-direction: column;

            z-index: 9998;

            animation:
                chatOpen 0.2s ease;

        }


        .chat-widget.open {

            display: flex;

        }


        @keyframes chatOpen {

            from {

                opacity: 0;

                transform:
                    translateY(15px)
                    scale(0.97);

            }

            to {

                opacity: 1;

                transform:
                    translateY(0)
                    scale(1);

            }

        }


        /*
        |--------------------------------------------------------------------------
        | Header
        |--------------------------------------------------------------------------
        */

        .chat-widget-header {

            background: #111827;

            color: white;

            padding: 16px;

            display: flex;

            align-items: center;

            justify-content: space-between;

        }


        .chat-widget-title {

            display: flex;

            align-items: center;

            gap: 10px;

        }


        .chat-widget-avatar {

            width: 36px;
            height: 36px;

            border-radius: 50%;

            background: #2563eb;

            display: flex;

            align-items: center;
            justify-content: center;

            font-size: 18px;

        }


        .chat-widget-name {

            font-size: 15px;

            font-weight: bold;

        }


        .chat-widget-status {

            font-size: 11px;

            color: #9ca3af;

            margin-top: 2px;

        }


        .chat-close {

            width: 34px;
            height: 34px;

            border: none;

            border-radius: 50%;

            background: transparent;

            color: white;

            cursor: pointer;

            font-size: 22px;

            display: flex;

            align-items: center;
            justify-content: center;

        }


        .chat-close:hover {

            background:
                rgba(255,255,255,0.12);

        }


        /*
        |--------------------------------------------------------------------------
        | Messages
        |--------------------------------------------------------------------------
        */

        .chat-messages {

            flex: 1;

            padding: 16px;

            overflow-y: auto;

            background: #f8fafc;

        }


        .chat-message {

            max-width: 82%;

            padding: 10px 13px;

            margin-bottom: 10px;

            border-radius: 12px;

            line-height: 1.5;

            font-size: 14px;

            word-wrap: break-word;

        }


        .chat-message.bot {
    line-height: 1.5;
    font-size: 14px;
    color: #1f2937;
    background-color: #e5e7eb;
    border-radius: 12px 12px 12px 2px;
    padding: 12px 16px;
    max-width: 85%;
}

.chat-message p {
    margin: 0 0 8px 0;
}

.chat-message p:last-child {
    margin-bottom: 0;
}

.chat-message ul,
.chat-message ol {
    margin: 6px 0 8px 0;
    padding-left: 20px;
}

.chat-message li {
    margin-bottom: 4px;
}

.chat-message li:last-child {
    margin-bottom: 0;
}

/* Strong/Bold text highlighting */
.chat-message strong {
    font-weight: 600;
    color: #111827;
}

/* Optional: Subtle code formatting */
.chat-message code {
    background-color: #e3e3e4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

        .chat-message.user {

            background: #2563eb;

            color: white;

            margin-left: auto;

            border-bottom-right-radius: 4px;

        }


        .chat-message.error {

            background: #fee2e2;

            color: #991b1b;

        }


        .chat-message.thinking {

            color: #6b7280;

            font-style: italic;

        }


        /*
        |--------------------------------------------------------------------------
        | Input Area
        |--------------------------------------------------------------------------
        */

        .chat-widget-input {

            padding: 12px;

            background: white;

            border-top:
                1px solid #e5e7eb;

            display: flex;

            gap: 8px;

        }


        .chat-widget-input input {

            flex: 1;

            min-width: 0;

            padding: 11px 13px;

            border:
                1px solid #d1d5db;

            border-radius: 10px;

            outline: none;

            font-size: 14px;

        }


        .chat-widget-input input:focus {

            border-color: #2563eb;

            box-shadow:
                0 0 0 2px
                rgba(37,99,235,0.10);

        }


        .chat-send {

            width: 42px;
            height: 42px;

            flex-shrink: 0;

            border: none;

            border-radius: 10px;

            background: #2563eb;

            color: white;

            cursor: pointer;

            display: flex;

            align-items: center;
            justify-content: center;

        }


        .chat-send:hover {

            background: #1d4ed8;

        }


        .chat-send:disabled {

            background: #93c5fd;

            cursor: not-allowed;

        }


        .chat-send svg {

            width: 19px;
            height: 19px;

            fill: none;

            stroke: currentColor;

            stroke-width: 2;

            stroke-linecap: round;
            stroke-linejoin: round;

        }


        /*
        |--------------------------------------------------------------------------
        | Mobile
        |--------------------------------------------------------------------------
        */

        @media (max-width: 500px) {

            .chat-launcher {

                right: 18px;
                bottom: 18px;

                width: 56px;
                height: 56px;

            }


            .chat-widget {

                right: 10px;
                bottom: 85px;

                width:
                    calc(100vw - 20px);

                height:
                    calc(100vh - 105px);

                max-width: none;
                max-height: none;

                border-radius: 14px;

            }

        }

.chat-launcher {

            position: fixed;

            right: 25px;
            bottom: 25px;

            width: 60px;
            height: 60px;

            border: none;

            border-radius: 50%;

            background: #2563eb;

            color: white;

            cursor: pointer;

            display: flex;

            align-items: center;
            justify-content: center;

            box-shadow:
                0 8px 25px
                rgba(37, 99, 235, 0.35);

            z-index: 9999;

            transition:
                transform 0.2s ease,
                box-shadow 0.2s ease;

        }


        .chat-launcher:hover {

            transform: scale(1.08);

            box-shadow:
                0 10px 30px
                rgba(37, 99, 235, 0.45);

        }


        .chat-launcher svg {

            width: 28px;
            height: 28px;

            fill: none;

            stroke: currentColor;

            stroke-width: 2;

            stroke-linecap: round;
            stroke-linejoin: round;

        }


        /*
        |--------------------------------------------------------------------------
        | Chat Window
        |--------------------------------------------------------------------------
        */

        .chat-widget {

            position: fixed;

            right: 25px;
            bottom: 100px;

            width: 380px;
            height: 560px;

            max-width: calc(100vw - 30px);
            max-height: calc(100vh - 120px);

            background: white;

            border-radius: 16px;

            overflow: hidden;

            box-shadow:
                0 15px 50px
                rgba(0, 0, 0, 0.20);

            display: none;

            flex-direction: column;

            z-index: 9998;

            animation:
                chatOpen 0.2s ease;

        }


        .chat-widget.open {

            display: flex;

        }


        @keyframes chatOpen {

            from {

                opacity: 0;

                transform:
                    translateY(15px)
                    scale(0.97);

            }

            to {

                opacity: 1;

                transform:
                    translateY(0)
                    scale(1);

            }

        }


        /*
        |--------------------------------------------------------------------------
        | Header
        |--------------------------------------------------------------------------
        */

        .chat-widget-header {

            background: #111827;

            color: white;

            padding: 16px;

            display: flex;

            align-items: center;

            justify-content: space-between;

        }


        .chat-widget-title {

            display: flex;

            align-items: center;

            gap: 10px;

        }


        .chat-widget-avatar {

            width: 36px;
            height: 36px;

            border-radius: 50%;

            background: #2563eb;

            display: flex;

            align-items: center;
            justify-content: center;

            font-size: 18px;

        }


        .chat-widget-name {

            font-size: 15px;

            font-weight: bold;

        }


        .chat-widget-status {

            font-size: 11px;

            color: #9ca3af;

            margin-top: 2px;

        }


        .chat-close {

            width: 34px;
            height: 34px;

            border: none;

            border-radius: 50%;

            background: transparent;

            color: white;

            cursor: pointer;

            font-size: 22px;

            display: flex;

            align-items: center;
            justify-content: center;

        }


        .chat-close:hover {

            background:
                rgba(255,255,255,0.12);

        }


        /*
        |--------------------------------------------------------------------------
        | Messages
        |--------------------------------------------------------------------------
        */

        .chat-messages {

            flex: 1;

            padding: 16px;

            overflow-y: auto;

            background: #f8fafc;

        }


        .chat-message {

            max-width: 82%;

            padding: 10px 13px;

            margin-bottom: 10px;

            border-radius: 12px;

            line-height: 1.5;

            font-size: 14px;

            word-wrap: break-word;

        }


        .chat-message.bot {
    line-height: 1.5;
    font-size: 14px;
    color: #1f2937;
    background-color: #e5e7eb;
    border-radius: 12px 12px 12px 2px;
    padding: 12px 16px;
    max-width: 85%;
}

.chat-message p {
    margin: 0 0 8px 0;
}

.chat-message p:last-child {
    margin-bottom: 0;
}

.chat-message ul,
.chat-message ol {
    margin: 6px 0 8px 0;
    padding-left: 20px;
}

.chat-message li {
    margin-bottom: 4px;
}

.chat-message li:last-child {
    margin-bottom: 0;
}

/* Strong/Bold text highlighting */
.chat-message strong {
    font-weight: 600;
    color: #111827;
}

/* Optional: Subtle code formatting */
.chat-message code {
    background-color: #e3e3e4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

        .chat-message.user {

            background: #2563eb;

            color: white;

            margin-left: auto;

            border-bottom-right-radius: 4px;

        }


        .chat-message.error {

            background: #fee2e2;

            color: #991b1b;

        }


        .chat-message.thinking {

            color: #6b7280;

            font-style: italic;

        }


        /*
        |--------------------------------------------------------------------------
        | Input Area
        |--------------------------------------------------------------------------
        */

        .chat-widget-input {

            padding: 12px;

            background: white;

            border-top:
                1px solid #e5e7eb;

            display: flex;

            gap: 8px;

        }


        .chat-widget-input input {

            flex: 1;

            min-width: 0;

            padding: 11px 13px;

            border:
                1px solid #d1d5db;

            border-radius: 10px;

            outline: none;

            font-size: 14px;

        }


        .chat-widget-input input:focus {

            border-color: #2563eb;

            box-shadow:
                0 0 0 2px
                rgba(37,99,235,0.10);

        }


        .chat-send {

            width: 42px;
            height: 42px;

            flex-shrink: 0;

            border: none;

            border-radius: 10px;

            background: #2563eb;

            color: white;

            cursor: pointer;

            display: flex;

            align-items: center;
            justify-content: center;

        }


        .chat-send:hover {

            background: #1d4ed8;

        }


        .chat-send:disabled {

            background: #93c5fd;

            cursor: not-allowed;

        }


        .chat-send svg {

            width: 19px;
            height: 19px;

            fill: none;

            stroke: currentColor;

            stroke-width: 2;

            stroke-linecap: round;
            stroke-linejoin: round;

        }


        /*
        |--------------------------------------------------------------------------
        | Mobile
        |--------------------------------------------------------------------------
        */

        @media (max-width: 500px) {

            .chat-launcher {

                right: 18px;
                bottom: 18px;

                width: 56px;
                height: 56px;

            }


            .chat-widget {

                right: 10px;
                bottom: 85px;

                width:
                    calc(100vw - 20px);

                height:
                    calc(100vh - 105px);

                max-width: none;
                max-height: none;

                border-radius: 14px;

            }

        }