.faqbot {
  --faqbot-z: 9999;
  --faqbot-radius: 16px;
  --faqbot-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  --faqbot-border: 1px solid rgba(0, 0, 0, 0.14);
  --faqbot-gap: 12px;
  --faqbot-font: inherit;

  font-family: var(--faqbot-font);
  color: #212121;
}

.faqbot__fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--faqbot-z);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: var(--faqbot-border);
  background: #fff;
  box-shadow: var(--faqbot-shadow);
  cursor: pointer;
}

.faqbot__fab:focus-visible,
.faqbot__close:focus-visible,
.faqbot__topicsOpen:focus-visible,
.faqbot__topicsBack:focus-visible,
.faqbot__topicGroupButton:focus-visible,
.faqbot__reset:focus-visible,
.faqbot__chip:focus-visible,
.faqbot__send:focus-visible,
.faqbot__input:focus-visible,
.faqbot__btn:focus-visible {
  outline: 3px solid #1f4e79;
  outline-offset: 2px;
}

.faqbot__fabIcon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: var(--faqbot-border);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.faqbot__fabIcon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.faqbot__fabIcon svg[data-faqbot-icon-style="stroke"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faqbot__fabIcon svg[data-faqbot-icon-style="fill"] {
  fill: currentColor;
  stroke: none;
}

.faqbot__fabLabel {
  font-size: 14px;
  line-height: 1;
}

.faqbot__panel {
  position: fixed;
  right: 16px;
  bottom: 76px;
  z-index: var(--faqbot-z);
  width: min(420px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: var(--faqbot-radius);
  border: var(--faqbot-border);
  background: #fff;
  box-shadow: var(--faqbot-shadow);
  overflow: hidden;
}

.faqbot__panel[hidden] {
  display: none !important;
}

.faqbot[data-mode="embedded"] .faqbot__panel {
  position: relative;
  right: auto;
  bottom: auto;
  width: min(100%, 620px);
  height: 640px;
  margin: 0;
}

.faqbot__header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: var(--faqbot-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--faqbot-gap);
  padding: 14px 14px 10px;
}

.faqbot__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.faqbot__subtitle {
  font-size: 13px;
  margin-top: 3px;
  opacity: 0.84;
}

.faqbot__close {
  border: var(--faqbot-border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.faqbot__headerActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faqbot__body {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--faqbot-gap);
  padding: var(--faqbot-gap);
  overflow: hidden;
}

.faqbot__srLive {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.faqbot__card {
  border: var(--faqbot-border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.faqbot__welcomeText {
  margin: 0 0 10px;
  font-size: 14px;
}

.faqbot__hint {
  margin: 0 0 6px;
  font-size: 12px;
  opacity: 0.85;
}

.faqbot__hint--inline {
  margin-top: 10px;
  margin-bottom: 0;
}

.faqbot__start[hidden] {
  display: none !important;
}

.faqbot__topicsView[hidden] {
  display: none !important;
}

.faqbot__sectionTitle {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 10px 0 8px;
  opacity: 0.72;
}

.faqbot__chipsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.faqbot__start,
.faqbot__topicsView,
.faqbot__stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.faqbot__topicsLauncher {
  margin-top: 10px;
}

.faqbot__topicsOpen,
.faqbot__topicsBack {
  width: 100%;
  border: var(--faqbot-border);
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.faqbot__topicsBack {
  margin-bottom: 10px;
}

.faqbot__topicsBack--inline {
  margin-bottom: 12px;
}

.faqbot__topicsListScreen[hidden],
.faqbot__topicDetail[hidden] {
  display: none !important;
}

.faqbot__topics {
  margin-top: 2px;
}

.faqbot__topicsList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faqbot__topicGroupButton {
  border: var(--faqbot-border);
  border-radius: 12px;
  min-height: 52px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.faqbot__topicGroupLabel {
  font-size: 14px;
  font-weight: 700;
}

.faqbot__topicGroupCount {
  font-size: 12px;
  opacity: 0.8;
}

.faqbot__topicsList--questions {
  gap: 10px;
}

.faqbot__chip--full {
  width: 100%;
  text-align: left;
  border-radius: 12px;
}

.faqbot__topicDetail {
  border: var(--faqbot-border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.faqbot__chipsRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.faqbot__chip {
  border: var(--faqbot-border);
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.faqbot__stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faqbot__stream[hidden] {
  display: none !important;
}

.faqbot__msg {
  display: flex;
}

.faqbot__msg--user {
  justify-content: flex-end;
}

.faqbot__msg--bot {
  justify-content: flex-start;
}

.faqbot__bubble {
  max-width: 88%;
  border: var(--faqbot-border);
  border-radius: 16px;
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.faqbot__msg--user .faqbot__bubble {
  background: #edf5ff;
  border-color: rgba(31, 78, 121, 0.35);
}

.faqbot__msgTitle {
  font-weight: 700;
  margin-bottom: 6px;
}

.faqbot__msgHtml p {
  margin: 0 0 8px;
}

.faqbot__msgHtml p:last-child {
  margin-bottom: 0;
}

.faqbot__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faqbot__btn {
  border: var(--faqbot-border);
  border-radius: 999px;
  min-height: 40px;
  padding: 10px 12px;
  font-size: 13px;
  text-decoration: none;
  color: #212121;
  background: #fff;
}

.faqbot__btn--primary {
  background: #1f4e79;
  color: #fff;
  border-color: #1f4e79;
}

.faqbot__btn--disabled,
.faqbot__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.faqbot__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.faqbot__loading[hidden] {
  display: none !important;
}

.faqbot__loadingDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1f4e79;
  animation: faqbot-pulse 1.2s ease-in-out infinite;
}

.faqbot__composer {
  border-top: var(--faqbot-border);
  padding: 10px 12px 12px;
  background: #fff;
}

.faqbot__reset {
  width: 100%;
  border: var(--faqbot-border);
  border-radius: 10px;
  min-height: 40px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.faqbot__reset[hidden] {
  display: none !important;
}

.faqbot__inputLabel {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.faqbot__inputLabel[hidden] {
  display: none !important;
}

.faqbot__inputRow {
  display: flex;
  gap: 8px;
}

.faqbot__inputRow[hidden] {
  display: none !important;
}

.faqbot__input {
  flex: 1 1 auto;
  min-height: 42px;
  border-radius: 10px;
  border: var(--faqbot-border);
  padding: 0 12px;
  font-size: 14px;
}

.faqbot__send {
  width: 44px;
  min-width: 44px;
  min-height: 42px;
  border-radius: 10px;
  border: var(--faqbot-border);
  background: #1f4e79;
  color: #fff;
  cursor: pointer;
}

.faqbot__send[disabled],
.faqbot__input[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.faqbot__chip[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.faqbot--rate-limited .faqbot__composerHint {
  opacity: 0.95;
  font-weight: 600;
}

.faqbot__composerHint {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.75;
}

@keyframes faqbot-pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .faqbot__fab {
    right: 12px;
    bottom: 12px;
  }

  .faqbot__panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: min(90vh, 720px);
    border-radius: 16px 16px 0 0;
  }

  .faqbot[data-mode="embedded"] .faqbot__panel {
    width: 100%;
    height: min(82vh, 720px);
    border-radius: 12px;
  }

  .faqbot__chipsGrid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faqbot__loadingDot {
    animation: none;
  }
}
