.qbc-root {
  --qbc-bg: #ffffff;
  --qbc-text: #172033;
  --qbc-muted: #667085;
  --qbc-border: #d9dee8;
  --qbc-primary: #0b6bcb;
  --qbc-primary-strong: #084f96;
  --qbc-soft: #eef6ff;
  --qbc-shadow: 0 18px 44px rgba(23, 32, 51, 0.2);
  bottom: 20px;
  color: var(--qbc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: 20px;
  z-index: 2147483000;
}

.qbc-root * {
  box-sizing: border-box;
}

.qbc-launcher {
  align-items: center;
  background: var(--qbc-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--qbc-shadow);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  transition: background 160ms ease, transform 160ms ease;
}

.qbc-launcher:hover {
  background: var(--qbc-primary-strong);
  transform: translateY(-1px);
}

.qbc-launcher:focus-visible,
.qbc-close:focus-visible,
.qbc-send:focus-visible,
.qbc-chip:focus-visible {
  outline: 3px solid rgba(11, 107, 203, 0.28);
  outline-offset: 3px;
}

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

.qbc-root[data-open="true"] .qbc-panel {
  display: flex;
}

.qbc-header {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--qbc-border);
  display: flex;
  gap: 12px;
  padding: 14px;
}

.qbc-avatar {
  align-items: center;
  background: var(--qbc-primary);
  border-radius: 8px;
  color: #fff;
  display: grid;
  flex: 0 0 40px;
  font-size: 16px;
  font-weight: 700;
  height: 40px;
  place-items: center;
  width: 40px;
}

.qbc-heading {
  min-width: 0;
}

.qbc-title {
  color: var(--qbc-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.qbc-subtitle {
  color: var(--qbc-muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.qbc-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--qbc-muted);
  cursor: pointer;
  display: grid;
  height: 36px;
  margin-left: auto;
  place-items: center;
  width: 36px;
}

.qbc-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}

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

.qbc-message[data-role="assistant"] {
  align-self: flex-start;
  background: #f2f4f7;
}

.qbc-message[data-role="user"] {
  align-self: flex-end;
  background: var(--qbc-primary);
  color: #fff;
}

.qbc-message a {
  color: inherit;
  font-weight: 700;
}

.qbc-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.qbc-chip {
  background: var(--qbc-soft);
  border: 1px solid #cce5ff;
  border-radius: 999px;
  color: var(--qbc-primary-strong);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  min-height: 32px;
  padding: 7px 10px;
}

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

.qbc-input {
  border: 1px solid var(--qbc-border);
  border-radius: 8px;
  color: var(--qbc-text);
  flex: 1;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-height: 116px;
  min-height: 42px;
  padding: 10px 12px;
  resize: none;
}

.qbc-input:focus {
  border-color: var(--qbc-primary);
  outline: none;
}

.qbc-send {
  align-items: center;
  background: var(--qbc-primary);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
}

.qbc-send:disabled {
  cursor: wait;
  opacity: 0.65;
}

.qbc-status {
  color: var(--qbc-muted);
  font-size: 12px;
  min-height: 18px;
  padding: 0 16px 10px;
}

@media (max-width: 480px) {
  .qbc-root {
    bottom: 14px;
    right: 14px;
  }

  .qbc-panel {
    bottom: 64px;
    height: min(600px, calc(100vh - 92px));
    width: calc(100vw - 28px);
  }

  .qbc-launcher span {
    display: none;
  }
}
