#jg-chat-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 13px/1 Helvetica, Arial, sans-serif;
}

#jg-chat-btn:hover {
  background: #1558b0;
}

#jg-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 99991;
  width: min(360px, calc(100vw - 24px));
  height: min(480px, calc(100vh - 120px));
  background: #111;
  color: #f2f2f2;
  border: 1px solid #333;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: Helvetica, Arial, sans-serif;
}

#jg-chat-panel.open {
  display: flex;
}

#jg-chat-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #1b1b1b;
  border-bottom: 1px solid #2c2c2c;
}

#jg-chat-panel header strong {
  font-size: 14px;
}

#jg-chat-close {
  border: 0;
  background: transparent;
  color: #bbb;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

#jg-chat-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
}

#jg-captcha-step p,
#jg-chat-step p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #cfcfcf;
  line-height: 1.4;
}

#jg-captcha-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#jg-captcha-img {
  width: 180px;
  height: 56px;
  border-radius: 8px;
  background: #f4f1ea;
  display: block;
}

#jg-captcha-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

#jg-captcha-answer {
  flex: 1;
  min-width: 120px;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
}

#jg-captcha-submit,
#jg-captcha-reload {
  border: 0;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

#jg-captcha-submit {
  background: #1a73e8;
}

#jg-captcha-error {
  display: none;
  margin-top: 10px;
  color: #ff8e8e;
  font-size: 12px;
}

#jg-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  margin-bottom: 12px;
}

.jg-msg {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.jg-msg.bot {
  align-self: flex-start;
  background: #2a2a2a;
}

.jg-msg.user {
  align-self: flex-end;
  background: #1a73e8;
}

#jg-chat-form {
  display: flex;
  gap: 8px;
}

#jg-chat-input {
  flex: 1;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
}

#jg-chat-send {
  border: 0;
  border-radius: 8px;
  background: #1a73e8;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
}

#jg-chat-send:disabled,
#jg-chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
