/* Khanny AI Assistant — chat widget */
.kc-launch, .kc-panel, .kc-nudge { font-family: 'Work Sans', Inter, system-ui, sans-serif; box-sizing: border-box; }
.kc-panel *, .kc-nudge * { box-sizing: border-box; }
.kc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* stack the call button above the chat button */
body.khs-chat-on .khs-call-fab { bottom: 96px !important; width: 52px; height: 52px; right: 27px; transition: opacity .25s; }
.kc-open body.khs-chat-on .khs-call-fab, .kc-open .khs-call-fab { opacity: 0; pointer-events: none; }

.kc-launch { position: fixed; right: 24px; bottom: 24px; z-index: 1002; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
	background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 55%, #0EA5E9 100%); box-shadow: 0 14px 34px rgba(79,70,229,.5), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.kc-launch:hover { transform: translateY(-2px) scale(1.04); }
.kc-launch:focus-visible { outline: 3px solid #C4B5FD; outline-offset: 3px; }
.kc-launch svg { position: relative; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .25s; }
.kc-launch .kc-ic-close { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
.kc-open .kc-launch .kc-ic-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.kc-open .kc-launch .kc-ic-close { opacity: 1; transform: none; }
.kc-launch-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(139,92,246,.7); animation: kcRing 2.6s ease-out infinite; }
.kc-open .kc-launch-ring { display: none; }
@keyframes kcRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }

.kc-nudge { position: fixed; right: 96px; bottom: 30px; z-index: 1001; max-width: 250px; padding: 14px 34px 14px 16px; border-radius: 16px 16px 4px 16px; cursor: pointer;
	background: #14152E; border: 1px solid rgba(139,92,246,.4); color: #E7E7F2; box-shadow: 0 16px 40px rgba(0,0,0,.45);
	opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .4s, transform .5s cubic-bezier(.16,1,.3,1); }
.kc-nudge.kc-show { opacity: 1; transform: none; pointer-events: auto; }
.kc-nudge b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.kc-nudge span { font-size: 13px; color: #A8A9BD; line-height: 1.45; }
.kc-nudge-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #8A8BA3; font-size: 18px; line-height: 1; cursor: pointer; }
.kc-nudge-x:hover { color: #fff; background: rgba(255,255,255,.08); }

.kc-panel { position: fixed; right: 24px; bottom: 98px; z-index: 1003; width: 390px; height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column; overflow: hidden;
	border-radius: 22px; background: #0D0E22; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(124,58,237,.12);
	opacity: 0; transform: translateY(16px) scale(.97); transform-origin: 100% 100%; pointer-events: none; visibility: hidden;
	transition: opacity .3s, transform .45s cubic-bezier(.16,1,.3,1), visibility 0s .45s; }
.kc-open .kc-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .3s, transform .45s cubic-bezier(.16,1,.3,1), visibility 0s; }

.kc-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 16px; color: #fff;
	background: linear-gradient(120deg, #2E1065 0%, #312E81 55%, #0C4A6E 100%); border-bottom: 1px solid rgba(255,255,255,.08); }
.kc-av { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.kc-av img { width: 26px; height: auto; }
.kc-title { flex: 1; min-width: 0; }
.kc-title b { display: block; font-size: 15.5px; font-weight: 600; font-family: 'Space Grotesk', 'Work Sans', sans-serif; }
.kc-title span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #C7C8E0; }
.kc-title i { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.kc-new, .kc-x { flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #E6E6F2; display: grid; place-items: center; cursor: pointer; }
.kc-new:hover, .kc-x:hover { background: rgba(255,255,255,.16); }

.kc-body { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.kc-body::-webkit-scrollbar { width: 6px; } .kc-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.kc-row { display: flex; animation: kcIn .35s cubic-bezier(.16,1,.3,1); }
@keyframes kcIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.kc-user { justify-content: flex-end; }
.kc-b { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.kc-assistant .kc-b { background: #17183A; color: #E6E6F2; border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 5px; }
.kc-user .kc-b { background: linear-gradient(135deg, #7C3AED, #4F46E5); color: #fff; border-bottom-right-radius: 5px; }
.kc-b p { margin: 0; } .kc-b p + p, .kc-b ul + p { margin-top: 8px; }
.kc-b ul { margin: 6px 0; padding-left: 18px; } .kc-b li { margin: 2px 0; }
.kc-b a { color: #A5B4FC; text-decoration: underline; text-underline-offset: 2px; }
.kc-user .kc-b a { color: #fff; }
.kc-b strong { color: #fff; font-weight: 600; }
.kc-lead .kc-b { border-color: rgba(74,222,128,.45); box-shadow: inset 3px 0 0 #4ADE80; }
.kc-typing .kc-b { display: flex; gap: 5px; padding: 14px 16px; }
.kc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8B8CF8; animation: kcDot 1.2s infinite ease-in-out; }
.kc-typing span:nth-child(2) { animation-delay: .15s; } .kc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes kcDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.kc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 10px; }
.kc-chips[hidden] { display: none; }
.kc-chip { border: 1px solid rgba(139,92,246,.45); background: rgba(139,92,246,.1); color: #DDD6FE; border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.kc-chip:hover { background: rgba(139,92,246,.25); color: #fff; }

.kc-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 8px 8px 8px 14px; border-radius: 16px; background: #15162F; border: 1px solid rgba(255,255,255,.1); transition: border-color .2s, box-shadow .2s; }
.kc-form:focus-within { border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.kc-form textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: #F2F2FA; font: inherit; font-size: 15px; line-height: 1.45; padding: 7px 0; max-height: 120px; }
.kc-form textarea::placeholder { color: #7E80A0; }
.kc-send { flex-shrink: 0; width: 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer; color: #fff; display: grid; place-items: center; background: linear-gradient(135deg, #7C3AED, #0EA5E9); transition: opacity .2s, transform .2s; }
.kc-send:hover { transform: translateY(-1px); } .kc-send:disabled { opacity: .5; cursor: default; transform: none; }
.kc-foot { padding: 8px 16px 12px; font-size: 11px; color: #6F7090; text-align: center; line-height: 1.4; }

@media (max-width: 600px) {
	.kc-launch { right: 16px; bottom: 16px; width: 56px; height: 56px; }
	body.khs-chat-on .khs-call-fab { bottom: 84px !important; right: 18px !important; width: 52px !important; height: 52px !important; }
	.kc-nudge { right: 82px; bottom: 20px; max-width: calc(100vw - 110px); }
	.kc-panel { right: 0; left: 0; bottom: 0; top: 0; width: 100%; height: 100%; border-radius: 0; border: 0; transform: translateY(24px); }
	.kc-open .kc-launch { display: none; }
	.kc-open, .kc-open body { overflow: hidden; }
	.kc-form textarea { font-size: 16px; }
	.kc-head { padding-top: max(16px, env(safe-area-inset-top)); }
	.kc-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.kc-launch-ring, .kc-typing span { animation: none; }
	.kc-panel, .kc-nudge, .kc-row { transition: none; animation: none; }
}
