.aisa-root {
  --aisa-primary: #2f5d50;
  --aisa-primary-text: #ffffff;
  --aisa-surface: #ffffff;
  --aisa-text: #17211e;
  --aisa-muted: #65716d;
  --aisa-border: #dce4e0;
  --aisa-soft: #f2f6f4;
  --aisa-radius: 14px;
  --aisa-font: inherit;
  color: var(--aisa-text);
  font-family: var(--aisa-font);
  font-size: 15px;
  line-height: 1.45;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147481000;
}

.aisa-root.aisa-left { left: 24px; right: auto; }
.aisa-root *, .aisa-root *::before, .aisa-root *::after { box-sizing: border-box; }
.aisa-root .sr-only { border: 0 !important; clip: rect(0, 0, 0, 0) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; white-space: nowrap !important; width: 1px !important; }

.aisa-teaser {
  align-items: center;
  background: var(--aisa-surface);
  border: 1px solid var(--aisa-border);
  border-radius: calc(var(--aisa-radius) - 1px);
  bottom: 4px;
  box-shadow: 0 12px 34px rgba(20, 35, 30, .18);
  color: var(--aisa-text);
  display: flex;
  max-width: min(300px, calc(100vw - 110px));
  opacity: 0;
  position: absolute;
  right: 72px;
  transform: translateX(8px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
  width: max-content;
}
.aisa-teaser[hidden] { display: none !important; }
.aisa-teaser.is-visible { opacity: 1; transform: none; }
.aisa-teaser::after { background: var(--aisa-surface); border-right: 1px solid var(--aisa-border); border-top: 1px solid var(--aisa-border); content: ''; height: 11px; position: absolute; right: -6px; top: calc(50% - 6px); transform: rotate(45deg); width: 11px; }
.aisa-left .aisa-teaser { left: 72px; right: auto; transform: translateX(-8px) scale(.98); }
.aisa-left .aisa-teaser.is-visible { transform: none; }
.aisa-left .aisa-teaser::after { border: 0; border-bottom: 1px solid var(--aisa-border); border-left: 1px solid var(--aisa-border); left: -6px; right: auto; }
.aisa-root .aisa-teaser button { appearance: none; background: transparent; border: 0; box-shadow: none; color: inherit; font: inherit; margin: 0; min-height: 0; min-width: 0; text-transform: none; }
.aisa-root .aisa-teaser-open { align-items: center; cursor: pointer; display: flex; gap: 9px; line-height: 1.3; padding: 11px 5px 11px 12px; text-align: left; }
.aisa-teaser-open svg { fill: color-mix(in srgb, var(--aisa-primary), transparent 88%); flex: 0 0 22px; height: 22px; stroke: var(--aisa-primary); stroke-linejoin: round; stroke-width: 1.6; width: 22px; }
.aisa-teaser-open span { display: block; font-size: 13px; font-weight: 650; }
.aisa-root .aisa-teaser-close { align-items: center; align-self: stretch; color: var(--aisa-muted); cursor: pointer; display: flex; flex: 0 0 34px; justify-content: center; padding: 0 8px 0 5px; position: relative; z-index: 1; }
.aisa-teaser-close svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; width: 15px; }
.aisa-teaser-close:hover { color: var(--aisa-text); }
.aisa-teaser-open:focus-visible, .aisa-teaser-close:focus-visible { outline: 2px solid var(--aisa-primary); outline-offset: -3px; }
.aisa-open .aisa-teaser { display: none !important; }

.aisa-launcher {
  align-items: center;
  background: var(--aisa-primary);
  border: 0;
  border-radius: 999px;
  bottom: 0;
  box-shadow: 0 12px 30px rgba(20, 35, 30, .22);
  color: var(--aisa-primary-text);
  cursor: pointer;
  display: flex;
  height: 58px;
  justify-content: center;
  margin: 0;
  min-height: 58px;
  min-width: 58px;
  padding: 0;
  position: absolute;
  right: 0;
  width: 58px;
}

.aisa-left .aisa-launcher { left: 0; right: auto; }
.aisa-launcher svg { fill: none; height: 25px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 25px; }
.aisa-launcher:hover { filter: brightness(.94); transform: translateY(-1px); }
.aisa-launcher:focus-visible, .aisa-close:focus-visible, .aisa-composer button:focus-visible, .aisa-product a:focus-visible {
  outline: 3px solid var(--aisa-primary);
  outline: 3px solid color-mix(in srgb, var(--aisa-primary), white 55%);
  outline-offset: 3px;
}

.aisa-panel {
  background: var(--aisa-surface);
  border: 1px solid var(--aisa-border);
  border-radius: calc(var(--aisa-radius) + 6px);
  bottom: 72px;
  box-shadow: 0 24px 70px rgba(20, 35, 30, .20);
  display: flex;
  flex-direction: column;
  height: min(650px, calc(100vh - 130px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(12px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease;
  visibility: hidden;
  width: min(390px, calc(100vw - 32px));
}

.aisa-left .aisa-panel { left: 0; right: auto; transform-origin: bottom left; }
.aisa-open .aisa-panel { opacity: 1; pointer-events: auto; transform: none; visibility: visible; }
.aisa-open .aisa-launcher { opacity: 0; pointer-events: none; }

.aisa-root .aisa-header {
  align-items: center;
  background: var(--aisa-primary);
  color: var(--aisa-primary-text);
  display: flex !important;
  flex: 0 0 64px;
  height: 64px;
  justify-content: space-between;
  margin: 0;
  opacity: 1;
  overflow: visible;
  padding: 0 16px 0 18px;
  position: relative;
  transform: none;
  visibility: visible;
  width: 100%;
}

.aisa-root .aisa-header-title { align-items: center; display: flex !important; gap: 10px; margin: 0; position: static; }
.aisa-root .aisa-title { color: inherit; display: block; font: 650 15px/1.2 var(--aisa-font); letter-spacing: .01em; margin: 0; opacity: 1; visibility: visible; }
.aisa-root .aisa-presence { background: #75d39a; border: 2px solid color-mix(in srgb, var(--aisa-primary), white 12%); border-radius: 50%; display: block; flex: 0 0 10px; height: 10px; margin: 0; position: static; width: 10px; }
.aisa-root .aisa-close { align-items: center; background: transparent; border: 0; border-radius: 8px; box-shadow: none; color: inherit; cursor: pointer; display: flex !important; flex: 0 0 40px; height: 40px; justify-content: center; margin: 0; min-height: 40px; min-width: 40px; opacity: 1; padding: 0; position: static; transform: none; visibility: visible; width: 40px; }
.aisa-close svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; width: 22px; }
.aisa-close:hover { background: rgba(255, 255, 255, .12); }

.aisa-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 10px;
  scrollbar-color: var(--aisa-border) transparent;
}

.aisa-message { max-width: 88%; word-break: break-word; }
.aisa-message > .aisa-bubble {
  background: var(--aisa-soft);
  border: 1px solid var(--aisa-border);
  border-radius: 6px var(--aisa-radius) var(--aisa-radius) var(--aisa-radius);
  color: var(--aisa-text);
  display: inline-block;
  padding: 10px 12px;
}
.aisa-bubble p { margin: 0; }
.aisa-bubble p + p, .aisa-bubble p + ul, .aisa-bubble p + ol, .aisa-bubble ul + p, .aisa-bubble ol + p { margin-top: 9px; }
.aisa-bubble ul, .aisa-bubble ol { margin: 7px 0; padding-left: 20px; }
.aisa-bubble li { margin: 3px 0; }
.aisa-bubble strong { color: inherit; font-weight: 700; }
.aisa-message-user { align-self: flex-end; }
.aisa-message-user > .aisa-bubble { background: var(--aisa-primary); border-color: var(--aisa-primary); border-radius: var(--aisa-radius) 6px var(--aisa-radius) var(--aisa-radius); color: var(--aisa-primary-text); white-space: pre-wrap; }

.aisa-products {
  display: grid;
  gap: 9px;
  margin: 2px 0 5px;
  width: 100%;
}

.aisa-product {
  align-items: center;
  background: var(--aisa-surface);
  border: 1px solid var(--aisa-border);
  border-radius: var(--aisa-radius);
  display: grid;
  gap: 11px;
  grid-template-columns: 66px minmax(0, 1fr) 28px;
  padding: 8px;
  position: relative;
}
.aisa-product img { aspect-ratio: 1; background: var(--aisa-soft); border-radius: calc(var(--aisa-radius) - 5px); height: 66px; object-fit: contain; width: 66px; }
.aisa-product-info { min-width: 0; }
.aisa-product-name { color: var(--aisa-text); display: -webkit-box; font-weight: 650; line-height: 1.25; margin-bottom: 5px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.aisa-product-price { color: var(--aisa-primary); font-weight: 750; }
.aisa-product-stock { color: var(--aisa-muted); font-size: 12px; margin-left: 6px; }
.aisa-product a { align-items: center; color: var(--aisa-primary); display: flex; font-size: 22px; height: 32px; justify-content: center; text-decoration: none; width: 28px; }
.aisa-product a::after { content: '\2192'; }
.aisa-product a::before { content: ''; inset: 0; position: absolute; }
.aisa-product:hover { border-color: color-mix(in srgb, var(--aisa-primary), var(--aisa-border) 55%); }

.aisa-status { color: var(--aisa-muted); font-size: 12px; min-height: 20px; padding: 0 17px; }
.aisa-status.aisa-busy::after { animation: aisa-dots 1.2s infinite; content: '…'; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; }

.aisa-privacy { background: var(--aisa-soft); border-top: 1px solid var(--aisa-border); color: var(--aisa-muted); font-size: 10.5px; line-height: 1.35; padding: 7px 13px; }
.aisa-privacy a { color: var(--aisa-primary); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.aisa-privacy a:focus-visible { outline: 2px solid var(--aisa-primary); outline-offset: 2px; }

.aisa-composer { align-items: flex-end; border-top: 1px solid var(--aisa-border); display: flex; gap: 9px; padding: 11px; }
.aisa-composer textarea {
  background: var(--aisa-surface);
  border: 1px solid var(--aisa-border);
  border-radius: var(--aisa-radius);
  color: var(--aisa-text);
  flex: 1;
  font: 400 15px/1.4 var(--aisa-font);
  max-height: 110px;
  min-height: 44px;
  outline: 0;
  overflow-y: auto;
  padding: 10px 12px;
  resize: none;
}
.aisa-composer textarea:focus { border-color: var(--aisa-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aisa-primary), transparent 84%); }
.aisa-composer textarea::placeholder { color: var(--aisa-muted); opacity: .9; }
.aisa-composer button { align-items: center; background: var(--aisa-primary); border: 0; border-radius: 50%; box-shadow: none; color: var(--aisa-primary-text); cursor: pointer; display: flex; flex: 0 0 44px; height: 44px; justify-content: center; margin: 0; min-height: 44px; min-width: 44px; padding: 0; width: 44px; }
.aisa-composer button:disabled { cursor: wait; opacity: .5; }
.aisa-composer button svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 21px; }

.aisa-root.aisa-dark { --aisa-surface: #18201e; --aisa-text: #f4f7f6; --aisa-muted: #aab7b2; --aisa-border: #33403c; --aisa-soft: #222d29; }

@keyframes aisa-dots { 0% { width: 0; } 35% { width: .35em; } 70%, 100% { width: 1em; } }

@media (max-width: 540px) {
  .aisa-root, .aisa-root.aisa-left { bottom: 14px; left: 12px; right: 12px; }
  .aisa-launcher { left: auto; right: 0; }
  .aisa-left .aisa-launcher { left: 0; right: auto; }
  .aisa-teaser { max-width: min(280px, calc(100vw - 96px)); right: 72px; }
  .aisa-left .aisa-teaser { left: 72px; right: auto; }
  .aisa-panel, .aisa-left .aisa-panel { bottom: 0; height: min(720px, calc(100dvh - 24px)); left: 0; right: 0; transform-origin: bottom center; width: 100%; }
  .aisa-open .aisa-launcher { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aisa-panel, .aisa-launcher, .aisa-teaser { transition: none; }
  .aisa-status.aisa-busy::after { animation: none; width: 1em; }
}
