#ranked-chatbot {
    max-width: 840px;
    margin: 2rem auto 4rem;
    color: var(--dark, #1c1c1c);
    font-family: var(--font-family-sans-serif);
    overflow-wrap: anywhere;
}
#ranked-chatbot h1 { font-size: 2rem; }
#ranked-chatbot .chatbot-preview-label { color: var(--secondary, #666); margin-bottom: .5rem; }
#ranked-chatbot .chatbot-disclosure { font-size: .9rem; color: var(--secondary, #666); }
#ranked-chatbot .chatbot-disclosure p { margin: .5rem 0; }
#ranked-chatbot .chatbot-preview-notice { padding: 1rem; background: var(--light, #fafafa); border: 1px solid #e1e1e1; }
#ranked-chatbot label { display: block; font-weight: 600; }
#ranked-chatbot textarea, #ranked-chatbot select { max-width: 100%; border: 1px solid #e1e1e1; border-radius: .3rem; padding: .6rem; font: inherit; background: var(--white, #fff); color: inherit; }
#ranked-chatbot textarea { width: 100%; resize: vertical; }
#ranked-chatbot button { font: inherit; cursor: pointer; }
#ranked-chatbot button:disabled { cursor: wait; opacity: .6; }
#ranked-chatbot :focus-visible { outline: 2px solid var(--primary, #045bc1); outline-offset: 3px; }
#ranked-chatbot .chatbot-composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px; background: var(--white, #fff); border: 1px solid #c9cdd1; border-radius: 18px; }
#ranked-chatbot .chatbot-composer:focus-within { border-color: var(--primary, #045bc1); box-shadow: 0 0 0 2px rgba(4, 91, 193, .12); }
#ranked-chatbot #ranked-chat-question { flex: 1; min-width: 0; min-height: 44px; max-height: 120px; padding: 11px 8px; border: 0; border-radius: 12px; resize: none; font-size: 14px; line-height: 22px; }
#ranked-chatbot #ranked-chat-question:focus { outline: none; box-shadow: none; }
#ranked-chatbot .chatbot-submit { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #343a40; color: white; padding: 0; }
#ranked-chatbot .chatbot-submit:hover:not(:disabled) { background: #495057; }
#ranked-chatbot .chatbot-input-hint { margin: 8px 0 0; font-size: 11px; color: var(--secondary, #666); text-align: center; }
#ranked-chatbot #ranked-chat-messages { list-style: none; padding: 0; }
#ranked-chatbot .chatbot-turn { border-top: 1px solid #e1e1e1; margin: 1.5rem 0; padding-top: 1.5rem; }
#ranked-chatbot .chatbot-turn h2 { font-size: 1.2rem; white-space: pre-wrap; }
#ranked-chatbot .chatbot-results { padding-left: 1.5rem; }
#ranked-chatbot .chatbot-result { padding: 1rem; margin: .75rem 0; border: 1px solid #e1e1e1; border-radius: .4rem; background: var(--white, #fff); }
#ranked-chatbot .chatbot-result h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
#ranked-chatbot .chatbot-source-text { white-space: pre-wrap; margin: .7rem 0; }
#ranked-chatbot .chatbot-conversation { overflow-anchor: none; }
#ranked-chatbot .chatbot-answer-preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    max-height: 3em;
    line-height: 1.5;
    margin: .7rem 0;
    white-space: normal;
}
#ranked-chatbot .chatbot-answer-toggle { min-height: 44px; padding: .6rem 0; border: 0; background: none; color: var(--primary, #045bc1); font-weight: 600; text-align: left; }
#ranked-chatbot .chatbot-answer-toggle:hover { text-decoration: underline; }
#ranked-chatbot .chatbot-revealing::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 5px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}
#ranked-chatbot .chatbot-thinking {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 14px;
    min-height: 42px;
    border: 1px solid #e1e1e1;
    border-radius: 4px 14px 14px;
    background: var(--white, #fff);
    color: var(--secondary, #666);
    font-size: 13px;
}
#ranked-chatbot .chatbot-thinking-dots { display: inline-flex; align-items: center; gap: 4px; height: 16px; }
#ranked-chatbot .chatbot-thinking-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: ranked-chatbot-dot-bounce 1.1s cubic-bezier(.45, 0, .55, 1) infinite;
}
#ranked-chatbot .chatbot-thinking-dot:nth-child(1) { animation-delay: -.32s; }
#ranked-chatbot .chatbot-thinking-dot:nth-child(2) { animation-delay: -.16s; }
@keyframes ranked-chatbot-dot-bounce {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: .45; }
    50% { transform: translate3d(0, -5px, 0); opacity: 1; }
}
#ranked-chatbot .chatbot-source-link { display: block; margin-top: .5rem; }
#ranked-chatbot .chatbot-matching-items { padding-left: 1.1rem; margin-bottom: 0; }
#ranked-chatbot .chatbot-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
#ranked-chatbot .chatbot-suggestion {
    border: 1px solid #e1e1e1;
    border-radius: .75rem;
    background: var(--white, #fff);
    color: var(--primary, #045bc1);
    padding: .6rem .75rem;
    min-height: 44px;
    text-align: left;
}
#ranked-chatbot .chatbot-suggestion:hover { border-color: var(--primary, #045bc1); }
#ranked-chatbot .chatbot-feedback { margin-top: 1rem; padding: 0; }
#ranked-chatbot .chatbot-feedback-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
#ranked-chatbot .chatbot-feedback button { border: 1px solid #e1e1e1; border-radius: .3rem; background: var(--white, #fff); color: var(--primary, #045bc1); padding: .5rem .75rem; }
#ranked-chatbot .chatbot-feedback button[aria-pressed="true"] { border-color: var(--primary, #045bc1); box-shadow: inset 0 0 0 1px var(--primary, #045bc1); font-weight: 700; }
#ranked-chatbot .chatbot-feedback-form { background: var(--light, #fafafa); padding: 1rem; margin-top: .75rem; border: 1px solid #e1e1e1; border-radius: .3rem; }
#ranked-chatbot .chatbot-feedback-form label { margin-top: .75rem; }
#ranked-chatbot .chatbot-feedback-status { margin: .5rem 0; font-size: .9rem; }
#ranked-chatbot [hidden] { display: none !important; }
@media (max-width: 480px) {
    #ranked-chatbot { margin-top: 1rem; }
    #ranked-chatbot h1 { font-size: 1.6rem; }
    #ranked-chatbot .chatbot-result { padding: .75rem; }
}

/* Floating interface shared by every public-site page. */
body.has-ranked-chatbot .floating-nav-buttons { bottom: 86px; }
#ranked-chatbot-widget { z-index: 1050; left: auto; right: 20px; font-family: var(--font-family-sans-serif); }
#ranked-chatbot-widget .chatbot-window {
    left: auto;
    right: 0;
    padding: 0;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: min(700px, calc(100dvh - 110px));
    border: 1px solid #e1e1e1;
    border-radius: 18px;
    transform-origin: bottom right;
}
#ranked-chatbot-widget .chatbot-window[hidden] { display: none; }
#ranked-chatbot-widget .chatbot-header { border-radius: 0; padding: 14px 16px; }
#ranked-chatbot-widget .ranked-chatbot-heading { display: flex; align-items: center; gap: 10px; }
#ranked-chatbot-widget .ranked-chatbot-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; background: #495057; font-size: 22px; }
#ranked-chatbot-widget .chatbot-title { font-size: 15px; font-weight: 700; }
#ranked-chatbot-widget .chatbot-minimize-btn { width: 44px; height: 44px; font-size: 22px; }
#ranked-chatbot-widget .ranked-chatbot-subtitle { display: block; font-size: 12px; color: #e1e1e1; margin-top: 3px; }
#ranked-chatbot-widget #ranked-chatbot { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; font-size: 14px; }
#ranked-chatbot-widget .chatbot-conversation { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: var(--light, #fafafa); overscroll-behavior: contain; }
#ranked-chatbot-widget .chatbot-welcome { background: var(--white, #fff); padding: 14px; border: 1px solid #e1e1e1; border-radius: 4px 14px 14px; }
#ranked-chatbot-widget .chatbot-welcome p { margin: 0 0 5px; }
#ranked-chatbot-widget .chatbot-disclosure { margin: 12px 0; font-size: 12px; }
#ranked-chatbot-widget #ranked-chat-form { flex-shrink: 0; padding: 12px; border-top: 1px solid #e1e1e1; background: var(--white, #fff); }
#ranked-chatbot-widget #ranked-chatbot label { font-size: 13px !important; }
#ranked-chatbot-widget .chatbot-turn { border: 0; padding: 0; margin: 18px 0; }
#ranked-chatbot-widget .chatbot-turn h2 { width: fit-content; max-width: 92%; margin: 0 0 12px auto; padding: 10px 12px; border-radius: 12px 12px 3px 12px; background: #343a40; color: white; font-size: 14px; font-weight: 400; line-height: 1.5; }
#ranked-chatbot-widget .chatbot-result { padding: 10px; }
#ranked-chatbot-widget .chatbot-result h3 { font-size: 14px; }
#ranked-chatbot-widget .chatbot-result p { font-size: 13px; }
#ranked-chatbot-widget .chatbot-source-link { font-weight: 600; }
#ranked-chatbot-widget .chatbot-feedback-form { padding: 10px; }
#ranked-chatbot-widget .chatbot-feedback-actions button { font-size: 12px; padding: 7px 9px; }
#ranked-chatbot-widget .chatbot-feedback p { margin-bottom: 8px; }
#ranked-chatbot-widget .chatbot-sign-in { margin-top: 16px; }
#ranked-chatbot-widget :focus-visible { outline: 2px solid var(--primary, #045bc1); outline-offset: 3px; }
@media (max-width: 480px) {
    #ranked-chatbot-widget { bottom: 12px; right: 12px; }
    #ranked-chatbot-widget .chatbot-window { bottom: 60px; width: calc(100vw - 24px); max-width: none; height: min(650px, calc(100dvh - 90px)); }
}
@media (prefers-reduced-motion: reduce) {
    #ranked-chatbot .chatbot-thinking-dot { animation: none; opacity: .65; }
    #ranked-chatbot-widget .chatbot-toggle-btn { transition: none; }
    #ranked-chatbot-widget .chatbot-toggle-btn:hover { transform: none; }
}
