.humanefw-onyx-widget,
.humanefw-onyx-widget * {
  box-sizing: border-box;
}

.humanefw-onyx-widget {
  --hfw-onyx-primary: #2e3091;
  --hfw-onyx-background: #ffffff;
  --hfw-onyx-text: #1a1a1a;
  --hfw-onyx-border: rgba(26, 26, 26, 0.16);
  --hfw-onyx-muted: rgba(26, 26, 26, 0.64);
  --hfw-onyx-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  font-family: "Montserrat", Arial, sans-serif;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  color: var(--hfw-onyx-text);
}

.hfw-onyx-launcher {
  align-items: center;
  background: var(--hfw-onyx-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--hfw-onyx-shadow);
  color: #fff;
  cursor: pointer;
  display: flex;
  font: 700 14px/1.2 "Montserrat", Arial, sans-serif;
  gap: 9px;
  min-height: 54px;
  max-width: min(280px, calc(100vw - 32px));
  padding: 0 18px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hfw-onyx-launcher:hover,
.hfw-onyx-launcher:focus-visible {
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  outline: 3px solid rgba(46, 48, 145, 0.22);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.hfw-onyx-launcher span[aria-hidden="true"] {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.hfw-onyx-launcher-text {
  overflow-wrap: anywhere;
}

.hfw-onyx-panel {
  background: var(--hfw-onyx-background);
  border: 1px solid var(--hfw-onyx-border);
  border-radius: 8px;
  bottom: 70px;
  box-shadow: var(--hfw-onyx-shadow);
  display: flex;
  flex-direction: column;
  height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(400px, calc(100vw - 32px));
}

.hfw-onyx-panel[hidden] {
  display: none;
}

.hfw-onyx-header {
  align-items: center;
  background: var(--hfw-onyx-primary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 14px 14px 14px 18px;
}

.hfw-onyx-header strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.hfw-onyx-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: 700 24px/1 Arial, sans-serif;
  height: 34px;
  justify-content: center;
  margin-left: 12px;
  padding: 0;
  width: 34px;
}

.hfw-onyx-close:hover,
.hfw-onyx-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.hfw-onyx-messages {
  background:
    linear-gradient(180deg, rgba(46, 48, 145, 0.055), rgba(46, 48, 145, 0)),
    var(--hfw-onyx-background);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.hfw-onyx-message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 88%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.hfw-onyx-message-assistant {
  align-self: flex-start;
  background: #f2f4f7;
  color: var(--hfw-onyx-text);
}

.hfw-onyx-message-welcome {
  align-self: center;
  background: #fff;
  border: 1px solid rgba(46, 48, 145, 0.16);
  box-shadow: 0 8px 22px rgba(46, 48, 145, 0.08);
  color: var(--hfw-onyx-primary);
  font-weight: 700;
  max-width: 94%;
  padding: 14px 16px;
  text-align: center;
}

.hfw-onyx-message-user {
  align-self: flex-end;
  background: var(--hfw-onyx-primary);
  color: #fff;
}

.hfw-onyx-message-loading {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  max-width: 94%;
  white-space: normal;
}

.hfw-onyx-markdown {
  white-space: normal;
}

.hfw-onyx-markdown > *:first-child {
  margin-top: 0;
}

.hfw-onyx-markdown > *:last-child {
  margin-bottom: 0;
}

.hfw-onyx-markdown p {
  margin: 0 0 10px;
}

.hfw-onyx-markdown h3,
.hfw-onyx-markdown h4,
.hfw-onyx-markdown h5,
.hfw-onyx-markdown h6 {
  color: var(--hfw-onyx-primary);
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 8px;
}

.hfw-onyx-markdown h3 {
  font-size: 17px;
}

.hfw-onyx-markdown h4,
.hfw-onyx-markdown h5,
.hfw-onyx-markdown h6 {
  font-size: 15px;
}

.hfw-onyx-markdown ul,
.hfw-onyx-markdown ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.hfw-onyx-markdown ul {
  list-style: disc;
}

.hfw-onyx-markdown ol {
  list-style: decimal;
}

.hfw-onyx-markdown li {
  margin: 5px 0;
  padding-left: 2px;
}

.hfw-onyx-markdown a {
  color: var(--hfw-onyx-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hfw-onyx-markdown a.hfw-onyx-citation {
  font-size: 0.85em;
  font-weight: 800;
  text-decoration: none;
  vertical-align: super;
}

.hfw-onyx-markdown code {
  background: rgba(46, 48, 145, 0.08);
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 4px;
}

.hfw-onyx-markdown pre {
  background: #172033;
  border-radius: 6px;
  color: #fff;
  margin: 0 0 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px;
}

.hfw-onyx-markdown pre code {
  background: transparent;
  color: inherit;
  display: block;
  padding: 0;
  white-space: pre;
}

.hfw-onyx-markdown .hfw-onyx-table-wrap {
  margin: 0 0 10px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hfw-onyx-markdown table {
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
  min-width: 100%;
  width: max-content;
}

.hfw-onyx-markdown th,
.hfw-onyx-markdown td {
  border: 1px solid rgba(46, 48, 145, 0.18);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.hfw-onyx-markdown th {
  background: rgba(46, 48, 145, 0.08);
  color: var(--hfw-onyx-primary);
  font-weight: 700;
  white-space: nowrap;
}

.hfw-onyx-markdown tbody tr:nth-child(even) {
  background: rgba(46, 48, 145, 0.03);
}

.hfw-onyx-dots {
  display: inline-flex;
  gap: 3px;
}

.hfw-onyx-dots i {
  animation: hfw-onyx-dot 1s infinite ease-in-out;
  background: var(--hfw-onyx-muted);
  border-radius: 50%;
  display: block;
  height: 5px;
  width: 5px;
}

.hfw-onyx-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.hfw-onyx-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.hfw-onyx-form {
  align-items: flex-end;
  border-top: 1px solid var(--hfw-onyx-border);
  display: flex;
  gap: 10px;
  padding: 12px;
}

.hfw-onyx-form textarea {
  background: #fff;
  border: 1px solid var(--hfw-onyx-border);
  border-radius: 8px;
  color: var(--hfw-onyx-text);
  flex: 1 1 auto;
  font: 400 14px/1.45 "Montserrat", Arial, sans-serif;
  max-height: 120px;
  min-height: 46px;
  min-width: 0;
  padding: 11px 12px;
  resize: none;
}

.hfw-onyx-form textarea:focus {
  border-color: var(--hfw-onyx-primary);
  outline: 3px solid rgba(46, 48, 145, 0.16);
}

.hfw-onyx-submit {
  background: var(--hfw-onyx-primary);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font: 700 13px/1 "Montserrat", Arial, sans-serif;
  min-height: 46px;
  padding: 0 14px;
}

.hfw-onyx-submit:hover,
.hfw-onyx-submit:focus-visible {
  filter: brightness(0.92);
  outline: 3px solid rgba(46, 48, 145, 0.16);
  outline-offset: 2px;
}

.hfw-onyx-form.is-loading .hfw-onyx-submit,
.hfw-onyx-form.is-loading textarea {
  opacity: 0.68;
  pointer-events: none;
}

.hfw-onyx-honeypot,
.hfw-onyx-screen-reader {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes hfw-onyx-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media screen and (max-width: 640px) {
  .humanefw-onyx-widget {
    bottom: 16px;
    right: 16px;
  }

  .hfw-onyx-panel {
    border-radius: 0;
    border-width: 0;
    bottom: -16px;
    height: 100vh;
    max-height: none;
    position: fixed;
    right: -16px;
    width: 100vw;
  }

  .hfw-onyx-launcher {
    min-height: 52px;
    padding: 0 16px;
  }
}
