.aisa-chat {
  --aisa-primary: #402950;
  --aisa-accent: #6750a4;
  --aisa-dark: #242D44;
  --aisa-surface: #ffffff;
  --aisa-text: #242D44;
  --aisa-radius: 24px;
  --aisa-width: 390px;
  --aisa-embedded-height: 620px;
  --aisa-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--aisa-text);
  font-family: var(--aisa-font);
  letter-spacing: 0;
  z-index: 9999;
}

.aisa-chat * {
  box-sizing: border-box;
}

.aisa-chat--floating {
  bottom: 24px;
  position: fixed;
}

.aisa-chat--right {
  right: 24px;
}

.aisa-chat--left {
  left: 24px;
}

.aisa-chat--embedded {
  display: block;
  margin: 24px auto;
  max-width: min(100%, var(--aisa-width));
  position: relative;
  width: 100%;
}

.aisa-chat--compact {
  display: block;
  margin: 24px auto;
  max-width: 100%;
  position: relative;
  width: 100%;
}

.aisa-chat--compact .aisa-chat__panel {
  margin-top: 16px;
  min-height: var(--aisa-embedded-height);
  position: relative;
  width: min(var(--aisa-width), 100%);
}

.aisa-chat__compact {
  background: var(--aisa-surface);
  border: 1px solid rgba(36, 45, 68, 0.06);
  border-radius: 0;
  box-shadow: 0 16px 34px rgba(36, 45, 68, 0.08);
  color: var(--aisa-text);
  display: block;
  min-height: 126px;
  padding: 22px 64px 18px 16px;
  position: relative;
  width: 100%;
}

.aisa-chat__compact-copy {
  display: block;
  margin: 0 0 28px;
}

.aisa-chat__compact-copy strong {
  color: var(--aisa-text);
  display: block;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.aisa-chat__compact-copy span {
  color: var(--aisa-accent);
  color: color-mix(in srgb, var(--aisa-accent) 72%, #ffffff);
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.aisa-chat__compact-open {
  align-items: center;
  background: var(--aisa-accent);
  border: 0;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 30px;
  inset-inline-end: 15px;
  inset-inline-start: auto;
  justify-content: center;
  left: auto;
  padding: 0;
  position: absolute;
  right: 15px;
  top: 18px;
  width: 30px;
}

.aisa-chat__compact-form {
  align-items: center;
  display: inline-flex;
  margin: 0 8px 0 0;
  max-width: 240px;
  vertical-align: top;
}

.aisa-chat__compact-form label {
  align-items: center;
  background: rgba(64, 41, 80, 0.04);
  background: color-mix(in srgb, var(--aisa-accent) 10%, #ffffff);
  border: 1px solid rgba(64, 41, 80, 0.08);
  border-color: color-mix(in srgb, var(--aisa-accent) 18%, #ffffff);
  border-radius: 999px;
  color: var(--aisa-text);
  display: inline-flex;
  gap: 7px;
  min-height: 25px;
  padding: 0 9px;
  width: 100%;
}

.aisa-chat__compact-form label span {
  color: var(--aisa-accent);
  font-size: 13px;
}

.aisa-chat__compact-form input {
  background: transparent;
  border: 0;
  color: var(--aisa-text);
  font-size: 12px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.aisa-chat__compact-prompts {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  vertical-align: top;
}

.aisa-chat__compact-prompts button {
  align-items: center;
  background: rgba(64, 41, 80, 0.04);
  background: color-mix(in srgb, var(--aisa-accent) 10%, #ffffff);
  border: 1px solid rgba(64, 41, 80, 0.08);
  border-color: color-mix(in srgb, var(--aisa-accent) 18%, #ffffff);
  border-radius: 999px;
  color: var(--aisa-text);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  min-height: 25px;
  padding: 0 10px;
}

.aisa-chat__compact-prompts button span:first-child {
  color: var(--aisa-accent);
  font-size: 12px;
}

.aisa-chat__toggle {
  align-items: center;
  background: var(--aisa-accent);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(36, 45, 68, 0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  padding: 0 16px 0 12px;
  text-transform: uppercase;
}

.aisa-chat__toggle:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.aisa-chat__toggle-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.aisa-chat__icon,
.aisa-mdi {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.aisa-mdi {
  color: inherit;
  display: block;
  fill: currentColor !important;
  height: 1.5em;
  width: 1.5em;
}

.aisa-mdi path {
  fill: currentColor !important;
}

.aisa-chat__panel {
  background: var(--aisa-surface);
  border: 1px solid rgba(36, 45, 68, 0.08);
  border-radius: var(--aisa-radius);
  box-shadow: 0 24px 70px rgba(36, 45, 68, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(var(--aisa-width), calc(100vw - 32px));
}

.aisa-chat--floating .aisa-chat__panel {
  bottom: 66px;
  max-height: min(720px, calc(100vh - 120px));
  min-height: min(640px, calc(100vh - 120px));
  position: absolute;
}

.aisa-chat--right .aisa-chat__panel {
  right: 0;
}

.aisa-chat--left .aisa-chat__panel {
  left: 0;
}

.aisa-chat--embedded .aisa-chat__panel {
  min-height: var(--aisa-embedded-height);
  position: relative;
  width: 100%;
}

.aisa-chat__topbar {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 18px 8px;
}

.aisa-chat__logo {
  align-items: center;
  color: var(--aisa-text);
  display: inline-flex;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.aisa-chat__logo-mark {
  align-items: center;
  background: linear-gradient(145deg, #9a82db, var(--aisa-accent));
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(103, 80, 164, 0.24);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 5px;
  width: 42px;
}

.aisa-chat__logo-mark img {
  display: block;
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.aisa-chat__logo-mark .aisa-mdi {
  color: #fff;
  font-size: 27px;
}

.aisa-chat__logo strong,
.aisa-chat__logo small {
  display: block;
}

.aisa-chat__logo strong {
  color: var(--aisa-accent);
  font-size: 17px;
  line-height: 1.1;
}

.aisa-chat__logo small {
  color: #8b8491;
  font-size: 11px;
  line-height: 1.35;
}

.aisa-chat__reset,
.aisa-chat__close {
  align-items: center;
  background: var(--aisa-accent);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 78px;
}

.aisa-chat__reset {
  margin-left: auto;
}

.aisa-chat__reset span::before {
  content: none;
}

.aisa-chat__close {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.aisa-chat__intro {
  padding: 20px 20px 10px;
  text-align: center;
}

.aisa-chat__intro h2 {
  color: var(--aisa-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.18;
  margin: 8px auto 22px;
  max-width: 310px;
}

.aisa-chat__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.aisa-chat__quick button {
  background: var(--aisa-accent);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  min-height: 47px;
  min-width: 120px;
  padding: 0 18px;
  text-transform: uppercase;
}

.aisa-chat__messages {
  background: #fff;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 230px;
  overflow-y: auto;
  padding: 14px 16px;
}

.aisa-chat__message {
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.48;
  max-width: 88%;
  padding: 11px 13px;
}

.aisa-chat__message--bot {
  align-self: flex-start;
  background: #f8f6fb;
  border: 1px solid #eeeaf3;
  color: var(--aisa-text);
}

.aisa-chat__message--user {
  align-self: flex-end;
  background: var(--aisa-accent);
  color: #fff;
}

.aisa-chat__lead {
  background: #fff;
  border: 1px solid #eeeaf3;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(36, 45, 68, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 14px 12px;
  max-height: min(430px, calc(100vh - 250px));
  overflow-y: auto;
  padding: 16px;
}

.aisa-chat__lead-head {
  align-items: center;
  color: var(--aisa-dark);
  display: flex;
  gap: 10px;
  min-height: 34px;
}

.aisa-chat__lead-head span {
  align-items: center;
  background: rgba(103, 80, 164, 0.12);
  border-radius: 999px;
  color: var(--aisa-accent);
  display: flex;
  flex: 0 0 30px;
  font-size: 18px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.aisa-chat__lead-head span::before {
  content: none;
}

.aisa-chat__lead-head span::after {
  content: none;
}

.aisa-chat__lead-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.aisa-chat__lead p {
  color: #6f6b76;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.aisa-chat__lead input {
  background: #fff;
  border: 1px solid #e5dfeb;
  border-radius: 0;
  color: var(--aisa-text);
  font-size: 14px;
  min-height: 42px;
  outline: none;
  padding: 10px 12px;
}

.aisa-chat__lead input:focus,
.aisa-chat__form input:focus {
  border-color: var(--aisa-accent);
  box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.12);
}

.aisa-chat__lead button {
  background: var(--aisa-accent);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
}

.aisa-chat__consent {
  align-items: flex-start;
  color: #6f6b76;
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.aisa-chat__consent input {
  flex: 0 0 auto;
  margin-top: 2px;
  min-height: auto;
  padding: 0;
}

.aisa-chat__form {
  align-items: center;
  background: #fff;
  display: grid;
  gap: 8px;
  grid-template-columns: 46px 34px minmax(0, 1fr) 58px;
  padding: 12px 14px 16px;
}

.aisa-chat__form input {
  background: #f6f4f8;
  border: 1px solid #f0edf4;
  border-radius: 4px;
  color: var(--aisa-text);
  font-size: 14px;
  height: 46px;
  min-width: 0;
  outline: none;
  padding: 0 16px;
}

.aisa-chat__lead-toggle,
.aisa-chat__mic,
.aisa-chat__send {
  align-items: center;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.aisa-chat__lead-toggle {
  background: var(--aisa-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  height: 43px;
  width: 46px;
}

.aisa-chat__lead-toggle::before {
  content: none;
}

.aisa-chat__lead-toggle::after {
  content: none;
}

.aisa-chat__mic {
  background: transparent;
  color: var(--aisa-accent);
  font-size: 25px;
  height: 34px;
  padding-right: 10px;
  width: 34px;
}

.aisa-chat__mic::before {
  content: none;
}

.aisa-chat__mic::after {
  content: none;
}

.aisa-chat__mic.is-listening {
  color: var(--aisa-accent);
}

.aisa-chat__send {
  background: var(--aisa-accent);
  box-shadow: 0 8px 18px rgba(103, 80, 164, 0.24);
  color: #fff;
  font-size: 24px;
  height: 46px;
  width: 58px;
}

.aisa-chat__send::before {
  content: none;
}

.aisa-chat__footer {
  background: #fff;
  border-top: 1px solid #f1eef5;
  padding: 8px 14px 12px;
  text-align: center;
}

.aisa-chat__footer a {
  align-items: center;
  color: #8b8491;
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
  justify-content: center;
  text-decoration: none;
}

.aisa-chat__footer img {
  display: block;
  max-height: 14px;
  max-width: 74px;
}

[data-aisa-hp],
[data-aisa-chat-hp] {
  height: 1px !important;
  left: -9999px !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 1px !important;
}

@media (max-width: 520px) {
  .aisa-chat--floating {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .aisa-chat--floating .aisa-chat__panel {
    bottom: 64px;
    left: 0;
    max-height: calc(100vh - 88px);
    min-height: min(620px, calc(100vh - 88px));
    right: 0;
    width: 100%;
  }

  .aisa-chat__toggle {
    margin-left: auto;
  }

  .aisa-chat__intro h2 {
    font-size: 25px;
  }

  .aisa-chat__form {
    grid-template-columns: 46px 34px minmax(0, 1fr) 58px;
    padding-inline: 12px;
  }

  .aisa-chat__compact {
    min-height: 0;
    padding: 18px 52px 16px 14px;
  }

  .aisa-chat__compact-copy strong {
    font-size: 17px;
  }

  .aisa-chat__compact-copy span {
    font-size: 15px;
  }

  .aisa-chat__compact-form {
    display: flex;
    max-width: none;
    width: 100%;
    margin: 12px 0 8px;
  }

  .aisa-chat__compact-form label {
    width: 100%;
  }

  .aisa-chat__compact-prompts {
    display: flex;
  }
}

/* Shield the widget from aggressive theme and builder CSS. */
.aisa-chat.aisa-chat {
  color: var(--aisa-text) !important;
  font-family: var(--aisa-font) !important;
  letter-spacing: 0 !important;
  line-height: normal !important;
  text-align: initial !important;
  z-index: 2147483000 !important;
}

.aisa-chat.aisa-chat,
.aisa-chat.aisa-chat *,
.aisa-chat.aisa-chat *::before,
.aisa-chat.aisa-chat *::after {
  box-sizing: border-box !important;
}

.aisa-chat.aisa-chat a,
.aisa-chat.aisa-chat button,
.aisa-chat.aisa-chat input,
.aisa-chat.aisa-chat textarea,
.aisa-chat.aisa-chat select,
.aisa-chat.aisa-chat h2,
.aisa-chat.aisa-chat p,
.aisa-chat.aisa-chat span,
.aisa-chat.aisa-chat strong,
.aisa-chat.aisa-chat small {
  font-family: var(--aisa-font) !important;
  letter-spacing: 0 !important;
  line-height: normal !important;
  text-decoration: none !important;
}

.aisa-chat.aisa-chat button {
  appearance: none !important;
  cursor: pointer !important;
  min-width: 0 !important;
}

.aisa-chat.aisa-chat input,
.aisa-chat.aisa-chat textarea {
  max-width: none !important;
}

.aisa-chat.aisa-chat .aisa-chat__toggle {
  align-items: center !important;
  background: var(--aisa-accent) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  display: flex !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  height: 48px !important;
  justify-content: center !important;
  padding: 0 16px 0 12px !important;
  text-transform: uppercase !important;
}

.aisa-chat.aisa-chat .aisa-chat__panel {
  background: var(--aisa-surface) !important;
  border: 1px solid rgba(36, 45, 68, 0.08) !important;
  border-radius: var(--aisa-radius) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact {
  background: var(--aisa-surface) !important;
  border: 1px solid rgba(36, 45, 68, 0.06) !important;
  color: var(--aisa-text) !important;
  display: block !important;
  position: relative !important;
}

.aisa-chat.aisa-chat .aisa-chat__topbar,
.aisa-chat.aisa-chat .aisa-chat__form,
.aisa-chat.aisa-chat .aisa-chat__footer {
  background: #fff !important;
}

.aisa-chat.aisa-chat .aisa-chat__intro h2 {
  color: var(--aisa-text) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  margin: 8px auto 22px !important;
}

.aisa-chat.aisa-chat .aisa-chat__quick button,
.aisa-chat.aisa-chat .aisa-chat__compact-open,
.aisa-chat.aisa-chat .aisa-chat__reset,
.aisa-chat.aisa-chat .aisa-chat__close,
.aisa-chat.aisa-chat .aisa-chat__lead-toggle,
.aisa-chat.aisa-chat .aisa-chat__send,
.aisa-chat.aisa-chat .aisa-chat__lead button {
  background: var(--aisa-accent) !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: #fff !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact-form label,
.aisa-chat.aisa-chat .aisa-chat__compact-prompts button {
  align-items: center !important;
  background: rgba(64, 41, 80, 0.04) !important;
  background: color-mix(in srgb, var(--aisa-accent) 10%, #ffffff) !important;
  border: 1px solid rgba(64, 41, 80, 0.08) !important;
  border-color: color-mix(in srgb, var(--aisa-accent) 18%, #ffffff) !important;
  border-radius: 999px !important;
  color: var(--aisa-text) !important;
  display: inline-flex !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact-form input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--aisa-text) !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact-copy strong {
  color: var(--aisa-text) !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact-copy span {
  color: var(--aisa-accent) !important;
  color: color-mix(in srgb, var(--aisa-accent) 72%, #ffffff) !important;
}

.aisa-chat.aisa-chat .aisa-chat__compact-open {
  border-radius: 999px !important;
  display: inline-flex !important;
  height: 30px !important;
  inset-inline-end: 15px !important;
  inset-inline-start: auto !important;
  left: auto !important;
  padding: 0 !important;
  position: absolute !important;
  right: 15px !important;
  top: 18px !important;
  width: 30px !important;
}

.aisa-chat.aisa-chat .aisa-chat__quick button {
  align-items: center !important;
  display: inline-flex !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  justify-content: center !important;
  min-height: 47px !important;
  min-width: 120px !important;
  padding: 0 18px !important;
  text-transform: uppercase !important;
}

.aisa-chat.aisa-chat .aisa-chat__form input,
.aisa-chat.aisa-chat .aisa-chat__lead input {
  border: 1px solid #e5dfeb !important;
  color: var(--aisa-text) !important;
  font-size: 14px !important;
  outline: none !important;
}

.aisa-chat.aisa-chat .aisa-chat__form input {
  background: #f6f4f8 !important;
  border-radius: 4px !important;
  height: 46px !important;
  padding: 0 16px !important;
}

.aisa-chat.aisa-chat [hidden] {
  display: none !important;
}

.aisa-chat.aisa-chat .aisa-chat__message a {
  color: var(--aisa-accent) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.aisa-chat.aisa-chat .aisa-chat__lead-head span,
.aisa-chat.aisa-chat .aisa-chat__lead-toggle {
  position: relative !important;
}

.aisa-chat.aisa-chat .aisa-chat__lead-toggle,
.aisa-chat.aisa-chat .aisa-chat__mic {
  color: var(--aisa-accent) !important;
}

.aisa-chat.aisa-chat .aisa-chat__lead-toggle {
  background: var(--aisa-accent) !important;
  color: #fff !important;
}

.aisa-chat.aisa-chat .aisa-chat__mic {
  background: transparent !important;
  border-radius: 999px !important;
}

.aisa-chat.aisa-chat.is-lead-open .aisa-chat__lead {
  flex: 1 1 auto !important;
  margin: 14px !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 18px !important;
}

.aisa-chat.aisa-chat.is-lead-open .aisa-chat__lead input {
  min-height: 0px !important;
}

.aisa-chat.aisa-chat.is-lead-open .aisa-chat__lead p {
  font-size: 13px !important;
  line-height: 1.5 !important;
}
