.kta-root {
  --kta-primary: #167eae;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99990;
  color: #233248;
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.kta-root *, .kta-root *::before, .kta-root *::after { box-sizing: border-box; }
.kta-root button, .kta-root input, .kta-root textarea { font: inherit; }
.kta-root button { -webkit-tap-highlight-color: transparent; }

/* Permanent corner launcher and greeting card */
.kta-launch {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-left: auto;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--kta-primary);
  color: #fff;
  box-shadow: 0 5px 18px #15364d42, 0 0 0 1px #d7e6ec;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.kta-launch:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #15364d4d, 0 0 0 1px #d7e6ec; }
.kta-launch-avatar { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; background: #fff; }
.kta-launch-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kta-avatar-mark { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--kta-primary); color: #fff; }
.kta-avatar-mark svg { width: 67%; height: 67%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; }
.kta-launch-avatar .kta-avatar-mark { background: #e7f7fb; color: var(--kta-primary); }
.kta-launch-label { position: absolute; right: 58px; bottom: 11px; padding: 7px 10px; border-radius: 999px; background: var(--kta-primary); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 12px #15364d29; }
.kta-launch-mobile-label { display: none; }
.kta-launch-label::after { position: absolute; right: -5px; bottom: 10px; width: 10px; height: 10px; background: inherit; content: ""; transform: rotate(45deg); }
.kta-launch-dot { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; border: 3px solid white; border-radius: 50%; background: #35bd77; }
.kta-teaser {
  position: absolute;
  right: 0;
  bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(280px, calc(100vw - 24px));
  padding: 10px 12px 9px;
  border: 1px solid #e7edf0;
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #26384d;
  text-align: left;
  box-shadow: 0 8px 30px #203b501c;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.kta-teaser:hover { transform: translateY(-2px); box-shadow: 0 12px 34px #203b5026; }
.kta-teaser-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--kta-primary); }
.kta-teaser-brand > .kta-avatar-mark, .kta-teaser-brand > img { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; }
.kta-teaser-brand > img { object-fit: cover; }
.kta-teaser-brand strong { font-size: 15px; font-weight: 720; }
.kta-online { margin-left: auto; color: #66788a; font-size: 10px; white-space: nowrap; }
.kta-teaser-copy { color: #455266; font-size: 14px; line-height: 1.4; }
.kta-teaser-cta { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; border-top: 1px solid #eef2f4; color: var(--kta-primary); font-size: 10px; font-weight: 650; }
.kta-teaser-cta span { font-size: 22px; line-height: 1; }
.kta-root.is-open .kta-teaser { display: none; }

/* Chat panel */
.kta-panel {
  position: absolute;
  right: 0;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  width: min(370px, calc(100vw - 24px));
  height: min(580px, calc(100vh - 100px));
  overflow: hidden;
  border: 1px solid #dfe9ec;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 48px #203b5033;
}
.kta-panel[hidden], .kta-lead-form[hidden] { display: none; }
.kta-header { display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: var(--kta-primary); color: #fff; }
.kta-header-avatar { flex: 0 0 43px; width: 43px; height: 43px; overflow: hidden; border: 2px solid #ffffff91; border-radius: 50%; background: #fff; }
.kta-header-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kta-header-avatar .kta-avatar-mark { background: #fff; color: var(--kta-primary); }
.kta-header-title { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.kta-header-title strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.kta-header-title small { font-size: 11px; opacity: .93; }
.kta-close { display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; padding: 0 0 3px; border: 1px solid #ffffff70; border-radius: 50%; background: transparent; color: #fff; font-size: 25px !important; line-height: 1; cursor: pointer; }
.kta-close:hover { background: #ffffff1c; }
.kta-messages { flex: 1 1 auto; min-height: 95px; overflow: auto; padding: 14px; background: linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(249,252,253,.82) 100%); }
.kta-welcome { display: flex; align-items: flex-start; gap: 10px; max-width: 100%; margin: 0 0 12px; padding: 13px; border: 1px solid #edf1f3; border-radius: 16px 16px 16px 5px; background: #fff; box-shadow: 0 3px 12px #203b500d; }
.kta-welcome-avatar { flex: 0 0 36px; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: var(--kta-primary); }
.kta-welcome-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kta-welcome-avatar .kta-avatar-mark { background: #e7f7fb; color: var(--kta-primary); }
.kta-welcome strong { display: block; margin: 1px 0 4px; color: var(--kta-primary); font-size: 15px; }
.kta-welcome p { margin: 0; color: #465466; font-size: 15px; line-height: 1.5; }
.kta-bubble { max-width: 88%; margin: 0 0 9px; padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.kta-bot { border: 1px solid #e3eaed; background: #fff; margin-right: auto; }
.kta-user { background: #e6f5fb; color: #26384d; margin-left: auto; }
.kta-pending { opacity: .7; }

/* Product cards returned from the published WooCommerce catalog */
.kta-product-results { display: flex; gap: 10px; max-width: 100%; margin: 2px 0 12px; padding: 2px 1px 8px; overflow-x: auto; scroll-snap-type: x proximity; }
.kta-product-card { display: flex; flex: 0 0 148px; flex-direction: column; gap: 7px; overflow: hidden; padding: 8px; border: 1px solid #dfe9ec; border-radius: 13px; background: rgba(255,255,255,.96); color: #26384d; text-decoration: none; box-shadow: 0 2px 8px #203b5010; scroll-snap-align: start; }
.kta-product-card:hover, .kta-product-card:focus-visible { border-color: var(--kta-primary); box-shadow: 0 4px 12px #203b501c; }
.kta-product-card img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: #f2f6f7; object-fit: cover; }
.kta-product-card strong { display: -webkit-box; overflow: hidden; color: #26384d; font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.kta-product-card > span { color: var(--kta-primary); font-size: 12px; font-weight: 650; }

/* One-tap product and support shortcuts */
.kta-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; background: rgba(255,255,255,.94); }
.kta-suggestions-label { flex: 1 0 100%; color: #74808e; font-size: 12px; }
.kta-suggestion-buttons { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.kta-suggestions button { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 11px; border: 1.5px solid var(--kta-primary); border-radius: 999px; background: #fff; color: var(--kta-primary); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.kta-suggestions button:hover, .kta-suggestions button:focus-visible { background: var(--kta-primary); color: #fff; }
.kta-suggestions button span { font-size: 17px; line-height: 1; }

.kta-chat-form { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-top: 1px solid #edf1f3; background: #fff; }
.kta-chat-form input, .kta-lead-form input, .kta-lead-form textarea { width: 100%; min-width: 0; border: 1px solid #d4dfe3; border-radius: 11px; outline: 0; background: #fff; color: #26384d; padding: 11px 12px; }
.kta-chat-form input:focus, .kta-lead-form input:focus, .kta-lead-form textarea:focus { border-color: var(--kta-primary); box-shadow: 0 0 0 3px #167eae26; }
.kta-chat-form button { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: var(--kta-primary); color: #fff; cursor: pointer; }
.kta-chat-form button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.kta-chat-form button:disabled, .kta-lead-form button:disabled { opacity: .6; cursor: wait; }
.kta-lead-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: calc(100% - 28px);
  min-height: 48px;
  margin: 2px 14px 12px;
  padding: 11px 16px;
  border: 1.5px solid var(--kta-primary);
  border-radius: 12px;
  background: #f4faff;
  color: var(--kta-primary);
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.kta-lead-toggle:hover, .kta-lead-toggle:focus-visible { background: var(--kta-primary); color: #fff; box-shadow: 0 3px 12px #203b5020; }
.kta-lead-form { max-height: 260px; overflow: auto; padding: 0 14px 14px; background: #fff; }
.kta-lead-form label { display: block; margin: 0 0 8px; color: #3a495a; font-size: 13px; }
.kta-lead-form input, .kta-lead-form textarea { display: block; margin-top: 4px; padding: 9px 10px; }
.kta-lead-form textarea { min-height: 58px; resize: vertical; }
.kta-lead-form .kta-consent { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.4; }
.kta-lead-form .kta-consent input { flex: 0 0 auto; width: auto; margin-top: 2px; accent-color: var(--kta-primary); }
.kta-lead-form button { padding: 10px 14px; border: 0; border-radius: 10px; background: var(--kta-primary); color: #fff; font-weight: 650; cursor: pointer; }
.kta-lead-status { margin: 8px 0 0; color: #465466; font-size: 12px; }
.kta-panel footer { padding: 7px 10px; border-top: 1px solid #edf1f3; background: #fbfcfd; color: #647282; font-size: 10px; text-align: center; }
.kta-root button:focus-visible { outline: 3px solid #f4c646; outline-offset: 2px; }
.kta-root .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 480px) {
  .kta-root { right: 12px; bottom: 12px; }
  .kta-teaser { display: none; }
  .kta-launch { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: auto; min-width: 206px; height: 54px; margin-left: auto; padding: 4px 14px 4px 4px; border-width: 2px; border-radius: 999px; }
  .kta-launch-avatar { flex: 0 0 44px; width: 44px; height: 44px; }
  .kta-launch-label, .kta-launch-dot { display: none; }
  .kta-launch-mobile-label { display: block; color: #fff; font-size: 14px; font-weight: 650; white-space: nowrap; }
  .kta-panel { right: -4px; bottom: 66px; width: min(420px, calc(100vw - 16px)); height: min(680px, calc(100dvh - 90px)); border-radius: 18px; }
  .kta-lead-toggle { width: calc(100% - 24px); min-height: 52px; margin: 2px 12px 12px; padding: 12px 14px; border-radius: 14px; font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .kta-root *, .kta-root *::before, .kta-root *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
