.tgwa-root {
  --tgwa-brand: #b5121b;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  font-family: inherit;
}
.tgwa-launch {
  border: 0;
  background: var(--tgwa-brand);
  color: #fff;
  border-radius: 999px;
  padding: 13px 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  font-weight: 700;
  cursor: pointer;
}
.tgwa-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(390px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 100px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.28);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}
.tgwa-header {
  background: var(--tgwa-brand);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tgwa-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.tgwa-messages {
  padding: 14px;
  max-height: 330px;
  overflow-y: auto;
  background: #f7f7f7;
}
.tgwa-message {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.tgwa-message p { margin: 0 0 8px; }
.tgwa-message p:last-child { margin-bottom: 0; }
.tgwa-bot {
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #1d1d1d;
}
.tgwa-user {
  background: #222;
  color: #fff;
  margin-left: 28px;
}
.tgwa-ask-form,
.tgwa-handover-form {
  padding: 14px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}
.tgwa-label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.tgwa-ask-form textarea,
.tgwa-handover-form textarea,
.tgwa-handover-form input {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 9px 10px;
  box-sizing: border-box;
  margin-bottom: 8px;
  font: inherit;
}
.tgwa-ask-form button,
.tgwa-handover-form button,
.tgwa-secondary {
  background: var(--tgwa-brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.tgwa-secondary {
  margin-top: 10px;
  display: inline-block;
}
.tgwa-handover-form h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
@media (max-width: 520px) {
  .tgwa-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .tgwa-launch {
    width: 100%;
  }
  .tgwa-panel {
    width: 100%;
    right: 0;
    bottom: 58px;
    max-height: calc(100vh - 90px);
  }
  .tgwa-messages {
    max-height: 260px;
  }
}
.tgwa-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tgwa-answer-link {
  display: inline-block;
  background: var(--tgwa-brand);
  color: #fff !important;
  text-decoration: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
  line-height: 1.2;
}
.tgwa-answer-link:hover,
.tgwa-answer-link:focus {
  color: #fff !important;
  text-decoration: underline;
}
.tgwa-link-system {
  background: #222;
}
