/* Floating Launcher Container & Widget Card */
.chatbot-launcher-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: inherit;
    cursor: pointer;
    
}

.chatbot-widget-card {
    position: relative;
    background: #0f2216;
    border-radius: 12px;
    padding: 24px 20px 16px 20px;
    /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05); */
    max-width: 295px;
    width: auto;
    border: 1px solid #bca062;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.85);
    transform-origin: bottom right;
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s ease;
}

.chatbot-widget-card.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: chatbotBubblePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.chatbot-widget-card.is-closed {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    display: none !important;
}

@keyframes chatbotBubblePop {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.7);
    }

    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.03);
    }

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

.chatbot-widget-card-close {
    height: 22px;
    width: 22px;
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #bca062;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
}

.chatbot-widget-card-close:hover {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.05);
}

.chatbot-widget-card-avatar {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #0f2216;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid #bca062;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
}

.chatbot-widget-card-avatar img {
    width: auto;
    height: auto;
    object-fit: contain;
}

.chatbot-widget-card-content p {
    margin: 8px 0 0 0;
    font-size: 15px;
    line-height: 1.45;
    color: #b49e68;
    font-weight: 500;
}

.chatbot-widget-card-content p strong {
    font-weight: 700;
    color: #111111;
}

.wave-emoji {
    display: inline-block;
}

/* Floating Round Launcher Button */
.chatbot-launcher {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #bca062;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.chatbot-launcher.is-loaded {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    animation: chatbotLauncherPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes chatbotLauncherPop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    70% {
        opacity: 1;
        transform: scale(1.08);
    }

    100% {
       opacity: 0.8;
        transform: scale(1);
    }
}

#chatbotLauncher:hover>img {
    transform: scale(1.06);
}

.floating-header-bar-img,
.floating-header-bar-component:hover .floating-header-bar-img,
.floating-header-bar-component:hover>img {
    transform: none;
    transition: none;
}

/* Floating Equity Bar Component (Left Center Aligned) */
.floating-header-bar-component {
    opacity: 0.7;
    position: fixed;
    top: 48%;
    left: 30px;
    bottom: auto;
    right: auto;
    z-index: 9998;
    width: auto;
    height: auto;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    visibility: visible;
    transform: translateY(-48%);
    animation: none;
    transition: opacity 250ms ease-in-out;
    gap: 6px;
}

.floating-header-bar-component:hover {
    opacity: 1;
}

.floating-header-bar-img {
    height: 72px;
    width: auto;
    display: block;
    margin-left: 0;
}

.floating-header-bar-text {
    color: #404040;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    padding-left: 0;
    margin-left: 0;
}

@media (max-width: 768px) {
    .floating-header-bar-component {
        top: 50%;
        left: 0;
    }

    .floating-header-bar-img {
        height: 40px;
    }

    .floating-header-bar-text {
        font-size: 11px;
    }
}


#chatbotLauncher:active {
    transform: scale(0.95);
}

.floating-header-bar-component:active {
    transform: translateY(-48%) !important;
}

/* Floating AI Search Component */
.floating-ai-search-component {
    position: fixed;
    top: 48%;
    left: 0;
    z-index: 9998;
    cursor: pointer;
    transform: translateY(-48%);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.floating-ai-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px 10px 5px;
    border: 1px solid #E86E45;
    border-radius: 0 50px 50px 0;
    transition: all 0.25s ease-in-out;
}

.floating-ai-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-ai-search-text {
    color: #2D2D2D;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    letter-spacing: 0;
}

.floating-ai-search-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.floating-ai-search-component:hover .floating-ai-search-btn {
    background: #E86E45;
}

.floating-ai-search-component:hover .floating-ai-search-icon svg path {
    fill: #FFFFFF;
}

.floating-ai-search-component:hover .floating-ai-search-text {
    color: #FFFFFF;
}

.floating-ai-search-component:hover .floating-ai-search-arrow svg path {
    stroke: #FFFFFF;
}

.floating-ai-search-component:hover .floating-ai-search-arrow {
    transform: translateX(3px);
}

.floating-ai-search-component:active {
    transform: translateY(-48%);
}


.chatbot-launcher-icon {
    width: 23px;
    height: 23px;
    display: block;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.menu-opener {
    display: inline-flex !important;
    align-items: center !important;
}

.header-chatbot-launcher {
    position: static !important;
    width: auto !important;
    height: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
}

.header-chatbot-launcher img {
    display: block;
    height: 38px;
    width: auto;
    transition: transform 0.2s ease;
}

.header-chatbot-launcher:hover {
    filter: none !important;
}

.header-chatbot-launcher:hover img {
    transform: scale(1.08);
}


/* Full-Screen Glassmorphic Search Overlay */
.chatbot-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 242, 223, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
    overflow-x: hidden;
}

.chatbot-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close Button */
.chatbot-close-btn {
    position: absolute;
    top: 40px;
    right: 50px;
    background: transparent;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chatbot-close-btn svg path {
    fill: #404040 !important;
    transition: fill 0.2s ease;
}

.chatbot-close-btn:hover svg path {
    fill: #f16522 !important;
}

/* Search/Chat Container */
.chatbot-search-container {
    width: 100%;
    max-width: 80vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}


.chatbot-welcome-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    flex-grow: 1;
    text-align: center;
    transition: opacity 0.25s ease;
    margin-top: 40px;
    opacity: 1;
}

.chatbot-welcome-area.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.chatbot-logo {
    height: 80px;
    margin-bottom: 20px;
    display: inline-block;
}

.chatbot-welcome-title {
    font-family: "Montserrat", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #f16522;
    margin: 0 0 10px 0;
}

.chatbot-welcome-subtitle {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    color: #555555;
    max-width: 500px;
    line-height: 1.5;
    margin: 0;
}

/* Chat Logs Area */
.chatbot-chat-logs {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 10px;
    margin-bottom: 20px;
}

/* Scrollbar */
.chatbot-chat-logs::-webkit-scrollbar {
    width: 6px;
}

.chatbot-chat-logs::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-chat-logs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* User Message Bubble */
.chatbot-msg-user {
    align-self: flex-end;
    max-width: 75%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 20px;
    color: #404040;
    font-size: 15px;
    line-height: 1.5;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.01),
        inset 2px 2px 10px rgba(0, 0, 0, 0.01),
        inset -2px -2px 12px rgba(255, 255, 255, 0.9);
    animation: chatbot-fade-up 0.3s ease forwards;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Bot Message Bubble */
.chatbot-msg-bot {
    align-self: flex-start;
    width: fit-content;
    max-width: 85%;

    /* 1. Transparent glass base using your exact color hex */
    background: #F165221F;

    /* 2. Softened border color to mimic Figma's clean edge blend */
    border: 1px solid rgba(241, 101, 34, 0.08);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;

    /* 3. Extremely minimal bevel/emboss:
       Reduced the top white highlight down to an ultra-faint 0.2 opacity and removed the dark drop shadow entirely */
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.2);

    /* 4. Enhanced frosted glass effect (essential for the glassy vibe over your gradients) */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Animation & Text Wrapping */
    animation: chatbot-fade-up 0.3s ease forwards;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chatbot-bot-text {
    color: #404040;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Chat Results Cards */
.chatbot-chat-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-chat-card {
    background: #ffffff;
    border: 1px solid rgba(241, 101, 34, 0.15);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.chatbot-chat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 101, 34, 0.1);
}

.chatbot-card-img {
    width: 80px;
    height: 105px;
    object-fit: cover;
    border-radius: 6px;
    background: #eaeaea;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chatbot-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chatbot-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-card-tag {
    background: rgba(241, 101, 34, 0.1);
    color: #f16522;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.chatbot-card-sector-date {
    color: #707070;
    font-size: 12px;
}

.chatbot-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #303030;
    margin: 0;
    line-height: 1.4;
}

.chatbot-card-desc {
    font-size: 13px;
    color: #606060;
    margin: 0;
    line-height: 1.4;
}

.chatbot-card-link {
    color: #f16522;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
    display: inline-block;
    text-decoration: underline;
}

/* Copy Toast Notification */
.chatbot-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #404040;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100000;
    pointer-events: none;
}

.chatbot-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Pills Row (Positioned above input container) */
.chatbot-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    transition: opacity 0.3s ease;
}

.chatbot-pill {
    background: #ffffff;
    border: 1px solid #f16522;
    border-radius: 100px;
    padding: 8px 16px;
    color: black;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-pill:hover {
    background: #f16522;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(241, 101, 34, 0.2);
}

/* Bottom Input Area */
.chatbot-input-area {
    width: 100%;
    flex-shrink: 0;
}

.chatbot-input-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.01),
        inset 2px 2px 10px rgba(0, 0, 0, 0.1),
        inset -2px -2px 6px rgba(255, 255, 255, 0.9);
    border: 1px solid rgb(255, 255, 255);
    height: 125px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: text;
}

.chatbot-input-field {
    width: calc(100% - 110px);
    border: none;
    outline: none;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: #404040;
    background: transparent;
    padding: 0;
    height: 40px;
    max-height: 85px;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-word;
    scrollbar-width: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.chatbot-input-field:focus,
.chatbot-input-field:active,
.chatbot-input-field.is-active {
    opacity: 1;
}

.chatbot-input-field::placeholder {
    color: #404040;
    opacity: 0.9;
}

.chatbot-send-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 98px;
    height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.chatbot-stop-btn {
    position: absolute;
    background: transparent;
    right: 20px;
    bottom: 20px;
    width: 98px;
    height: 34px;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.02);
}

.chatbot-send-btn:active {
    transform: scale(0.98);
}

.chatbot-send-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.chatbot-send-bg-svg path {
    fill: #f16522 !important;
    transition: fill 0.2s ease;
}

.chatbot-send-btn:hover .chatbot-send-bg-svg path {
    fill: #d85215 !important;
}

.chatbot-send-text-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
}

.chatbot-send-icon-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* AI Loader & Simple Streaming Cursor */
.chatbot-loading-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.chatbot-loading-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.chatbot-dot {
    width: 7px;
    height: 7px;
    background: #f16522;
    border-radius: 50%;
    animation: chatbot-dot-bounce 1.4s infinite ease-in-out both;
}

.chatbot-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.chatbot-dot:nth-child(3) {
    animation-delay: 0s;
}

.chatbot-loader-message {
    font-size: 14px;
    color: #606060;
    transition: opacity 0.25s ease;
}

@keyframes chatbot-dot-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}



@keyframes chatbot-fade-up {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* Report Card (Frame 251) */
.chatbot-report-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
    width: 100%;
    max-width: 663.17px;
    height: auto;
    min-height: 125px;
    background: rgba(241, 101, 34, 0.12);
    border-radius: 10px;
    box-sizing: border-box;
    text-decoration: none;
    margin-top: 15px;
    margin-bottom: 5px;
    align-self: flex-start;
    animation: chatbot-fade-up 0.3s ease forwards;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    overflow-x: hidden;
}

.chatbot-report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 101, 34, 0.08);
}

.chatbot-report-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

.chatbot-report-img-wrapper {
    width: 79px;
    height: 105px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-report-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-report-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 5px;
    width: calc(100% - 90px);
    box-sizing: border-box;
}

.chatbot-report-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
}

.chatbot-report-type {
    font-family: "Montserrat", sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    color: #404040;
}

.chatbot-report-title {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 17px;
    color: #404040;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chatbot-report-meta {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #404040;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chatbot-report-knowmore {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #f16522;
}

/* Chatbot Markdown Response Styling */
.chatbot-bot-text p {
    margin: 0 0 10px 0;
}

.chatbot-bot-text p:last-child {
    margin-bottom: 0;
}

.chatbot-bot-text ul,
.chatbot-bot-text ol {
    margin: 8px 0 12px 0;
    padding-left: 24px !important;
}

.chatbot-bot-text ul {
    list-style-type: disc !important;
}

.chatbot-bot-text ol {
    list-style-type: decimal !important;
}

.chatbot-bot-text li {
    display: list-item !important;
    margin-bottom: 6px;
    line-height: 1.5;
}

.chatbot-bot-text h1,
.chatbot-bot-text h2,
.chatbot-bot-text h3,
.chatbot-bot-text h4,
.chatbot-bot-text h5,
.chatbot-bot-text h6 {
    font-weight: 700;
    color: #202020;
    margin: 14px 0 8px 0;
    line-height: 1.3;
}

.chatbot-bot-text h1 {
    font-size: 20px;
}

.chatbot-bot-text h2 {
    font-size: 18px;
}

.chatbot-bot-text h3 {
    font-size: 16px;
}

.chatbot-bot-text h4 {
    font-size: 15px;
}

.chatbot-bot-text h5 {
    font-size: 14px;
}

.chatbot-bot-text h6 {
    font-size: 13px;
}

.chatbot-bot-text strong,
.chatbot-bot-text b {
    font-weight: 600;
    color: #202020;
}

.chatbot-bot-text a {
    color: #f16522;
    text-decoration: underline;
}

.chatbot-bot-text a:hover {
    color: #d85215;
}

.chatbot-bot-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.chatbot-bot-text th,
.chatbot-bot-text td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px;
    text-align: left;
}

.chatbot-bot-text th {
    background-color: rgba(241, 101, 34, 0.05);
    font-weight: 600;
}

/* medium screen fixes */
@media (max-width: 768px) {
    /* hide floating ai search component on medium screens */
    .floating-ai-search-component {
        display: none;
    }
}

/* small screen fixes */
@media (max-width: 576px) {
    .floating-header-bar-component {
        display: none;
    }

    .floating-ai-search-component {
        display: none;
    }

    .chatbot-launcher-container {
        gap: 0;
    }

    .chatbot-widget-card {
        margin-bottom: -10px;
    }

    .chatbot-launcher {
        width: 48px;
        height: 48px;
        bottom: -20px;
        right: 0px;
        fill-opacity: 0.8;
        gap: 0;
    }

    .chatbot-window {
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .chatbot-widget-card-content p {
        font-size: 12px;
        margin-top: 4px;
        line-height: 1.2;
    }

    .chatbot-header {
        border-radius: 0;
    }

    .chatbot-main-content {
        border-radius: 0;
    }

    .chatbot-references-container {
        max-width: 80%;
    }

    .chatbot-launcher-icon {
        width: 20px;
        height: 20px;
    }

    .chatbot-welcome-title {
        font-size: 26px;
        margin-bottom: 6px;
    }

    .view-prev-conversation-btn {
        font-size: 12px !important;
        padding: 6px 6px 0px 0px !important;
    }

    .chatbot-welcome-subtitle {
        font-size: 14px;
        line-height: 1.4;
    }

    .chatbot-close-btn {
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        z-index: 100000;
        pointer-events: auto;
    }

    .chatbot-search-container {
        max-width: 96vw;
        height: 96vh;
        padding: 8px 12px;
    }

    .chatbot-welcome-area {
        margin-top: 48px;
    }

    .chatbot-logo {
        height: 45px;
        margin-bottom: 8px;
    }

    .chatbot-pills-container {
        flex-direction: column;
        flex-wrap: nowrap;
        max-height: none;
        overflow: visible;
        gap: 6px;
        margin-bottom: 8px;
        align-items: stretch;
    }

    .chatbot-pill {
        font-size: 10px;
        padding: 6px 10px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .chatbot-input-container {
        padding: 12px 14px;
        height: 105px;
        border-radius: 16px;
    }

    .chatbot-input-field {
        width: 100%;
        font-size: 13px;
        height: 55px;
        max-height: 60px;
        line-height: 1.35;
    }

    .chatbot-send-btn,
    .chatbot-stop-btn {
        right: 12px;
        bottom: 10px;
        width: 80px;
        height: 30px;
    }

    .chatbot-chat-logs {
        padding-right: 4px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .chatbot-msg-user {
        max-width: 90%;
        padding: 12px 14px;
        font-size: 13px !important;
    }

    .chatbot-msg-bot {
        max-width: 95%;
        padding: 14px;
        gap: 10px;
    }

    .chatbot-bot-text {
        font-size: 13px !important;
        line-height: 1.45;
    }

    .chatbot-chat-card {
        padding: 10px;
        gap: 10px;
    }

    .chatbot-card-img {
        width: 60px;
        height: 80px;
    }

    .chatbot-card-title {
        font-size: 13px !important;
    }

    .chatbot-card-desc {
        font-size: 12px !important;
    }

    .chatbot-card-link {
        font-size: 12px !important;
    }

    .chatbot-bot-text table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 12px;
    }

    .chatbot-references-container {
        max-width: 90% !important;
    }

    .chatbot-ref-card {
        align-items: stretch;
        padding: 12px;
        overflow: hidden;
    }

    .chatbot-ref-info {
        min-width: 0;
        overflow: hidden;
        min-height: 105px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .chatbot-ref-meta {
        min-width: 0;
    }

    .chatbot-ref-title {
        font-size: 13px !important;
        line-height: 1.35;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .chatbot-ref-details {
        font-size: 12px;
        line-height: 1.3;
    }

    .chatbot-ref-description {
        font-size: 12px !important;
        line-height: 1.4;
    }

    .chatbot-ref-link {
        font-size: 13px !important;
        font-weight: 500;
        margin-top: auto;
        padding-top: 4px;
    }

    .ai-search-response-disclaimer {
        font-size: 12px !important;
        line-height: 1.4;
        margin-top: 6px;
    }

    .chatbot-send-text-wrapper {
        font-size: 13px !important;
    }
}

.ai-search-response-disclaimer {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: #666666;
    font-style: italic;
}

.view-prev-conversation-btn {
    display: block;
    background: transparent;
    border: 0px;
    color: #f16522;
    padding: 6px 16px 0px 0px;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 0 0 auto;
    position: relative;
}

.view-prev-conversation-btn::after {
    content: "";
    position: absolute;
    left: 0px;
    right: 16px;
    bottom: 0px;
    height: 1px;
    background-color: #f16522;
    opacity: 0;
    transition: all 0.2s ease;
}

.view-prev-conversation-btn:hover::after {
    opacity: 1;
}

.chatbot-stop-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 98px;
    height: 34px;
    border: none;
    background: transparent;
    padding: 0;
    transition: transform 0.2s ease;
}

.chatbot-stop-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.chatbot-stop-bg-svg path {
    fill: #f16522 !important;
    transition: fill 0.2s ease;
}

.chatbot-stop-btn:hover .chatbot-send-bg-svg path {
    fill: #d85215 !important;
}

.fade-chunk {
    opacity: 0;
    filter: blur(2px);
    animation: appear .12s linear forwards;
}

@keyframes appear {
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.chatbot-references-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: fit-content;
    max-width: 70%;
    align-self: flex-start;
    box-sizing: border-box;
    margin-top: -5px;
}

.chatbot-ref-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 10px;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(241, 101, 34, 0.12);
    border-radius: 10px;
    border: 1.5px solid transparent;
    opacity: 0;
    transform: translateY(15px);
    animation: chatbot-ref-card-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatbot-ref-card-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-citation-wrapper {
    display: inline;
    margin: 0 2px;
}

.chatbot-citation-badge {
    display: inline;
    font-size: 11px;
    font-weight: 600;
    line-height: normal;
    color: #F16522;
    text-decoration: none;
    cursor: pointer;
    vertical-align: super;
    transition: color 0.2s ease;
    user-select: none;
}

.chatbot-citation-badge::before {
    content: "[";
}

.chatbot-citation-badge::after {
    content: "]";
}

.chatbot-citation-badge:hover {
    color: #d04d10;
    text-decoration: underline;
}

.chatbot-ref-card.chatbot-ref-card-highlight {
    border-color: #F16522;
    outline: none;
    box-shadow: 0 0 12px rgba(241, 101, 34, 0.35);
    transition: all 0.3s ease;
}

.chatbot-ref-thumb {
    width: 79px;
    height: 105px;
    border-radius: 4px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFFFFF;
    flex-shrink: 0;
    overflow: hidden;
}

.chatbot-ref-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    padding-right: 10px;
    gap: 4px;
    flex-grow: 1;
    min-height: 105px;
    justify-content: space-between;
    box-sizing: border-box;
}

.chatbot-ref-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 2px;
    width: 100%;
}

.chatbot-ref-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #404040;
    line-height: 12px;
}

.chatbot-ref-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #404040;
    line-height: 16px;
    margin: 0;
}

.chatbot-ref-details {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #555555;
    line-height: 15px;
}

.chatbot-ref-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #404040;
    line-height: 16px;
    margin: 2px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.chatbot-ref-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #F16522 !important;
    line-height: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.chatbot-ref-link:hover {
    text-decoration: underline;
}

/* Dynamic OG Image thumbnail overlay styling */
.chatbot-ref-thumb.has-bg-image {
    position: relative;
    background-color: transparent !important;
}
