#kati-ai-agent-root,
#kati-ai-agent-root-inline {
  --kati-ai-primary: #EA580C;
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  box-sizing: border-box;
}
#kati-ai-agent-root * ,
#kati-ai-agent-root-inline * { box-sizing: border-box; }
.kati-ai-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 0;
  background: var(--kati-ai-primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  z-index: 99998;
}
.kati-ai-launcher span { font-size: 18px; letter-spacing: .02em; }
.kati-ai-shell {
  overflow-x: hidden !important;
  position: fixed;
  right: 22px;
  bottom: 98px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 130px));
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .25);
  border: 1px solid rgba(15, 23, 42, .08);
  z-index: 99999;
}
.kati-ai-shell.is-open { display: flex; }
.kati-ai-inline-shell {
  display: flex !important;
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: 760px;
  height: 640px;
  margin: 0 auto;
}
.kati-ai-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--kati-ai-primary), #1D4ED8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kati-ai-header strong { display: block; font-size: 16px; }
.kati-ai-header span { display: block; opacity: .88; font-size: 13px; margin-top: 2px; }
.kati-ai-close {
  border: 0;
  background: rgba(255,255,255,.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.kati-ai-messages {
  overflow-x: hidden !important;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
}
.kati-ai-msg { display: flex; margin: 0 0 12px; }
.kati-ai-msg > div {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 3px 12px rgba(15,23,42,.05);
}
.kati-ai-msg-user { justify-content: flex-end; }
.kati-ai-msg-user > div { background: var(--kati-ai-primary); color: #fff; border-bottom-right-radius: 5px; }
.kati-ai-msg-assistant > div { background: #fff; color: #0f172a; border-bottom-left-radius: 5px; }
.kati-ai-msg a { color: inherit; text-decoration: underline; }
.kati-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
  overflow-x: hidden !important;
  background: #fff;
}
.kati-ai-suggestions button {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  color: #0f172a;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.kati-ai-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(15,23,42,.08);
}
.kati-ai-input-row input {
  flex: 1;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}
.kati-ai-input-row input:focus { border-color: var(--kati-ai-primary); }
.kati-ai-input-row button {
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: var(--kati-ai-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 520px) {
  .kati-ai-launcher { right: 16px; bottom: 16px; width: 58px; height: 58px; }
  .kati-ai-shell { right: 10px; bottom: 82px; width: calc(100vw - 20px); height: min(620px, calc(100vh - 98px)); border-radius: 18px; }
  .kati-ai-inline-shell { height: 580px; }
}
