.hx-livechat-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #1f5eff;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hx-livechat-btn:focus {
  outline: 2px solid rgba(31, 94, 255, 0.35);
  outline-offset: 3px;
}

.hx-livechat-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 2147483000;
  width: min(360px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 130px));
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  display: none;
}

.hx-livechat-panel,
.hx-livechat-panel * {
  box-sizing: border-box;
}

.hx-livechat-panel.hx-open {
  display: flex;
  flex-direction: column;
}

.hx-livechat-header {
  background: linear-gradient(135deg, #1f5eff, #4b7dff);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hx-livechat-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.hx-livechat-subtitle {
  opacity: 0.9;
  font-size: 12px;
}

.hx-livechat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}

.hx-livechat-body {
  padding: 12px;
  background: #f7f7fb;
  flex: 1;
  overflow: auto;
}

.hx-livechat-msg {
  display: flex;
  margin: 10px 0;
}

.hx-livechat-msg.hx-user {
  justify-content: flex-end;
}

.hx-livechat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
}

.hx-livechat-msg.hx-user .hx-livechat-bubble {
  background: #1f5eff;
  color: #fff;
}

.hx-livechat-footer {
  padding: 10px;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hx-livechat-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hx-livechat-quick button {
  border: 1px solid rgba(31, 94, 255, 0.25);
  background: rgba(31, 94, 255, 0.06);
  color: #1f5eff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.hx-livechat-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.hx-livechat-form .cf-turnstile {
  flex: 0 0 100%;
  transform: scale(0.85);
  transform-origin: 0 0;
  margin-bottom: 6px;
}

.hx-livechat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 1.3;
}

.hx-livechat-send {
  border: 0;
  background: #1f5eff;
  color: #fff;
  border-radius: 10px;
  padding: 0 16px;
  min-width: 118px;
  height: 44px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.hx-livechat-hint {
  display: none;
}

.hx-livechat-status {
  font-size: 12px;
  opacity: 0.9;
}
