.inv360-lena {
  --inv360-lena-accent: #e23d28;
  --inv360-lena-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  z-index: 99985;
  right: 18px;
  bottom: 18px;
  left: auto;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.inv360-lena--left {
  right: auto;
  left: 18px;
}

.inv360-lena--right.inv360-lena--beside-wa {
  bottom: 92px;
}

.inv360-lena-bubble {
  position: relative;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--inv360-lena-accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transform-origin: 80% 100%;
  animation: inv360-lena-in 0.42s var(--inv360-lena-ease) both;
}

.inv360-lena--left .inv360-lena-bubble {
  transform-origin: 20% 100%;
}

.inv360-lena-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.2);
  animation: inv360-lena-ring 2.6s ease-out infinite;
  pointer-events: none;
}

.inv360-lena.is-open .inv360-lena-bubble,
.inv360-lena.is-open .inv360-lena-bubble::before {
  animation: none;
}

.inv360-lena-bubble:hover {
  filter: brightness(1.06);
}

.inv360-lena-bubble:active {
  transform: scale(0.96);
}

.inv360-lena-bubble:focus-visible {
  outline: 3px solid #111827;
  outline-offset: 3px;
}

.inv360-lena-bubble svg {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}

.inv360-lena-bubble-label {
  display: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.inv360-lena-bubble--pill,
.inv360-lena-bubble--pill-text {
  width: auto;
  min-height: 52px;
  height: 52px;
  padding: 0 18px 0 16px;
  border-radius: 999px;
  gap: 10px;
}

.inv360-lena-bubble--pill-text {
  padding: 0 22px;
}

.inv360-lena-bubble--pill svg {
  width: 22px;
  height: 22px;
}

.inv360-lena-bubble--pill .inv360-lena-bubble-label,
.inv360-lena-bubble--pill-text .inv360-lena-bubble-label {
  display: inline;
}

.inv360-lena-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 14px, 0) scale(0.96);
  transform-origin: 92% 100%;
  transition:
    opacity 0.22s var(--inv360-lena-ease),
    transform 0.22s var(--inv360-lena-ease);
}

.inv360-lena--left .inv360-lena-panel {
  right: auto;
  left: 0;
  transform-origin: 8% 100%;
}

.inv360-lena.is-open .inv360-lena-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.inv360-lena-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 12px 12px 12px 14px;
  background: #fff;
  border-bottom: 1px solid #eef1f4;
}

.inv360-lena-avatar,
.inv360-lena-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--inv360-lena-accent);
  color: #fff;
}

.inv360-lena-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv360-lena-avatar-fallback svg {
  width: 18px;
  height: 18px;
}

.inv360-lena-meta {
  min-width: 0;
  flex: 1;
}

.inv360-lena-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv360-lena-status {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.inv360-lena.is-busy .inv360-lena-status::after {
  content: "";
}

.inv360-lena-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.inv360-lena-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.inv360-lena-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 16px;
  background: #f6f7f9;
  scroll-behavior: smooth;
}

.inv360-lena-msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv360-lena-msg {
  max-width: 86%;
  padding: 10px 12px 8px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  animation: inv360-lena-msg 0.22s var(--inv360-lena-ease) both;
}

.inv360-lena-copy {
  white-space: pre-wrap;
}

.inv360-lena-msg a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inv360-lena-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.inv360-lena-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
  color: inherit;
  text-decoration: none !important;
  min-height: 66px;
}

.inv360-lena-card:hover {
  background: #eceff3;
}

.inv360-lena-card img,
.inv360-lena-card-ph {
  width: 88px;
  height: 66px;
  flex-shrink: 0;
  object-fit: cover;
  background: #e5e7eb;
}

.inv360-lena-card-ph {
  display: block;
}

.inv360-lena-card-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 10px;
}

.inv360-lena-card-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.inv360-lena-card-price {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 650;
  color: var(--inv360-lena-accent);
}

.inv360-lena-msg--bot {
  align-self: flex-start;
  background: #fff;
  color: #111827;
  border-top-left-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.inv360-lena-msg--user {
  align-self: flex-end;
  background: var(--inv360-lena-accent);
  color: #fff;
  border-top-right-radius: 6px;
  white-space: pre-wrap;
}

.inv360-lena-msg--error {
  background: #fef2f2;
  color: #991b1b;
}

.inv360-lena-time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.62;
  text-align: right;
}

.inv360-lena-typing {
  display: none;
  width: 52px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border-top-left-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.inv360-lena-typing.is-on {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.inv360-lena-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa3af;
  animation: inv360-lena-dot 1s infinite ease-in-out;
}

.inv360-lena-typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.inv360-lena-typing span:nth-child(3) {
  animation-delay: 0.24s;
}

.inv360-lena-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 10px;
  max-height: 320px;
}

.inv360-lena-suggestions.is-gone {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  transition:
    opacity 0.18s var(--inv360-lena-ease),
    transform 0.18s var(--inv360-lena-ease),
    max-height 0.18s ease;
}

.inv360-lena-chip {
  max-width: 92%;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--inv360-lena-accent);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  animation: inv360-lena-chip 0.28s var(--inv360-lena-ease) both;
}

.inv360-lena-chip:nth-child(2) {
  animation-delay: 0.05s;
}

.inv360-lena-chip:nth-child(3) {
  animation-delay: 0.1s;
}

.inv360-lena-chip:nth-child(4) {
  animation-delay: 0.15s;
}

.inv360-lena-chip:hover {
  filter: brightness(1.05);
}

.inv360-lena-chip:active {
  transform: scale(0.98);
}

.inv360-lena-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 12px 8px;
  background: #fff;
  border-top: 1px solid #eef1f4;
}

.inv360-lena-input {
  flex: 1;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 21px;
  background: #f3f4f6;
  color: #111827;
  font: inherit;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
}

.inv360-lena-input::placeholder {
  color: #9ca3af;
}

.inv360-lena-input:focus {
  outline: none;
  background: #eceff3;
}

.inv360-lena-send {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--inv360-lena-accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    transform 0.12s var(--inv360-lena-ease),
    filter 0.12s ease;
}

.inv360-lena-send:hover {
  filter: brightness(1.06);
}

.inv360-lena-send:active {
  transform: scale(0.94);
}

.inv360-lena-send:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.inv360-lena-send svg {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
  margin-left: 1px;
}

.inv360-lena-form {
  display: none;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  margin: 0;
  padding: 14px 14px 12px;
  background: #f6f7f9;
}

.inv360-lena.is-lead-pending .inv360-lena-form {
  display: flex;
}

.inv360-lena-form > * {
  flex-shrink: 0;
}

.inv360-lena.is-lead-pending .inv360-lena-body,
.inv360-lena.is-lead-pending .inv360-lena-foot {
  display: none;
}

.inv360-lena-form-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
}

.inv360-lena-form-intro {
  margin: -4px 0 2px;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
}

.inv360-lena-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.inv360-lena-field input,
.inv360-lena-field textarea {
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.inv360-lena-field textarea {
  resize: vertical;
  min-height: 58px;
}

.inv360-lena-field input:focus,
.inv360-lena-field textarea:focus {
  outline: none;
  border-color: var(--inv360-lena-accent);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.inv360-lena-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.inv360-lena-turnstile:empty {
  display: none;
}

.inv360-lena-form-error {
  margin: 0;
  min-height: 0;
  font-size: 12.5px;
  color: #b91c1c;
}

.inv360-lena-form-error:empty {
  display: none;
}

.inv360-lena-form-submit {
  flex-shrink: 0;
  min-height: 44px;
  margin-top: 2px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--inv360-lena-accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.inv360-lena-form-submit:hover {
  filter: brightness(1.06);
}

.inv360-lena-form-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.inv360-lena-brand {
  margin: 0;
  padding: 0 12px 8px;
  background: #fff;
  color: #9ca3af;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-align: center;
}

.inv360-lena-brand a {
  color: var(--inv360-lena-accent);
}

@keyframes inv360-lena-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes inv360-lena-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.2);
    opacity: 1;
  }
  70%,
  100% {
    box-shadow: 0 0 0 16px transparent;
    opacity: 0;
  }
}

@keyframes inv360-lena-msg {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inv360-lena-chip {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes inv360-lena-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 480px) {
  .inv360-lena,
  .inv360-lena--left {
    right: 12px;
    left: auto;
    bottom: 12px;
  }

  .inv360-lena--left {
    left: 12px;
    right: auto;
  }

  .inv360-lena-panel {
    width: min(100vw - 16px, 360px);
    height: min(72vh, 560px);
  }

  .inv360-lena-bubble--pill .inv360-lena-bubble-label,
  .inv360-lena-bubble--pill-text .inv360-lena-bubble-label {
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inv360-lena-bubble,
  .inv360-lena-bubble::before,
  .inv360-lena-msg,
  .inv360-lena-chip,
  .inv360-lena-typing span {
    animation: none;
  }

  .inv360-lena-panel,
  .inv360-lena-suggestions,
  .inv360-lena-send {
    transition: none;
  }
}
