/* Keyless guided FAQ widget.
   Palette matches the site: brand blue #1f12fd, greys #767676 / #e1e1e1 / #f4f8ff.
   No frameworks, no fonts, no images — nothing to load. */

.zfaq {
  --zfaq-brand: #1f12fd;
  --zfaq-ink: #16161d;
  --zfaq-muted: #767676;
  --zfaq-line: #e1e1e1;
  --zfaq-tint: #f4f8ff;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: inherit;
}

/* ---------- launcher ---------- */
.zfaq-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--zfaq-brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(31, 18, 253, .32);
  transition: transform .18s ease, box-shadow .18s ease;
}
.zfaq-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 18, 253, .4); }
.zfaq-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.zfaq-launcher-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  font-weight: 700;
}
.zfaq--open .zfaq-launcher { visibility: hidden; opacity: 0; pointer-events: none; }

/* ---------- panel ---------- */
.zfaq-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 1px solid var(--zfaq-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(16, 16, 32, .22);
  overflow: hidden;
  animation: zfaq-rise .2s ease-out;
}
.zfaq-panel[hidden] { display: none; }

@keyframes zfaq-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.zfaq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--zfaq-brand);
  color: #fff;
}
.zfaq-title { margin: 0; font-size: 15px; font-weight: 600; color: #fff;}
.zfaq-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.zfaq-close:hover { background: rgba(255, 255, 255, .3); }
.zfaq-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- transcript ---------- */
.zfaq-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--zfaq-tint);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zfaq-msg { display: flex; }
.zfaq-msg--user { justify-content: flex-end; }
.zfaq-bubble {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--zfaq-ink);
  background: #fff;
  border: 1px solid var(--zfaq-line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.zfaq-msg--user .zfaq-bubble {
  background: var(--zfaq-brand);
  border-color: var(--zfaq-brand);
  color: #fff;
}
.zfaq-note {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--zfaq-line);
  font-size: 12.5px;
  color: var(--zfaq-muted);
}
.zfaq-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--zfaq-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.zfaq-cta:focus-visible { outline: 3px solid var(--zfaq-brand); outline-offset: 3px; }

/* ---------- chips + form ---------- */
.zfaq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
  border-top: 1px solid var(--zfaq-line);
  background: #fff;
}
.zfaq-chip {
  padding: 7px 12px;
  border: 1px solid var(--zfaq-line);
  border-radius: 999px;
  background: #fff;
  color: var(--zfaq-ink);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.zfaq-chip:hover { border-color: var(--zfaq-brand); color: var(--zfaq-brand); background: var(--zfaq-tint); }
.zfaq-chip:focus-visible { outline: 3px solid var(--zfaq-brand); outline-offset: 2px; }

.zfaq-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
}
.zfaq-input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--zfaq-line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--zfaq-ink);
}
.zfaq-input:focus-visible { outline: 3px solid var(--zfaq-brand); outline-offset: 1px; border-color: var(--zfaq-brand); }
.zfaq-send {
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--zfaq-brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.zfaq-send:focus-visible { outline: 3px solid var(--zfaq-brand); outline-offset: 2px; }

.zfaq-foot {
  margin: 0;
  padding: 0 16px 12px;
  background: #fff;
  font-size: 11.5px;
  color: var(--zfaq-muted);
}

.zfaq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- mobile ---------- */
@media (max-width: 480px) {
  .zfaq { right: 12px; bottom: 12px; left: 12px; }
  .zfaq-launcher { width: 100%; justify-content: center; }
  .zfaq-panel {
    right: 0;
    left: 0;
    width: auto;
    max-width: none;
    height: min(78vh, 620px);
    max-height: calc(100vh - 24px);
  }
  .zfaq-bubble { max-width: 92%; }
  .zfaq-chip { flex: 1 1 auto; text-align: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .zfaq-panel { animation: none; }
  .zfaq-launcher { transition: none; }
  .zfaq-launcher:hover { transform: none; }
}
