/* Kinal Chatbot. Sits above the WhatsApp button (.kx-wa) when the page has one. */
.kbot { --kb-ink: #0c0f17; --kb-body: #52525b; --kb-mute: #8e8d88; --kb-line: rgba(12, 15, 23, 0.1); --kb-coral: #e8603c; --kb-tint: #fff1ea; --kb-paper: #f6f3f0; --kb-bottom: 22px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.5; }
.kbot.kbot-wa { --kb-bottom: 94px; }
.kbot, .kbot * { box-sizing: border-box; }
.kbot button { font: inherit; cursor: pointer; }
.kbot :focus-visible { outline: 3px solid var(--kb-ink); outline-offset: 3px; }

.kbot-launch { position: fixed; right: 22px; bottom: var(--kb-bottom); z-index: 991; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--kb-coral); color: #fff; box-shadow: 0 16px 34px -10px rgba(232, 96, 60, 0.7), 0 4px 10px rgba(12, 15, 23, 0.16); transition: transform .3s, box-shadow .3s; }
.kbot-launch:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -10px rgba(232, 96, 60, 0.8), 0 4px 10px rgba(12, 15, 23, 0.18); }
.kbot-launch svg { grid-area: 1 / 1; width: 28px; height: 28px; fill: #fff; transition: opacity .25s, transform .3s; }
.kbot-launch .kbot-i-x { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; opacity: 0; transform: rotate(-60deg) scale(.6); }
.kbot.is-open .kbot-i-chat { opacity: 0; transform: rotate(60deg) scale(.6); }
.kbot.is-open .kbot-i-x { opacity: 1; transform: none; }

.kbot-teaser { position: fixed; right: 96px; bottom: calc(var(--kb-bottom) + 8px); z-index: 991; display: flex; align-items: center; gap: 8px; max-width: 250px; padding: 12px 8px 12px 16px; border-radius: 18px 18px 4px 18px; background: #fff; color: var(--kb-ink); font-size: 14px; font-weight: 600; box-shadow: 0 18px 40px -16px rgba(12, 15, 23, 0.4); animation: kb-pop .4s ease both; }
.kbot-teaser[hidden], .kbot-panel[hidden] { display: none; }
.kbot-teaser span { cursor: pointer; }
.kbot-teaser button { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--kb-mute); font-size: 20px; line-height: 1; }
.kbot-teaser button:hover { background: var(--kb-paper); color: var(--kb-ink); }
@keyframes kb-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.kbot-panel { position: fixed; right: 22px; bottom: calc(var(--kb-bottom) + 72px); z-index: 991; display: flex; flex-direction: column; width: 380px; max-width: calc(100vw - 28px); height: min(600px, calc(100vh - var(--kb-bottom) - 100px)); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(12, 15, 23, 0.5), 0 0 0 1px var(--kb-line); animation: kb-pop .3s ease both; }
.kbot-panel header { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--kb-tint); }
.kbot-av { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--kb-coral); color: #fff; font: 800 17px 'Plus Jakarta Sans', sans-serif; }
.kbot-panel header > div { flex: 1; min-width: 0; }
.kbot-panel header strong { display: block; color: var(--kb-ink); font: 800 16px 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.01em; }
.kbot-panel header small { display: block; color: var(--kb-body); font-size: 12px; }
.kbot-reset, .kbot-close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.7); color: var(--kb-ink); transition: background .2s; }
.kbot-reset:hover, .kbot-close:hover { background: #fff; }
.kbot-reset svg, .kbot-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.kbot-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.kbot-msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.kbot-msg.is-user { align-self: flex-end; align-items: flex-end; }
.kbot-bubble { padding: 11px 15px; border-radius: 18px 18px 18px 4px; background: var(--kb-paper); color: var(--kb-ink); }
.is-user .kbot-bubble { border-radius: 18px 18px 4px 18px; background: var(--kb-coral); color: #fff; }
.kbot-bubble p { margin: 0; }
.kbot-bubble p + p, .kbot-bubble p + ul, .kbot-bubble ul + p { margin-top: 8px; }
.kbot-bubble ul { margin: 6px 0 0; padding-left: 18px; }
.kbot-bubble li { margin: 3px 0; }
.kbot-btns, .kbot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kbot-btn { padding: 9px 16px; border-radius: 99px; background: var(--kb-coral); color: #fff; font: 700 13px 'Plus Jakarta Sans', sans-serif; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.kbot-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(232, 96, 60, 0.7); color: #fff; }
.kbot-chip { padding: 8px 14px; border: 1px solid var(--kb-line); border-radius: 99px; background: #fff; color: var(--kb-ink); font-size: 13px; font-weight: 600; text-align: left; transition: border-color .2s, color .2s, background .2s; }
.kbot-chip:hover { border-color: var(--kb-coral); color: var(--kb-coral); background: var(--kb-tint); }
.kbot-typing .kbot-bubble { display: flex; gap: 5px; padding: 14px 16px; }
.kbot-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--kb-mute); animation: kb-dot 1s infinite ease-in-out; }
.kbot-typing i:nth-child(2) { animation-delay: .15s; }
.kbot-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes kb-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.kbot-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--kb-line); background: #fff; }
.kbot-form input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid transparent; border-radius: 99px; background: var(--kb-paper); color: var(--kb-ink); font: inherit; font-size: 15px; }
.kbot-form input:focus { outline: none; border-color: var(--kb-coral); background: #fff; box-shadow: 0 0 0 4px rgba(232, 96, 60, 0.14); }
.kbot-form button { flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--kb-coral); color: #fff; transition: transform .2s; }
.kbot-form button:hover { transform: translateY(-2px); }
.kbot-form button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 767px) {
  .kbot { --kb-bottom: 14px; }
  .kbot.kbot-wa { --kb-bottom: 80px; }
  .kbot-launch { right: 14px; width: 54px; height: 54px; }
  .kbot-teaser { right: 80px; }
  .kbot.is-open .kbot-launch { display: none; }
  .kbot-panel { inset: 0; width: auto; max-width: none; height: auto; border-radius: 0; box-shadow: none; }
  .kbot-form { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .kbot *, .kbot-panel, .kbot-teaser { animation: none !important; transition: none !important; scroll-behavior: auto; } }
