.sta-advisor,
.sta-advisor * {
  box-sizing: border-box;
}

.sta-advisor {
  --sta-accent: #5a2d82;
  --sta-ink: #20242b;
  --sta-soft: #f4f1f8;
  --sta-line: #e3dfea;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  color: var(--sta-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.sta-advisor .sta-launcher {
  position: relative;
  display: block;
  width: 128px !important;
  height: 136px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  background: transparent !important;
  color: #fff;
  box-shadow: none !important;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.sta-advisor .sta-launcher:hover,
.sta-advisor .sta-launcher:focus {
  background: transparent !important;
  box-shadow: none !important;
}

.sta-launcher:focus-visible,
.sta-hide-widget:focus-visible,
.sta-restore:focus-visible,
.sta-panel button:focus-visible,
.sta-panel input:focus-visible,
.sta-panel textarea:focus-visible,
.sta-panel a:focus-visible {
  outline: 3px solid #f4c84b;
  outline-offset: 2px;
}

.sta-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 15%, #f5ecfb 100%);
  color: var(--sta-accent);
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(90, 45, 130, .08);
}

.sta-launcher-image {
  display: block;
  width: 120px;
  max-width: none;
  height: auto;
  margin-left: auto;
  filter: drop-shadow(0 14px 17px rgba(27, 18, 37, .34));
  transform-origin: 50% 60%;
  animation: sta-float 3.4s ease-in-out infinite;
  transition: filter .2s ease;
}

.sta-launcher:hover .sta-launcher-image {
  filter: drop-shadow(0 18px 22px rgba(27, 18, 37, .42));
}

.sta-launcher-label {
  position: absolute;
  right: 96px;
  bottom: 20px;
  width: max-content;
  padding: 9px 14px;
  border-radius: 999px 999px 7px 999px;
  background: linear-gradient(135deg, var(--sta-accent), #ef6b27);
  box-shadow: 0 10px 25px rgba(42, 24, 55, .24);
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.sta-hide-launcher {
  position: absolute;
  right: 17px;
  bottom: -5px;
  min-width: 94px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(36, 42, 58, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(36, 42, 58, .16);
  color: #242a3a;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.sta-restore {
  min-width: 112px;
  min-height: 44px;
  padding: 10px 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sta-accent), #ef6023);
  box-shadow: 0 10px 25px rgba(42, 24, 55, .24);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

@keyframes sta-float {
  0%, 100% { transform: translateY(0) rotate(-.7deg); }
  50% { transform: translateY(-8px) rotate(.7deg); }
}

.sta-panel {
  position: absolute;
  right: 0;
  bottom: 145px;
  display: flex;
  flex-direction: column;
  width: min(408px, calc(100vw - 28px));
  height: min(690px, calc(100vh - 118px));
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(53, 32, 69, .13);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 75px rgba(25, 16, 31, .25);
  transform-origin: bottom right;
  animation: sta-open .2s ease-out;
}

@keyframes sta-open {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sta-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 15px 14px;
  background: var(--sta-accent);
  color: #fff;
}

.sta-avatar {
  width: 42px;
  height: 42px;
  overflow: hidden;
}

.sta-avatar-image {
  display: block;
  width: 72px;
  max-width: none;
  height: auto;
  transform: translateY(1px);
}

.sta-header-copy {
  min-width: 0;
  flex: 1;
}

.sta-header strong,
.sta-header span {
  display: block;
}

.sta-header strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-header span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
}

.sta-header span i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #65e093;
}

.sta-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .11);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 27px;
  line-height: 1;
}

.sta-close:hover {
  background: rgba(255, 255, 255, .2);
}

.sta-hide-header {
  min-width: 48px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.sta-hide-header:hover {
  background: rgba(255, 255, 255, .14);
}

.sta-advisor.is-hidden {
  right: 12px;
  bottom: 12px;
}

.sta-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: auto;
  background: linear-gradient(180deg, #fff 0, #fff 62%, #faf9fb 100%);
}

.sta-intro {
  padding: 24px 24px 8px;
}

.sta-kicker {
  margin: 0 0 7px;
  color: var(--sta-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sta-intro h2 {
  margin: 0;
  color: var(--sta-ink);
  font-size: 25px;
  line-height: 1.16;
}

.sta-intro > p:last-child {
  margin: 10px 0 0;
  color: #5e6269;
  font-size: 14px;
}

.sta-lead-form {
  padding: 12px 24px 24px;
}

.sta-lead-form > label:not(.sta-consent),
.sta-message-form label {
  display: block;
  margin: 11px 0 5px;
  color: #353941;
  font-size: 13px;
  font-weight: 750;
}

.sta-lead-form input[type="text"],
.sta-lead-form input[type="email"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfcbd5;
  border-radius: 10px;
  background: #fff;
  color: var(--sta-ink);
  font: inherit;
}

.sta-lead-form input:focus,
.sta-message-form textarea:focus {
  border-color: var(--sta-accent);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sta-accent) 13%, transparent);
}

.sta-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 15px 0 13px;
  color: #565b63;
  font-size: 12px;
  line-height: 1.4;
}

.sta-consent input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--sta-accent);
}

.sta-consent a,
.sta-sources a {
  color: var(--sta-accent);
  font-weight: 700;
}

.sta-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.sta-primary {
  width: 100%;
  min-height: 47px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--sta-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.sta-primary:hover {
  filter: brightness(.93);
}

.sta-primary:disabled,
.sta-message-form button:disabled {
  cursor: wait;
  opacity: .62;
}

.sta-form-error {
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff0f0;
  color: #9e2222;
  font-size: 12px;
}

.sta-chat {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.sta-messages {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 10px;
  scroll-behavior: smooth;
}

.sta-message {
  display: flex;
  margin: 0 0 14px;
  flex-direction: column;
  align-items: flex-start;
}

.sta-message-user {
  align-items: flex-end;
}

.sta-message-label {
  margin: 0 5px 4px;
  color: #777b82;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .025em;
}

.sta-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 7px 16px 16px 16px;
  background: #f0edf4;
  color: #292d34;
  font-size: 14px;
  line-height: 1.5;
}

.sta-message-user .sta-bubble {
  border-radius: 16px 7px 16px 16px;
  background: var(--sta-accent);
  color: #fff;
}

.sta-bubble p {
  margin: 0 0 8px;
}

.sta-bubble p:last-child {
  margin-bottom: 0;
}

.sta-sources {
  display: flex;
  max-width: 92%;
  margin-top: 7px;
  padding-left: 4px;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
}

.sta-sources > span {
  width: 100%;
  color: #6c7077;
}

.sta-sources a {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  padding: 4px 8px;
  border: 1px solid var(--sta-line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-typing {
  display: flex;
  min-width: 58px;
  align-items: center;
  gap: 4px;
}

.sta-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8d8794;
  animation: sta-bounce 1.1s infinite ease-in-out;
}

.sta-typing i:nth-child(2) { animation-delay: .13s; }
.sta-typing i:nth-child(3) { animation-delay: .26s; }

@keyframes sta-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.sta-suggestions {
  display: flex;
  padding: 0 14px 9px;
  overflow-x: auto;
  gap: 7px;
}

.sta-suggestions button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--sta-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sta-accent);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.sta-message-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 11px 12px 10px;
  border-top: 1px solid var(--sta-line);
  background: #fff;
}

.sta-message-form textarea {
  width: 100%;
  min-height: 43px;
  max-height: 120px;
  flex: 1;
  resize: none;
  padding: 10px 11px;
  border: 1px solid #cbc7d0;
  border-radius: 12px;
  color: var(--sta-ink);
  font: inherit;
  line-height: 1.35;
}

.sta-message-form button {
  min-width: 60px;
  min-height: 43px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--sta-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.sta-disclaimer {
  margin: 0;
  padding: 0 14px 10px;
  background: #fff;
  color: #777b82;
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
}

.sta-advisor [hidden] {
  display: none !important;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 560px) {
  .sta-advisor {
    right: 12px;
    bottom: 12px;
  }

  .sta-panel {
    position: fixed;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: min(760px, calc(100dvh - 16px));
    min-height: 0;
    border-radius: 18px;
  }

  .sta-advisor.is-open .sta-launcher {
    visibility: hidden;
  }

  .sta-launcher {
    width: 108px;
    height: 115px;
  }

  .sta-launcher-image {
    width: 100px;
  }

  .sta-launcher-label {
    right: 80px;
    bottom: 16px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .sta-intro {
    padding-top: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sta-panel,
  .sta-launcher,
  .sta-launcher-image,
  .sta-typing i {
    animation: none !important;
    transition: none !important;
  }
}
