#faqcb-root {
  --c: var(--faqcb-color, #6d28d9);
  --faqcb-ink: #29282c;
  --faqcb-muted: #69666c;
  --faqcb-soft: #817d83;
  --faqcb-line: #e6e2e1;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#faqcb-root * { box-sizing: border-box; }
.faqcb-toggle {
  position: fixed; bottom: 20px; width: 58px; height: 58px; border: 0; border-radius: 50%;
  background: var(--c); color: var(--faqcb-icon-color, #fff); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 99999;
}
.faqcb-toggle-icon { display: block; width: 27px; height: 27px; margin: auto; background-color: currentColor; -webkit-mask: url('message.svg') center / contain no-repeat; mask: url('message.svg') center / contain no-repeat; transition: transform 320ms cubic-bezier(.22, 1, .36, 1); }
.faqcb-toggle:active { transform: scale(.92); }
#faqcb-root:has(.faqcb-open) .faqcb-toggle-icon { -webkit-mask-image: url('close.svg'); mask-image: url('close.svg'); transform: scale(.72); }
.faqcb-right .faqcb-toggle { right: 20px; }
.faqcb-left .faqcb-toggle { left: 20px; }
.faqcb-panel {
  position: fixed; bottom: 90px; width: 480px; max-width: calc(100vw - 24px); height: min(700px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--faqcb-line); border-radius: 24px;
  overflow: hidden; box-shadow: 0 10px 36px rgba(25,18,30,.2); z-index: 99999;
  visibility: hidden; opacity: 0; pointer-events: none; transform: scale(.12);
  transform-origin: bottom right;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease, visibility 0s linear 420ms;
  will-change: transform, opacity;
}
.faqcb-right .faqcb-panel { right: 20px; }
.faqcb-left .faqcb-panel { left: 20px; transform-origin: bottom left; }
.faqcb-panel::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 4px; background: var(--c); }
.faqcb-panel.faqcb-open { visibility: visible; opacity: 1; pointer-events: auto; transform: scale(1); transition-delay: 0s; }
.faqcb-header { flex: 0 0 auto; background: #fff; color: var(--faqcb-ink); border-bottom: 1px solid var(--faqcb-line); }
.faqcb-topbar { height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; }
.faqcb-brand, .faqcb-actions, .faqcb-profile { display: flex; align-items: center; }
.faqcb-brand { gap: 10px; min-width: 0; }
.faqcb-brand-logo { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 6px; object-fit: contain; }
.faqcb-brand-name { overflow: hidden; color: var(--faqcb-ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.faqcb-brand-status { display: inline-flex; align-items: center; gap: 6px; color: #34775d; font-size: 12px; white-space: nowrap; }
.faqcb-brand-status::before { width: 7px; height: 7px; border-radius: 50%; background: #3d9b70; content: ""; }
.faqcb-actions { gap: 16px; }
.faqcb-minimize, .faqcb-close { width: 24px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--faqcb-muted); font-size: 28px; line-height: 1; cursor: pointer; }
.faqcb-close { display: grid; place-items: center; }
.faqcb-close-icon { display: block; width: 14px; height: 14px; background-color: currentColor; -webkit-mask: url('close.svg') center / contain no-repeat; mask: url('close.svg') center / contain no-repeat; }
.faqcb-profile { min-height: 90px; padding: 8px 24px 20px; gap: 14px; }
.faqcb-avatar { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; border-radius: 50%; background: #fcf0f1; color: var(--c); font: italic 34px Georgia, serif; }
.faqcb-identity { min-width: 0; flex: 1; }
.faqcb-agent-name { color: var(--faqcb-ink); font-size: 22px; line-height: 1.25; }
.faqcb-agent-status { margin-top: 4px; color: #34775d; font-size: 13px; }
.faqcb-more { color: var(--faqcb-muted); font-size: 19px; letter-spacing: 2px; }
.faqcb-context { min-height: 41px; flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 0 24px; border-top: 1px solid var(--faqcb-line); border-bottom: 1px solid var(--faqcb-line); background: #faf9f8; color: var(--faqcb-muted); font-size: 13px; }
.faqcb-context-mark { color: var(--c); font-size: 20px; font-weight: 700; }
.faqcb-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px; background: #fff; }
.faqcb-date { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; color: var(--faqcb-soft); font-size: 12px; }
.faqcb-date::before, .faqcb-date::after { content: ""; height: 1px; flex: 1; background: var(--faqcb-line); }
.faqcb-intro { margin: 0 0 22px; }
.faqcb-intro-title { color: var(--faqcb-ink); font-size: clamp(22px, 5.8vw, 28px); line-height: 1.25; }
.faqcb-intro-copy { margin-top: 10px; color: var(--faqcb-muted); font-size: 15px; line-height: 1.5; }
.faqcb-message { width: fit-content; max-width: 86%; margin: 0 0 14px; }
.faqcb-message-bot { margin-right: auto; }
.faqcb-message-user { margin-left: auto; }
.faqcb-sender, .faqcb-time { display: none; }
.faqcb-msg { margin: 0; padding: 12px 15px; border-radius: 14px 14px 14px 4px; font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.faqcb-bot { background: #f0f1f3; color: var(--faqcb-ink); }
.faqcb-user { border-radius: 14px 14px 4px 14px; background: #e5f7e9; color: var(--faqcb-ink); }
.faqcb-typing { font-style: italic; opacity: .8; }
.faqcb-options { flex: 0 0 auto; max-height: 42%; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--faqcb-line); background: #fff; }
.faqcb-form { display: flex; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 14px; background: #f2f3f5; }
.faqcb-form:not(:has(.faqcb-input)) { justify-content: flex-end; }
.faqcb-input { flex: 1 1 0; width: 0; min-width: 0; min-height: 44px; border: 0; border-radius: 8px; padding: 10px 12px; background: transparent; font: inherit; font-size: 14px; color: var(--faqcb-ink); resize: vertical; }
.faqcb-input:focus { outline: 2px solid var(--c); outline-offset: -2px; background: #fff; }
.faqcb-field-error { order: 2; flex-basis: 100%; }
.faqcb-form .faqcb-submit { order: 1; }
.faqcb-input-invalid { border-color: #b42318; }
.faqcb-input-invalid:focus { outline-color: #b42318; }
.faqcb-field-error { padding: 10px 12px; border: 1px solid #f0b8b3; border-radius: 10px; background: #fff4f2; color: #8f1d14; font-size: 13px; line-height: 1.45; }
.faqcb-field-error[hidden] { display: none; }
.faqcb-submit { flex: 0 0 auto; align-self: center; min-height: 42px; border: 0; border-radius: 10px; background: #242629; color: #fff; padding: 10px 18px; font-size: 14px; cursor: pointer; }
.faqcb-submit:disabled { opacity: .65; cursor: wait; }
.faqcb-options > .faqcb-option { background: #fff; }
.faqcb-option { text-align: left; background: #fff; border: 1px solid var(--c); color: var(--c); padding: 10px 14px; border-radius: 14px; font-size: 14px; cursor: pointer; }
.faqcb-option:hover { background: var(--c); color: #fff; }
@media (max-width: 520px) {
  .faqcb-panel { inset: 0; width: 100%; height: 100dvh; max-width: none; border-radius: 0; transform-origin: bottom center; transform: scale(.96) translateY(12px); }
  .faqcb-right .faqcb-panel, .faqcb-left .faqcb-panel { right: auto; left: 0; }
  .faqcb-body { padding: 20px 16px; }
  .faqcb-options { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .faqcb-form { gap: 7px; padding: 8px; }
  .faqcb-submit { padding-right: 13px; padding-left: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .faqcb-panel, .faqcb-toggle-icon { transition-duration: .01ms; }
}
@media (min-width: 521px) and (max-height: 700px) {
  .faqcb-panel { height: min(700px, calc(100vh - 110px)); bottom: 90px; }
  .faqcb-right .faqcb-panel { right: 16px; }
  .faqcb-left .faqcb-panel { left: 16px; }
}

