.vita-chat {
  --lime: #97d51b;
  --lime-soft: #eff9dc;
  --blue: #069fe7;
  --blue-dark: #087fba;
  --ink: #16231d;
  --navy: #15273b;
  --muted: #68736e;
  --line: #dfe7e3;
  --red: #a83932;
  position: fixed;
  z-index: 110;
  right: 1.2rem;
  bottom: 1.2rem;
  color: var(--ink);
  font: 400 1rem/1.4 "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.vita-chat,
.vita-chat * {
  box-sizing: border-box;
}

.vita-chat button,
.vita-chat input,
.vita-chat textarea {
  font-family: inherit;
}

.vita-chat button:focus-visible,
.vita-chat input:focus-visible,
.vita-chat textarea:focus-visible {
  outline: 3px solid rgba(6, 159, 231, .3);
  outline-offset: 2px;
}

.vita-chat svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.vita-chat-launcher {
  position: relative;
  display: flex;
  width: 56px;
  min-width: 56px;
  height: 56px;
  align-items: center;
  gap: .55rem;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(6, 159, 231, .22);
  border-radius: 999px;
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 159, 231, .16), 0 2px 8px rgba(50, 91, 58, .1);
  text-align: left;
  cursor: pointer;
  transform-origin: center;
  will-change: width, transform;
  transition: width .65s cubic-bezier(.22, 1, .36, 1), background .3s ease, box-shadow .3s ease, transform .65s cubic-bezier(.22, 1, .36, 1);
}

.vita-chat-launcher:hover,
.vita-chat-launcher:focus-visible,
.vita-chat.is-auto-peeking .vita-chat-launcher {
  width: 156px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(6, 159, 231, .2), 0 3px 10px rgba(50, 91, 58, .1);
  transform: translateY(-2px);
}

.vita-chat.is-open .vita-chat-launcher {
  width: 56px;
  transform: none;
}

.chat-launcher-mark,
.chat-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #b6eb4d 0%, var(--lime) 58%, var(--blue) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48);
}

.chat-launcher-mark svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.6;
}

.chat-launcher-mark circle {
  fill: currentColor;
  stroke: none;
}

.chat-launcher-label {
  display: block;
  flex: 0 0 86px;
  opacity: 0;
  white-space: nowrap;
  transform: translateX(10px);
  transition: opacity .35s ease .12s, transform .5s cubic-bezier(.22, 1, .36, 1) .08s;
}

.vita-chat-launcher:hover .chat-launcher-label,
.vita-chat-launcher:focus-visible .chat-launcher-label,
.vita-chat.is-auto-peeking .chat-launcher-label {
  opacity: 1;
  transform: translateX(0);
}

.vita-chat.is-open .chat-launcher-label {
  opacity: 0;
}

.vita-chat-launcher strong {
  display: block;
  color: var(--blue-dark);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.vita-chat-launcher > i {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(151, 213, 27, .15);
}

.vita-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .7rem);
  display: grid;
  grid-template-rows: auto auto minmax(150px, 1fr) auto auto auto;
  width: min(370px, calc(100vw - 1.5rem));
  height: min(580px, calc(100vh - 6rem));
  overflow: hidden;
  border: 1px solid rgba(18, 42, 52, .12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(16, 29, 48, .25), 0 8px 24px rgba(16, 29, 48, .12);
  transform-origin: bottom right;
  animation: vita-chat-in .2s ease-out;
}

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

.vita-chat-panel[hidden] {
  display: none;
}

.vita-chat-panel > header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem .9rem;
  color: #fff;
  background: linear-gradient(135deg, #182d43 0%, #123d4a 100%);
}

.vita-chat-panel > header::after {
  content: "";
  position: absolute;
  right: 3.8rem;
  bottom: 0;
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.vita-chat-panel > header > div {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.vita-chat-panel > header strong,
.vita-chat-panel > header small {
  display: block;
}

.vita-chat-panel > header strong {
  color: #fff;
  font-size: .88rem;
  letter-spacing: -.01em;
}

.vita-chat-panel > header small {
  margin-top: .08rem;
  color: #cbd8dd;
  font-size: .7rem;
  line-height: 1.3;
}

.vita-chat-panel > header button {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #dce7ea;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.vita-chat-panel > header button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  transform: rotate(4deg);
}

.vita-chat-panel > header button svg {
  width: 18px;
  height: 18px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.chat-avatar svg {
  width: 19px;
  height: 19px;
}

.chat-avatar circle {
  fill: currentColor;
  stroke: none;
}

.chat-product-context {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border-bottom: 1px solid #dce8d0;
  background: linear-gradient(90deg, #f3fae8, #f9fcf4);
}

.chat-product-context[hidden] {
  display: none;
}

.chat-product-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #32613b;
  background: #e1f3c2;
}

.chat-product-icon svg {
  width: 17px;
  height: 17px;
}

.chat-product-copy,
.chat-product-copy > span,
.chat-product-copy strong,
.chat-product-copy small {
  display: block;
  min-width: 0;
}

.chat-product-copy > span {
  color: #58703d;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chat-product-copy strong {
  margin-top: .08rem;
  overflow: hidden;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-product-copy small {
  margin-top: .05rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vita-chat-messages {
  display: grid;
  align-content: start;
  gap: .6rem;
  padding: .8rem;
  overflow-y: auto;
  background: linear-gradient(180deg, #f5f8f7, #f8faf9);
  scrollbar-color: #c5d0cb transparent;
  scrollbar-width: thin;
}

.vita-chat-message {
  max-width: 88%;
  padding: .62rem .72rem;
  border: 1px solid rgba(22, 35, 29, .06);
  border-radius: 5px 14px 14px 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 35, 59, .055);
}

.vita-chat-message.from-visitor {
  justify-self: end;
  border: 0;
  border-radius: 14px 5px 14px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), #0676a8);
}

.vita-chat-message.from-agent {
  border-left: 3px solid var(--lime);
}

.vita-chat-message header {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  font-size: .66rem;
  opacity: .72;
}

.vita-chat-message p {
  margin: .3rem 0 0;
  white-space: pre-wrap;
  font-size: .82rem;
  line-height: 1.48;
}

.vita-chat-message > small {
  display: block;
  margin-top: .32rem;
  color: #58703d;
  font-size: .67rem;
  line-height: 1.35;
}

.vita-chat-error {
  padding: 0 .8rem;
  color: var(--red);
  background: #fff;
  font-size: .72rem;
}

.vita-chat-error:empty {
  display: none;
}

.vita-chat-controls {
  max-height: 240px;
  padding: .75rem .8rem;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.chat-choice-list button {
  position: relative;
  min-height: 42px;
  padding: .55rem 1.55rem .55rem .65rem;
  border: 1px solid #d7e0dc;
  border-radius: 11px;
  color: #26313a;
  background: #fff;
  font-size: .74rem;
  font-weight: 720;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.chat-choice-list button::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: .62rem;
  color: var(--blue-dark);
  font-size: 1.1rem;
  line-height: 1;
  transform: translateY(-52%);
}

.chat-choice-list button:hover {
  border-color: var(--blue);
  color: #075f8b;
  background: #eff9fd;
  transform: translateY(-1px);
}

.chat-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .48rem;
}

.chat-contact-form label,
.chat-info-form label {
  display: block;
  color: #34413b;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
}

.chat-contact-form input,
.chat-contact-form textarea,
.chat-info-form textarea,
.chat-composer textarea {
  width: 100%;
  margin-top: .22rem;
  padding: .58rem .62rem;
  border: 1px solid #cbd5d0;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: .82rem;
  line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.chat-contact-form input:focus,
.chat-contact-form textarea:focus,
.chat-info-form textarea:focus,
.chat-composer textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(6, 159, 231, .1);
}

.chat-contact-form > label {
  margin-top: .5rem;
}

.chat-contact-form .chat-captcha {
  padding: .55rem;
  border-radius: 10px;
  background: var(--lime-soft);
}

.chat-contact-form .chat-consent {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
}

.chat-consent input {
  width: auto;
  flex: 0 0 auto;
  margin: .1rem 0 0;
}

.vita-chat .button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: .62rem .85rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 5px 14px rgba(6, 159, 231, .18);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.vita-chat .button-wide {
  width: 100%;
}

.chat-contact-form .button {
  width: 100%;
  margin-top: .55rem;
}

.chat-contact-form > small,
.chat-control-note {
  display: block;
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.chat-contact-form > small {
  text-align: center;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .42rem;
}

.chat-composer textarea {
  min-height: 48px;
  margin: 0;
  resize: vertical;
}

.chat-composer button {
  min-height: 40px;
  padding: .6rem .78rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 5px 14px rgba(6, 159, 231, .18);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-composer button::after {
  content: " →";
}

.vita-chat-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-height: 42px;
  padding: .48rem .8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfc;
}

.vita-chat-panel > footer button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem 0;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.vita-chat-panel > footer button svg {
  width: 15px;
  height: 15px;
}

.vita-chat-panel > footer small {
  font-size: .66rem;
  line-height: 1.3;
  text-align: right;
}

.vita-chat .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.vita-chat.is-busy .vita-chat-controls {
  opacity: .64;
}

.vita-chat.has-new-reply .vita-chat-launcher {
  animation: vita-chat-pulse .5s ease-in-out 2;
}

.vita-chat.is-attention-pulse .vita-chat-launcher {
  animation: vita-chat-attention .85s cubic-bezier(.2, .75, .3, 1);
}

@keyframes vita-chat-pulse {
  50% { box-shadow: 0 0 0 7px rgba(151, 213, 27, .24), 0 12px 34px rgba(16, 29, 48, .28); }
}

@keyframes vita-chat-attention {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.15); }
  72% { transform: scale(.985); }
}

@media (max-width: 600px) {
  .vita-chat {
    right: .65rem;
    bottom: .65rem;
  }

  .vita-chat-launcher:hover,
  .vita-chat-launcher:focus-visible {
    width: 56px;
    transform: none;
  }

  .vita-chat-launcher:hover .chat-launcher-label,
  .vita-chat-launcher:focus-visible .chat-launcher-label {
    opacity: 0;
  }

  .vita-chat-panel {
    position: fixed;
    right: .65rem;
    bottom: calc(.65rem + 56px + .7rem);
    left: .65rem;
    width: auto;
    height: min(570px, calc(100dvh - 5rem));
    border-radius: 17px;
  }

  .chat-form-grid {
    grid-template-columns: 1fr;
  }

  .chat-contact-form input,
  .chat-contact-form textarea,
  .chat-info-form textarea,
  .chat-composer textarea {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vita-chat *,
  .vita-chat *::before,
  .vita-chat *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .vita-chat .vita-chat-launcher {
    transition-property: width, background, box-shadow, transform !important;
    transition-duration: .65s, .3s, .3s, .65s !important;
    transition-timing-function: cubic-bezier(.22, 1, .36, 1), ease, ease, cubic-bezier(.22, 1, .36, 1) !important;
  }

  .vita-chat .chat-launcher-label {
    transition-property: opacity, transform !important;
    transition-duration: .35s, .5s !important;
  }

  .vita-chat.is-attention-pulse .vita-chat-launcher {
    animation-duration: .85s !important;
  }
}
