.hellosite-chatbot {
  bottom: 24px;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  position: fixed;
  right: 24px;
  z-index: 9999;
}

.hellosite-chatbot * {
  box-sizing: border-box;
}

.hellosite-chatbot__toggle {
  align-items: center;
  background: #1f5eff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(23, 55, 124, 0.26);
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 60px;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 60px;
}

.hellosite-chatbot__toggle:hover {
  box-shadow: 0 18px 38px rgba(23, 55, 124, 0.32);
  transform: translateY(-2px);
}

.hellosite-chatbot__toggle-icon,
.hellosite-chatbot__toggle-icon::before,
.hellosite-chatbot__toggle-icon::after {
  background: currentColor;
  display: block;
}

.hellosite-chatbot__toggle-icon {
  border-radius: 12px;
  height: 18px;
  position: relative;
  width: 28px;
}

.hellosite-chatbot__toggle-icon::before,
.hellosite-chatbot__toggle-icon::after {
  content: "";
  position: absolute;
}

.hellosite-chatbot__toggle-icon::before {
  border-radius: 999px;
  height: 5px;
  left: 7px;
  top: -8px;
  width: 14px;
}

.hellosite-chatbot__toggle-icon::after {
  background: transparent;
  border-bottom: 7px solid currentColor;
  border-left: 5px solid transparent;
  bottom: -5px;
  height: 0;
  left: 6px;
  width: 0;
}

.hellosite-chatbot__panel {
  background: #fff;
  border: 1px solid rgba(22, 32, 53, 0.12);
  border-radius: 8px;
  bottom: 78px;
  box-shadow: 0 24px 60px rgba(20, 31, 55, 0.22);
  display: flex;
  flex-direction: column;
  height: min(560px, calc(100vh - 112px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: 360px;
}

.hellosite-chatbot__panel[hidden] {
  display: none;
}

.hellosite-chatbot__header {
  align-items: center;
  background: #15213a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
}

.hellosite-chatbot__header strong,
.hellosite-chatbot__header span {
  display: block;
  line-height: 1.3;
}

.hellosite-chatbot__header strong {
  font-size: 16px;
  font-weight: 700;
}

.hellosite-chatbot__header span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  margin-top: 3px;
}

.hellosite-chatbot__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0 0 2px;
  width: 34px;
}

.hellosite-chatbot__messages {
  background: #f6f8fb;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
}

.hellosite-chatbot__message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 86%;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.hellosite-chatbot__message--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(22, 32, 53, 0.08);
  color: #263247;
}

.hellosite-chatbot__message--user {
  align-self: flex-end;
  background: #1f5eff;
  color: #fff;
}

.hellosite-chatbot__form {
  align-items: stretch;
  background: #fff;
  border-top: 1px solid rgba(22, 32, 53, 0.1);
  display: flex;
  gap: 10px;
  padding: 12px;
}

.hellosite-chatbot__input {
  border: 1px solid rgba(22, 32, 53, 0.18);
  border-radius: 8px;
  color: #1f2937;
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  max-height: 112px;
  min-height: 58px;
  overflow-y: auto;
  padding: 10px 12px;
  resize: none;
}

.hellosite-chatbot__input:focus {
  border-color: #1f5eff;
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.13);
  outline: 0;
}

.hellosite-chatbot__send {
  background: #1f5eff;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  min-height: 58px;
  line-height: 1;
  margin: 0;
  padding: 0 16px;
}

.hellosite-chatbot__send:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 549px) {
  .hellosite-chatbot {
    bottom: 16px;
    right: 16px;
  }

  .hellosite-chatbot__panel {
    bottom: 74px;
    height: min(540px, calc(100vh - 104px));
    right: -4px;
    width: calc(100vw - 24px);
  }

  .hellosite-chatbot__toggle {
    height: 56px;
    width: 56px;
  }
}
