.hx-ai-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.hx-ai-bubble,
.hx-ai-prompt,
.hx-ai-panel button {
  font: inherit;
}

.hx-ai-bubble {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #1d5c4a;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.2);
}

.hx-ai-prompt {
  position: absolute;
  right: 78px;
  bottom: 0;
  width: 278px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid #d9e0dd;
  background: #fff;
  color: #17211f;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.12);
  text-align: left;
  cursor: pointer;
}

.hx-ai-prompt span {
  display: block;
  font-weight: 800;
}

.hx-ai-prompt small {
  color: #5d6965;
}

.hx-ai-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  display: none;
  width: min(420px, calc(100vw - 28px));
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e0dd;
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(23, 33, 31, 0.22);
}

.hx-ai-widget.is-open .hx-ai-panel {
  display: block;
}

.hx-ai-widget.is-open .hx-ai-prompt {
  display: none;
}

.hx-ai-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #1d5c4a;
  color: #fff;
}

.hx-ai-panel header strong,
.hx-ai-panel header span {
  display: block;
}

.hx-ai-panel header span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.hx-ai-panel header button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.hx-ai-messages {
  display: grid;
  max-height: 360px;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  background: #f6f7f4;
}

.hx-ai-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 8px;
  color: #17211f;
  font-size: 0.95rem;
  line-height: 1.48;
}

.hx-ai-message.assistant {
  justify-self: start;
  background: #fff;
  border: 1px solid #d9e0dd;
}

.hx-ai-message.user {
  justify-self: end;
  background: #e7f0ec;
}

.hx-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 4px;
  background: #fff;
}

.hx-ai-chips button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9e0dd;
  background: #fff;
  color: #1d5c4a;
  border-radius: 17px;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.hx-ai-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 16px 14px;
  background: #fff;
}

.hx-ai-form input {
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9e0dd;
  border-radius: 6px;
  font: inherit;
}

.hx-ai-form button {
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  background: #1d5c4a;
  color: #fff;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.hx-ai-panel footer {
  padding: 0 16px 14px;
  color: #5d6965;
  background: #fff;
  font-size: 0.78rem;
}

@media (max-width: 620px) {
  .hx-ai-widget {
    right: 14px;
    bottom: 14px;
  }

  .hx-ai-prompt {
    display: none;
  }
}
