/* ===== tgconsult widget ===== */
.tgc-root, .tgc-root * { box-sizing: border-box; }

.tgc-root{
  position: fixed;
  right: 22px;
  bottom: 70px; /* отступ под кнопки/меню */
  z-index: 2147483647;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Круглая кнопка чата */
.tgc-button{
  position: absolute; right: 0; bottom: 0;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--tgc-color, #0D6EFD); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
  cursor: pointer; user-select: none;
}
.tgc-button svg{ width:22px; height:22px; display:block; }

/* Окно чата */
.tgc-window{
  position: absolute; right: 0; bottom: 72px;
  width: 360px; max-width: calc(100vw - 40px);
  background:#f6f7f9; border-radius:16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22); overflow:hidden;
}
.tgc-window[hidden]{ display:none !important; }

@media (max-width: 480px){ .tgc-window{ width:92vw; } }

/* Шапка */
.tgc-head{
  display:flex; align-items:center; gap:10px;
  background: linear-gradient(135deg,#243a73,#1b2e59);
  padding:12px 14px; color:#fff;
}
.tgc-ava{ width:32px; height:32px; border-radius:50%; display:block; }
.tgc-title{ flex:1; font-weight:700; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tgc-close{ background:none; border:0; color:#fff; font-size:20px; line-height:1; cursor:pointer; padding:0 2px; }

/* Сообщения */
.tgc-body{ height:320px; overflow:auto; padding:14px; background:#f5f6f8; }
.tgc-msg{ padding:10px 12px; border-radius:14px; max-width:80%; margin:8px 0; white-space:pre-wrap; }

.tgc-msg-manager{               /* менеджер: слева, белое облачко */
  background:#fff; color:#222;
  border:1px solid #e5e7eb;
  margin-right:auto;
}

.tgc-msg-visitor{               /* посетитель: справа, цветное */
  background: var(--tgc-color, #0D6EFD);
  color:#fff;
  margin-left:auto;
}

/* Форма ввода */
.tgc-form{
  display:flex; align-items:center; gap:8px;
  padding:10px; background:#fff; border-top:1px solid #eee;
}
.tgc-input{
  flex:1; min-height:42px; padding:10px 12px;
  border:1px solid #dfe3e7; border-radius:12px; font-size:14px;
}
.tgc-send{
  width:44px; height:42px;
  border:0; border-radius:12px;
  background: var(--tgc-color, #0D6EFD); color:#fff;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}

/* honeypot */
.tgc-hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
