.kbc-widget{--kbc-chat-accent:#294c63;--kbc-chat-accent-dark:color-mix(in srgb,var(--kbc-chat-accent) 70%,#000);--kbc-chat-ink:#15212b;--kbc-chat-muted:#71808b;--kbc-chat-line:#e4e9ed;--kbc-chat-soft:#f6f8fa;--kbc-chat-accent-2:color-mix(in srgb,var(--kbc-chat-accent) 82%,#fff);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--kbc-chat-ink);letter-spacing:normal;text-align:left}.kbc-widget button,.kbc-widget textarea{font-family:inherit}.kbc-widget--floating{position:fixed;right:24px;bottom:24px;z-index:999999}.kbc-launcher{position:relative;display:flex;align-items:center;gap:10px;min-width:172px;padding:10px 13px 10px 10px;border:1px solid rgba(255,255,255,.18);border-radius:999px;color:#fff;background:linear-gradient(135deg,var(--kbc-chat-accent-dark),var(--kbc-chat-accent));box-shadow:0 16px 40px rgba(21,42,57,.28),0 4px 12px rgba(21,42,57,.14);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}.kbc-launcher:hover{transform:translateY(-2px);box-shadow:0 20px 45px rgba(21,42,57,.33),0 6px 16px rgba(21,42,57,.17);filter:saturate(1.05)}.kbc-launcher:focus-visible{outline:0;box-shadow:0 0 0 4px rgba(77,126,154,.2),0 20px 45px rgba(21,42,57,.28)}.kbc-launcher-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}.kbc-launcher-icon svg{width:19px;height:19px}.kbc-launcher-copy{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0}.kbc-launcher-copy strong{max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.25}.kbc-launcher-copy small{font-size:9px;color:#bfd0da;line-height:1.25}.kbc-launcher-pulse{width:7px;height:7px;margin-left:auto;border-radius:50%;background:#7de0ad;box-shadow:0 0 0 4px rgba(125,224,173,.11)}
.kbc-widget--floating .kbc-panel{position:absolute;right:0;bottom:66px}.kbc-panel{width:min(430px,calc(100vw - 28px));max-height:min(700px,calc(100vh - 105px));display:flex;flex-direction:column;background:#fff;border:1px solid rgba(210,220,227,.95);border-radius:22px;box-shadow:0 28px 75px rgba(17,33,45,.2),0 10px 28px rgba(17,33,45,.1);overflow:hidden;transform-origin:bottom right}.kbc-panel:not([hidden]){animation:kbcChatIn .2s ease both}.kbc-panel[hidden]{display:none!important}
.kbc-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border-bottom:1px solid #e9edf0;background:linear-gradient(180deg,#fbfdfe,#f5f8fa)}.kbc-header:after{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,var(--kbc-chat-accent-2),#79a5b9,var(--kbc-chat-accent-2))}.kbc-header-brand{display:flex;align-items:center;gap:10px;min-width:0}.kbc-avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;color:#fff;background:var(--kbc-chat-accent);box-shadow:0 8px 18px rgba(41,76,99,.18)}.kbc-avatar svg{width:19px;height:19px}.kbc-header-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.kbc-header-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.2}.kbc-header-copy>span{display:flex;align-items:center;gap:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#77848d;font-size:9px;line-height:1.25}.kbc-online-dot{display:inline-block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:#50ad7c;box-shadow:0 0 0 3px rgba(80,173,124,.1)}.kbc-close{display:grid;place-items:center;width:31px;height:31px;padding:0;border:1px solid #dfe5e9;border-radius:9px;background:#fff;color:#65727c;cursor:pointer;transition:.15s ease}.kbc-close:hover,.kbc-close:focus-visible{color:#1e3543;border-color:#cbd6dc;background:#f7fafb}.kbc-close span{font-size:20px;line-height:1;font-weight:400}
.kbc-messages{flex:1;min-height:175px;max-height:345px;padding:15px 14px 12px;overflow:auto;background:radial-gradient(circle at 18% 0,#f8fbfc 0,transparent 35%),#fbfcfd;scroll-behavior:smooth}.kbc-message{display:flex;margin:8px 0}.kbc-message--user{justify-content:flex-end}.kbc-bubble{max-width:88%;padding:10px 12px;border-radius:14px 14px 14px 5px;background:#eef3f6;color:#25333c;font-size:12px;line-height:1.55;word-break:break-word;box-shadow:0 1px 1px rgba(19,37,49,.02)}.kbc-bubble p{margin:0 0 7px}.kbc-bubble p:last-child{margin-bottom:0}.kbc-bubble strong{font-weight:800}.kbc-bubble em{font-style:italic}.kbc-bubble u{text-decoration:underline}.kbc-bubble a{color:inherit;text-decoration:underline;text-underline-offset:2px}.kbc-bubble ul,.kbc-bubble ol{margin:5px 0 7px 18px;padding:0}.kbc-bubble li{margin:2px 0}.kbc-bubble blockquote{margin:7px 0;padding-left:10px;border-left:3px solid rgba(70,100,115,.25)}.kbc-bubble--welcome{background:#fff;border:1px solid #e5eaed;box-shadow:0 5px 15px rgba(20,40,53,.04)}.kbc-message--user .kbc-bubble{border-radius:14px 14px 5px 14px;background:#213746;color:#fff;box-shadow:0 7px 18px rgba(33,55,70,.14)}
.kbc-suggestions{padding:10px 14px 3px;background:#fbfcfd;border-top:1px solid #edf0f2}.kbc-suggestions__header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 7px}.kbc-suggestions__header span{font-size:9px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;color:#586a75}.kbc-suggestions__header small{font-size:8px;color:#96a1a8}.kbc-suggestions__list{display:grid;grid-template-columns:1fr 1fr;gap:6px}.kbc-suggestion{appearance:none;min-height:46px;padding:7px 8px;border:1px solid #e0e6ea;border-radius:10px;background:#fff;color:#33444e;font:inherit;font-size:10px;line-height:1.35;text-align:left;cursor:pointer;transition:.15s ease;box-shadow:0 2px 6px rgba(24,44,56,.025)}.kbc-suggestion:hover{border-color:#bfd0d9;background:#f6fafb;transform:translateY(-1px)}.kbc-suggestion:active{transform:translateY(0)}.kbc-suggestion:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(77,126,154,.12)}.kbc-suggestions__fallback{padding:2px 0 4px}.kbc-suggestions__fallback-text{font-size:10px;line-height:1.5;color:#58666f}.kbc-suggestions__fallback .kbc-support-actions{margin-top:9px}
.kbc-composer{padding:10px 12px 11px;border-top:1px solid #e8edf0;background:#fff}.kbc-input-wrap{position:relative}.kbc-input{display:block;width:100%;min-height:61px;box-sizing:border-box;resize:none;padding:10px 44px 10px 11px;border:1px solid #d7e0e5;border-radius:13px;background:#fbfcfd;color:#26343d;font:inherit;font-size:12px;line-height:1.45;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.kbc-input::placeholder{color:#9aa5ac}.kbc-input:focus{border-color:#7a9aae;background:#fff;box-shadow:0 0 0 3px rgba(77,124,152,.1)}.kbc-send{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:9px;background:var(--kbc-chat-accent);color:#fff;cursor:pointer;box-shadow:0 6px 14px rgba(41,76,99,.18);transition:.15s ease}.kbc-send svg{width:15px;height:15px}.kbc-send:hover,.kbc-send:focus-visible{background:#213f52;transform:translateY(-1px)}.kbc-send:disabled{opacity:.48;cursor:not-allowed;transform:none}.kbc-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}.kbc-status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8a969e;font-size:8px}.kbc-enter-hint{color:#a1abb1;font-size:7.5px;white-space:nowrap}
.kbc-support-actions{display:flex;flex-wrap:wrap;gap:7px;margin:9px 0 2px;align-items:center}.kbc-support-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:35px!important;max-width:100%!important;padding:8px 11px!important;border-radius:9px!important;border:1px solid transparent!important;text-decoration:none!important;font-family:inherit!important;font-size:10px!important;font-weight:800!important;line-height:1.2!important;white-space:normal!important;text-align:center!important;cursor:pointer!important;transition:.15s ease}.kbc-support-button,.kbc-support-button:visited,.kbc-support-button:active{color:#fff!important}.kbc-support-button--primary{background:#213f52!important;border-color:#213f52!important;box-shadow:0 5px 12px rgba(33,63,82,.14)}.kbc-support-button--primary:hover,.kbc-support-button--primary:focus{background:#172f3d!important;border-color:#172f3d!important;transform:translateY(-1px)}.kbc-support-button--secondary,.kbc-support-button--secondary:visited,.kbc-support-button--secondary:active{background:#eef3f6!important;color:#213542!important;border-color:#d8e0e5!important}.kbc-support-button--secondary:hover,.kbc-support-button--secondary:focus{background:#e5edf1!important;color:#213542!important;border-color:#cad6dd!important;transform:translateY(-1px)}
@keyframes kbcChatIn{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:600px){.kbc-widget--floating{right:10px;bottom:10px}.kbc-launcher{min-width:0;padding:9px}.kbc-launcher-copy{display:none}.kbc-launcher-icon{width:40px;height:40px}.kbc-launcher-pulse{margin-left:0}.kbc-widget--floating .kbc-panel{right:0;bottom:58px}.kbc-panel{width:calc(100vw - 20px);max-height:calc(100vh - 86px);border-radius:19px}.kbc-messages{max-height:none;min-height:160px}.kbc-suggestions__list{grid-template-columns:1fr}.kbc-enter-hint{display:none}.kbc-footer{justify-content:flex-start}}
@media(prefers-reduced-motion:reduce){.kbc-launcher,.kbc-panel,.kbc-suggestion,.kbc-send{transition:none}.kbc-panel:not([hidden]){animation:none}}

/* v1.4.2 typography polish: medium, comfortable chatbot text */
.kbc-launcher-copy strong{font-size:14px}.kbc-launcher-copy small{font-size:11px}.kbc-header-copy strong{font-size:15px}.kbc-header-copy>span{font-size:11px}.kbc-bubble{font-size:14px}.kbc-suggestions__header span{font-size:11px}.kbc-suggestions__header small{font-size:10px}.kbc-suggestion{font-size:13px}.kbc-suggestions__fallback-text{font-size:13px}.kbc-input{font-size:14px}.kbc-status{font-size:10px}.kbc-enter-hint{font-size:9px}.kbc-support-button{font-size:12px!important}

/* v1.5.10 rich-text typography: keep Welcome and Not-found responses identical to bot bubbles. */
.kbc-widget,.kbc-widget button,.kbc-widget textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.kbc-bubble--welcome,.kbc-bubble--rich,.kbc-bubble--welcome *,.kbc-bubble--rich *{font-family:inherit!important;box-sizing:border-box}
.kbc-bubble--welcome,.kbc-bubble--rich{font-size:14px!important;line-height:1.55!important}
.kbc-bubble--welcome p,.kbc-bubble--rich p{margin:0 0 7px;font-size:14px;line-height:1.55}
.kbc-bubble--welcome p:last-child,.kbc-bubble--rich p:last-child{margin-bottom:0}
.kbc-bubble--welcome h1,.kbc-bubble--rich h1,.kbc-bubble--welcome h2,.kbc-bubble--rich h2,.kbc-bubble--welcome h3,.kbc-bubble--rich h3,.kbc-bubble--welcome h4,.kbc-bubble--rich h4,.kbc-bubble--welcome h5,.kbc-bubble--rich h5,.kbc-bubble--welcome h6,.kbc-bubble--rich h6{font-family:inherit!important;color:inherit!important;font-weight:700;line-height:1.3;margin:0 0 7px}
.kbc-bubble--welcome h1,.kbc-bubble--rich h1{font-size:18px}.kbc-bubble--welcome h2,.kbc-bubble--rich h2{font-size:16px}.kbc-bubble--welcome h3,.kbc-bubble--rich h3{font-size:15px}.kbc-bubble--welcome h4,.kbc-bubble--rich h4{font-size:14px}.kbc-bubble--welcome h5,.kbc-bubble--rich h5{font-size:13px}.kbc-bubble--welcome h6,.kbc-bubble--rich h6{font-size:12px}
.kbc-bubble--welcome ul,.kbc-bubble--rich ul,.kbc-bubble--welcome ol,.kbc-bubble--rich ol{margin:5px 0 8px 19px;padding:0;font-size:14px;line-height:1.55}.kbc-bubble--welcome li,.kbc-bubble--rich li{margin:2px 0}.kbc-bubble--welcome blockquote,.kbc-bubble--rich blockquote{margin:7px 0;padding:7px 0 7px 10px;border-left:3px solid rgba(70,100,115,.24);font-size:14px;line-height:1.55}.kbc-bubble--welcome a,.kbc-bubble--rich a{color:inherit;text-decoration:underline;text-underline-offset:2px}.kbc-bubble--welcome img,.kbc-bubble--rich img,.kbc-bubble--welcome video,.kbc-bubble--rich video{display:block;max-width:100%;height:auto;margin:7px 0;border-radius:8px}.kbc-bubble--welcome figure,.kbc-bubble--rich figure{max-width:100%;margin:7px 0}.kbc-bubble--welcome figure img,.kbc-bubble--rich figure img{margin:0}.kbc-bubble--welcome strong,.kbc-bubble--rich strong{font-weight:700}.kbc-bubble--welcome em,.kbc-bubble--rich em{font-style:italic}.kbc-bubble--welcome u,.kbc-bubble--rich u{text-decoration:underline}

/* ---- CodeCaste integration additions ---- */
.kbc-widget{--kbc-chat-accent:#294c63}
.kbc-widget--floating.kbc-pos-left{right:auto;left:24px}
.kbc-widget--floating.kbc-pos-left .kbc-panel{right:auto;left:0;transform-origin:bottom left}
.kbc-avatar img,.kbc-launcher-icon img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.kbc-avatar:has(img),.kbc-launcher-icon:has(img){overflow:hidden;padding:0}
.kbc-bubble--user,.kbc-message--user .kbc-bubble{background:linear-gradient(135deg,var(--kbc-chat-accent-2),var(--kbc-chat-accent));color:#fff;border-radius:14px 14px 5px 14px}
.kbc-time{display:block;margin-top:5px;font-size:10px;opacity:.55}
.kbc-typing{display:inline-flex;align-items:center;gap:4px;padding:4px 2px}
.kbc-typing span{width:6px;height:6px;border-radius:50%;background:#8fa3af;animation:kbcDot 1.1s infinite ease-in-out}
.kbc-typing span:nth-child(2){animation-delay:.15s}.kbc-typing span:nth-child(3){animation-delay:.3s}
@keyframes kbcDot{0%,80%,100%{transform:scale(.6);opacity:.45}40%{transform:scale(1);opacity:1}}
.kbc-bubble--error{background:#fff5f5;color:#8f2f2f;border:1px solid #efd0d0}
.kbc-retry{margin-top:8px;padding:6px 11px;border:1px solid #e0b9b9;border-radius:9px;background:#fff;color:#8f2f2f;font-size:12px;font-weight:700;cursor:pointer}
.kbc-retry:hover{background:#fff0f0}
.kbc-bubble ul,.kbc-bubble ol{margin:5px 0 8px 19px;padding:0}.kbc-bubble li{margin:2px 0}
.kbc-bubble a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.kbc-bubble code{padding:1px 5px;border-radius:5px;background:rgba(0,0,0,.06);font-size:.92em}
.kbc-day-chip{display:table;margin:2px auto 8px;padding:3px 10px;border-radius:999px;background:#eef3f6;color:#71808b;font-size:11px;font-weight:700}
.kbc-input{max-height:110px}

/* v1.1.1 fixes: field spacing, empty fields, theme-proof hover colours */
.kbc-bubble .aichatbot-field{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:2px 6px;margin:0 0 12px!important;padding:0!important;line-height:1.5}
.kbc-bubble .aichatbot-field:first-child{margin-top:0!important}
.kbc-bubble .aichatbot-field:last-child{margin-bottom:0!important}
.kbc-bubble p+.aichatbot-field{margin-top:12px!important}
.kbc-bubble .aichatbot-field__label{flex:0 0 auto;white-space:nowrap;font-weight:700;color:inherit!important;display:inline!important;margin:0!important}
.kbc-bubble .aichatbot-field__value{flex:1 1 auto;min-width:0;display:inline!important;margin:0!important;color:inherit!important;word-break:break-word;overflow-wrap:anywhere}
.kbc-bubble .aichatbot-field:empty,.kbc-bubble .aichatbot-field__value:empty{display:none!important}
.kbc-bubble .aichatbot-field:has(.aichatbot-field__value:empty){display:none!important}
.kbc-bubble a.aichatbot-link,.kbc-bubble a.aichatbot-link:visited{color:#213f52!important;text-decoration:underline!important;background:transparent!important}
.kbc-bubble a.aichatbot-link:hover,.kbc-bubble a.aichatbot-link:focus{color:#0b2a3b!important;background:transparent!important;text-decoration:underline!important}
.kbc-message--user .kbc-bubble a,.kbc-message--user .kbc-bubble a:hover{color:#fff!important}
/* buttons: force readable text on hover regardless of theme button:hover rules */
.kbc-widget .kbc-launcher,.kbc-widget .kbc-launcher:hover,.kbc-widget .kbc-launcher:focus,.kbc-widget .kbc-launcher:active{color:#fff!important}
.kbc-widget .kbc-launcher:hover{background:linear-gradient(135deg,var(--kbc-chat-accent-dark),var(--kbc-chat-accent))!important}
.kbc-widget .kbc-launcher-copy strong,.kbc-widget .kbc-launcher:hover .kbc-launcher-copy strong{color:#fff!important}
.kbc-widget .kbc-launcher-copy small,.kbc-widget .kbc-launcher:hover .kbc-launcher-copy small{color:#d3e1e9!important}
.kbc-widget .kbc-close{background:#fff!important;color:#65727c!important;border-color:#dfe5e9!important}
.kbc-widget .kbc-close:hover,.kbc-widget .kbc-close:focus-visible{background:#213f52!important;color:#fff!important;border-color:#213f52!important}
.kbc-widget .kbc-close:hover span,.kbc-widget .kbc-close:focus-visible span{color:#fff!important}
.kbc-widget .kbc-send,.kbc-widget .kbc-send:hover,.kbc-widget .kbc-send:focus-visible{color:#fff!important}
.kbc-widget .kbc-send:hover,.kbc-widget .kbc-send:focus-visible{background:#172f3d!important}
.kbc-widget .kbc-send svg,.kbc-widget .kbc-send:hover svg{color:#fff!important;stroke:currentColor}
.kbc-widget .kbc-suggestion{background:#fff!important;color:#33444e!important}
.kbc-widget .kbc-suggestion:hover,.kbc-widget .kbc-suggestion:focus-visible{background:#213f52!important;color:#fff!important;border-color:#213f52!important}
.kbc-widget .kbc-retry{background:#fff!important;color:#8f2f2f!important}
.kbc-widget .kbc-retry:hover,.kbc-widget .kbc-retry:focus-visible{background:#8f2f2f!important;color:#fff!important;border-color:#8f2f2f!important}

/* Hide the vertical scrollbar in the chat messages area (scrolling still works). */
.kbc-messages{-ms-overflow-style:none;scrollbar-width:none}
.kbc-messages::-webkit-scrollbar{display:none;width:0;height:0}


/* v1.1.5 answer attribution: make the AI engine and knowledge sources visible per response. */
.kbc-attribution{margin:6px 4px 0;max-width:92%;font-size:10px;line-height:1.35;color:#697984}
.kbc-attribution-provider{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-height:18px}
.kbc-provider-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex:0 0 7px;box-shadow:0 0 0 2px rgba(0,0,0,.04)}
.kbc-provider-dot--gemini{background:#28a763}
.kbc-provider-dot--groq{background:#2f80ed}
.kbc-provider-dot--knowledge{background:#7b8c95}
.kbc-provider-dot--none{background:#b9c2c7}
.kbc-attribution-provider strong{font-size:10px;color:#344852}
.kbc-provider-model{font-size:9px;color:#87939a;background:#f3f6f7;border:1px solid #e5eaed;border-radius:999px;padding:2px 5px;white-space:nowrap;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.kbc-fallback-badge{font-size:8px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#8a610d;background:#fff4db;border:1px solid #f0dfb5;border-radius:999px;padding:2px 5px}
.kbc-attribution-note{font-size:9px;color:#76868f}
.kbc-attribution-sources{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-top:4px}
.kbc-attribution-sources-label{font-size:9px;font-weight:800;color:#8a979e;text-transform:uppercase;letter-spacing:.04em}
.kbc-source-chip-list{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.kbc-source-chip{display:inline-flex;align-items:center;gap:3px;max-width:100%;padding:3px 6px;border:1px solid #e0e7ea;background:#f8fafb;border-radius:7px;color:#55656e}
.kbc-source-chip__file{font-weight:800;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kbc-source-chip__heading{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#86939a}
.kbc-source-chip__scope{font-size:8px;font-weight:800;color:#6f7d84;background:#eef3f5;border-radius:999px;padding:2px 4px;white-space:nowrap}
.kbc-message--user .kbc-attribution{display:none}
@media(max-width:600px){.kbc-attribution{max-width:96%}.kbc-source-chip__file{max-width:120px}.kbc-source-chip__heading{max-width:110px}}
/* Hide provider/model label and sources from visitors */
.kbc-attribution{display:none!important}
