/* ITG floating chat widget (standalone, no deps) */
:root {
  --itg-chat-z: 2147483000;
  --itg-chat-bg: #ffffff;
  --itg-chat-text: #0f172a;
  --itg-chat-muted: rgba(15, 23, 42, 0.65);
  --itg-chat-border: rgba(15, 23, 42, 0.12);
  --itg-chat-shadow: 0 22px 55px rgba(2, 8, 23, 0.28);
  --itg-chat-accent: #111827;
}

.itg-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--itg-chat-z);
  font-family: inherit;
}

.itg-chat__fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: radial-gradient(120% 120% at 20% 20%, #1f2937 0%, #0b1220 55%, #020617 100%);
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.34);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  position: relative;
}

.itg-chat__fab::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 0 rgba(255, 255, 255, 0.55),
    0 0 26px rgba(255, 255, 255, 0.22);
  opacity: 0.95;
  animation: itgChatGlow 1.6s ease-in-out infinite;
}

.itg-chat--open .itg-chat__fab::before {
  animation: none;
  opacity: 0.15;
}

@keyframes itgChatGlow {
  0% {
    transform: scale(0.98);
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.55),
      0 0 18px rgba(255, 255, 255, 0.20);
    opacity: 0.9;
  }
  55% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 10px rgba(255, 255, 255, 0),
      0 0 36px rgba(255, 255, 255, 0.35);
    opacity: 1;
  }
  100% {
    transform: scale(1.02);
    box-shadow:
      0 0 0 16px rgba(255, 255, 255, 0),
      0 0 22px rgba(255, 255, 255, 0.22);
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .itg-chat__fab::before {
    animation: none;
  }
}

.itg-chat__fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.42);
}

.itg-chat__fab:active {
  transform: translateY(0);
}

.itg-chat__fab i {
  font-size: 22px;
  line-height: 1;
}

.itg-chat__fab svg {
  width: 22px;
  height: 22px;
  display: block;
}

.itg-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 120px));
  background: var(--itg-chat-bg);
  color: var(--itg-chat-text);
  border: 1px solid var(--itg-chat-border);
  border-radius: 18px;
  box-shadow: var(--itg-chat-shadow);
  overflow: hidden;
  display: none;
}

.itg-chat--open .itg-chat__panel {
  display: flex;
  flex-direction: column;
}

.itg-chat__header {
  padding: 14px 14px 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--itg-chat-border);
}

.itg-chat__brand {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b1220, #1f2937);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}

.itg-chat__brand i {
  font-size: 18px;
}

.itg-chat__brand svg {
  width: 18px;
  height: 18px;
  display: block;
}

.itg-chat__title {
  min-width: 0;
  flex: 1 1 auto;
}

.itg-chat__title strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
}

.itg-chat__title span {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--itg-chat-muted);
  margin-top: 2px;
}

.itg-chat__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--itg-chat-border);
  background: rgba(15, 23, 42, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--itg-chat-text);
}

.itg-chat__close i {
  font-size: 18px;
}

.itg-chat__body {
  padding: 14px;
  overflow: auto;
  flex: 1 1 auto;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(2, 8, 23, 0.035) 0%, rgba(2, 8, 23, 0) 65%),
    #fff;
}

.itg-chat__msg {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.itg-chat__msg--me {
  justify-content: flex-end;
}

.itg-chat__bubble {
  max-width: 80%;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--itg-chat-border);
  background: rgba(15, 23, 42, 0.02);
}

.itg-chat__msg--me .itg-chat__bubble {
  background: rgba(2, 8, 23, 0.92);
  border-color: rgba(2, 8, 23, 0.92);
  color: #fff;
}

.itg-chat__bubble a {
  color: inherit;
  text-decoration: underline;
}

.itg-chat__typing {
  opacity: 0.7;
}

.itg-chat__typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.itg-chat__typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--itg-chat-text);
  opacity: 0.4;
  animation: itgTypingDot 1.4s ease-in-out infinite;
}

.itg-chat__typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.itg-chat__typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.itg-chat__typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes itgTypingDot {
  0%, 60%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.itg-chat__footer {
  padding: 12px;
  border-top: 1px solid var(--itg-chat-border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.itg-chat__form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.itg-chat__input {
  flex: 1 1 auto;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--itg-chat-border);
  padding: 0 12px;
  outline: none;
  font-size: 13px;
}

.itg-chat__input:focus {
  border-color: rgba(2, 8, 23, 0.35);
  box-shadow: 0 0 0 3px rgba(2, 8, 23, 0.08);
}

.itg-chat__send {
  height: 40px;
  width: 40px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: rgba(2, 8, 23, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.itg-chat__send i {
  font-size: 18px;
}

.itg-chat__hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--itg-chat-muted);
}

.itg-chat__hint a {
  color: var(--itg-chat-text);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .itg-chat {
    right: 12px;
    bottom: 12px;
  }
  .itg-chat__panel {
    bottom: 68px;
    border-radius: 16px;
  }
}


