.ig-site-chatbot {
  --ig-site-primary: #35d0ff;
  --ig-site-blue: #3a7cff;
  --ig-site-accent: #a855f7;
  --ig-site-bg: rgba(7, 10, 18, 0.96);
  --ig-site-panel: rgba(12, 16, 32, 0.97);
  --ig-site-surface: rgba(18, 24, 43, 0.78);
  --ig-site-line: rgba(255, 255, 255, 0.10);
  --ig-site-line-strong: rgba(255, 255, 255, 0.16);
  --ig-site-text: #eaf0ff;
  --ig-site-muted: #a9b4d6;
  --ig-site-launcher-bottom: 96px;
  --ig-site-panel-bottom: 170px;
  --ig-site-viewport-height: 100dvh;
  color: var(--ig-site-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ig-site-chatbot * {
  box-sizing: border-box;
}

.ig-site-chatbot[data-position="left"] {
  --ig-site-launcher-bottom: 22px;
  --ig-site-panel-bottom: 96px;
}

.ig-site-chatbot[data-position="left"] .ig-site-launcher,
.ig-site-chatbot[data-position="left"] .ig-site-panel {
  left: 22px;
  right: auto;
}

.ig-site-launcher {
  position: fixed;
  right: 22px;
  bottom: var(--ig-site-launcher-bottom);
  z-index: 9997;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(135deg, rgba(53, 208, 255, 0.98) 0%, rgba(58, 124, 255, 0.95) 48%, rgba(168, 85, 247, 0.96) 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 18px 48px rgba(53, 208, 255, 0.24),
    0 18px 42px rgba(168, 85, 247, 0.22),
    0 18px 42px rgba(2, 8, 23, 0.42);
  cursor: pointer;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.ig-site-launcher::before,
.ig-site-launcher::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.ig-site-launcher::before {
  inset: 5px;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(12, 16, 32, 0.76), rgba(7, 10, 18, 0.38)),
    radial-gradient(circle at 50% 0%, rgba(53, 208, 255, 0.20), transparent 58%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 -12px 28px rgba(7, 10, 18, 0.20) inset;
}

.ig-site-launcher::after {
  inset: -5px;
  z-index: -1;
  background: radial-gradient(circle, rgba(53, 208, 255, 0.22), rgba(168, 85, 247, 0.14) 48%, transparent 70%);
  filter: blur(7px);
  opacity: 0.72;
}

.ig-site-launcher:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10) inset,
    0 20px 56px rgba(53, 208, 255, 0.30),
    0 20px 48px rgba(168, 85, 247, 0.26),
    0 18px 42px rgba(2, 8, 23, 0.44);
}

.ig-site-launcher__mark {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(7, 10, 18, 0.30);
  box-shadow:
    0 10px 24px rgba(2, 8, 23, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  overflow: hidden;
}

.ig-site-launcher__mark img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  object-fit: cover;
}

.ig-site-launcher__label {
  position: absolute;
  right: 72px;
  z-index: 2;
  width: max-content;
  max-width: 220px;
  padding: 9px 11px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(7, 10, 18, 0.94);
  border: 1px solid var(--ig-site-line);
  color: var(--ig-site-text);
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 14px 36px rgba(2, 8, 23, 0.26);
}

.ig-site-chatbot[data-position="left"] .ig-site-launcher__label {
  left: 72px;
  right: auto;
}

.ig-site-panel {
  position: fixed;
  right: 22px;
  bottom: var(--ig-site-panel-bottom);
  z-index: 9998;
  width: min(430px, calc(100vw - 28px));
  height: 650px;
  max-height: calc(100vh - var(--ig-site-panel-bottom) - 22px);
  border: 1px solid var(--ig-site-line-strong);
  border-radius: 22px;
  background:
    radial-gradient(640px 260px at 0% 0%, rgba(53, 208, 255, 0.13), transparent 58%),
    radial-gradient(560px 260px at 100% 0%, rgba(168, 85, 247, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.016) 38%),
    var(--ig-site-bg);
  box-shadow:
    0 30px 86px rgba(0, 0, 0, 0.48),
    0 24px 70px rgba(53, 208, 255, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  backdrop-filter: blur(18px);
  display: none;
  overflow: hidden;
}

.ig-site-chatbot.is-open .ig-site-panel {
  display: flex;
  flex-direction: column;
}

.ig-site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--ig-site-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(12, 16, 32, 0.78);
}

.ig-site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ig-site-brand__logo {
  width: 104px;
  height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 7px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(53, 208, 255, 0.12), rgba(168, 85, 247, 0.10)),
    rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.ig-site-brand__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ig-site-brand__copy {
  min-width: 0;
}

.ig-site-brand__title {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ig-site-brand__status {
  margin-top: 2px;
  color: var(--ig-site-muted);
  font-size: 11px;
}

.ig-site-head__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ig-site-iconbtn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--ig-site-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ig-site-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.ig-site-iconbtn:hover {
  border-color: color-mix(in srgb, var(--ig-site-primary) 34%, var(--ig-site-line));
  background: linear-gradient(180deg, rgba(53, 208, 255, 0.09), rgba(168, 85, 247, 0.06));
}

.ig-site-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ig-site-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  scroll-behavior: smooth;
}

.ig-site-bubble {
  width: fit-content;
  max-width: 86%;
  margin: 9px 0;
  padding: 11px 13px;
  border: 1px solid var(--ig-site-line);
  border-radius: 15px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(53, 208, 255, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.028));
  color: var(--ig-site-text);
  font-size: 14px;
  line-height: 1.46;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.14);
}

.ig-site-bubble--bot {
  max-width: 90%;
  margin-right: auto;
  border-top-left-radius: 8px;
}

.ig-site-bot-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.ig-site-bot-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(145deg, rgba(53, 208, 255, 0.18), rgba(168, 85, 247, 0.15)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 22px rgba(2, 8, 23, 0.16);
  overflow: hidden;
}

.ig-site-bot-avatar img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.ig-site-bot-content {
  min-width: 0;
}

.ig-site-bubble--user {
  margin-left: auto;
  border-top-right-radius: 8px;
  background: linear-gradient(135deg, var(--ig-site-primary) 0%, var(--ig-site-blue) 52%, var(--ig-site-accent) 100%);
  border-color: rgba(255, 255, 255, 0.16);
  color: #061018;
  box-shadow: 0 14px 34px rgba(53, 208, 255, 0.13), 0 12px 30px rgba(2, 8, 23, 0.18);
}

.ig-site-bubble--system {
  margin-left: auto;
  margin-right: auto;
  max-width: 92%;
  text-align: center;
  color: var(--ig-site-muted);
  background: rgba(255, 255, 255, 0.035);
}

.ig-site-msg p {
  margin: 0 0 8px;
}

.ig-site-msg p:last-child {
  margin-bottom: 0;
}

.ig-site-bubble.is-streaming .ig-site-msg::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--ig-site-primary);
  vertical-align: -2px;
  animation: ig-site-caret 920ms ease-in-out infinite;
}

@keyframes ig-site-caret {
  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 1;
  }
}

.ig-site-time {
  margin-top: 7px;
  color: rgba(226, 232, 240, 0.48);
  font-size: 10px;
}

.ig-site-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ig-site-cta button,
.ig-site-chip {
  border: 1px solid var(--ig-site-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ig-site-text);
  min-height: 32px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.ig-site-cta button:hover,
.ig-site-chip:hover {
  border-color: color-mix(in srgb, var(--ig-site-primary) 38%, var(--ig-site-line));
  background: linear-gradient(90deg, rgba(53, 208, 255, 0.10), rgba(168, 85, 247, 0.08));
}

.ig-site-cta button:first-child {
  border-color: color-mix(in srgb, var(--ig-site-primary) 46%, rgba(255, 255, 255, 0.12));
  background: linear-gradient(90deg, rgba(53, 208, 255, 0.13), rgba(168, 85, 247, 0.10));
}

.ig-site-lead-card-wrap {
  margin-top: 12px;
  width: min(100%, 330px);
  border: 1px solid rgba(53, 208, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(12, 16, 32, 0.72);
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.20);
  overflow: hidden;
}

.ig-site-lead-card__head {
  display: grid;
  gap: 4px;
  padding: 12px 12px 0;
}

.ig-site-lead-card__head strong {
  font-size: 13px;
}

.ig-site-lead-card__head span {
  color: var(--ig-site-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ig-site-lead-card {
  padding: 12px;
  gap: 10px;
}

.ig-site-lead-card__grid {
  display: grid;
  gap: 9px;
}

.ig-site-lead-card .ig-site-field {
  gap: 5px;
}

.ig-site-lead-card .ig-site-field span {
  color: rgba(247, 249, 255, 0.74);
  font-size: 11px;
  font-weight: 800;
}

.ig-site-lead-card .ig-site-field input,
.ig-site-lead-card .ig-site-field textarea {
  min-height: 38px;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
}

.ig-site-lead-card .ig-site-field textarea {
  min-height: 78px;
}

.ig-site-lead-card .ig-site-consent {
  font-size: 11px;
}

.ig-site-lead-card .ig-site-form-actions {
  justify-content: flex-start;
}

.ig-site-lead-card.is-sent {
  opacity: 0.78;
}

.ig-site-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 12px;
}

.ig-site-quick[hidden] {
  display: none;
}

.ig-site-composer {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--ig-site-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(7, 10, 18, 0.78);
}

.ig-site-inputwrap {
  position: relative;
  border: 1px solid var(--ig-site-line);
  border-radius: 18px;
  background: rgba(18, 24, 43, 0.66);
}

.ig-site-inputwrap:focus-within {
  border-color: color-mix(in srgb, var(--ig-site-primary) 62%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ig-site-primary) 15%, transparent);
}

.ig-site-input {
  width: 100%;
  min-height: 48px;
  max-height: 130px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ig-site-text);
  padding: 13px 54px 13px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}

.ig-site-input::placeholder {
  color: rgba(226, 232, 240, 0.52);
}

.ig-site-send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ig-site-primary) 0%, var(--ig-site-blue) 54%, var(--ig-site-accent) 100%);
  color: #061018;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.ig-site-send:not(:disabled):hover {
  filter: brightness(1.05);
  box-shadow: 0 0 0 4px rgba(53, 208, 255, 0.10);
}

.ig-site-send:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ig-site-status {
  min-height: 16px;
  padding: 7px 2px 0;
  color: var(--ig-site-muted);
  font-size: 11px;
}

.ig-site-modal[hidden] {
  display: none;
}

.ig-site-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 16px;
}

.ig-site-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.66);
}

.ig-site-modal__panel {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--ig-site-line-strong);
  border-radius: 20px;
  background:
    radial-gradient(760px 280px at 0% 0%, rgba(53, 208, 255, 0.12), transparent 58%),
    radial-gradient(640px 260px at 100% 0%, rgba(168, 85, 247, 0.11), transparent 58%),
    var(--ig-site-panel);
  box-shadow: 0 30px 90px rgba(2, 8, 23, 0.60);
  overflow: hidden;
}

.ig-site-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--ig-site-line);
}

.ig-site-modal__title {
  font-weight: 900;
}

.ig-site-modal__intro {
  margin-top: 4px;
  color: var(--ig-site-muted);
  font-size: 13px;
  line-height: 1.45;
}

.ig-site-lead {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.ig-site-field {
  display: grid;
  gap: 6px;
}

.ig-site-field label {
  color: rgba(247, 249, 255, 0.74);
  font-size: 12px;
  font-weight: 750;
}

.ig-site-field input,
.ig-site-field textarea {
  width: 100%;
  border: 1px solid var(--ig-site-line);
  border-radius: 12px;
  background: rgba(18, 24, 43, 0.66);
  color: var(--ig-site-text);
  padding: 10px 11px;
  outline: 0;
  font: inherit;
}

.ig-site-field textarea {
  min-height: 96px;
  resize: vertical;
}

.ig-site-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(247, 249, 255, 0.76);
  font-size: 12px;
  line-height: 1.4;
}

.ig-site-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ig-site-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ig-site-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ig-site-text);
  cursor: pointer;
  font-weight: 800;
}

.ig-site-btn--primary {
  border: 0;
  background: linear-gradient(90deg, var(--ig-site-primary), var(--ig-site-blue), var(--ig-site-accent));
  color: #061018;
}

.ig-site-btn:hover {
  border-color: color-mix(in srgb, var(--ig-site-primary) 34%, var(--ig-site-line));
}

.ig-site-btn--primary:hover {
  filter: brightness(1.04);
}

.ig-site-form-status {
  min-height: 18px;
  color: var(--ig-site-muted);
  font-size: 12px;
}

.ig-site-form-status.is-error {
  color: #fecaca;
}

.ig-site-form-status.is-ok {
  color: #bbf7d0;
}

.ig-site-hp {
  position: absolute;
  left: -99999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  body.ig-site-chatbot-is-open {
    overflow: hidden;
    touch-action: none;
  }

  .ig-site-chatbot {
    --ig-site-launcher-bottom: 84px;
  }

  .ig-site-chatbot .ig-site-launcher {
    right: 16px;
    left: auto;
    bottom: var(--ig-site-launcher-bottom);
  }

  .ig-site-launcher__label {
    display: none;
  }

  body.ig-site-chatbot-is-open #inmoLangSwitcher {
    display: none !important;
  }

  .ig-site-panel,
  .ig-site-chatbot[data-position="left"] .ig-site-panel {
    inset: 0;
    width: 100vw;
    height: var(--ig-site-viewport-height, 100dvh);
    max-height: var(--ig-site-viewport-height, 100dvh);
    border-radius: 0;
  }

  .ig-site-bubble {
    max-width: 94%;
  }

  .ig-site-head {
    padding: max(12px, env(safe-area-inset-top)) 12px 12px;
  }

  .ig-site-messages {
    padding: 16px 12px;
  }

  .ig-site-quick {
    padding: 0 12px 12px;
  }

  .ig-site-composer {
    padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  }

  .ig-site-input {
    font-size: 16px;
  }

  .ig-site-lead-card-wrap {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ig-site-chatbot *,
  .ig-site-chatbot *::before,
  .ig-site-chatbot *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
