#bxfaq {
  --bxfaq-bg: #1D2300;
  --bxfaq-surface: #262E03;
  --bxfaq-surface-2: #313A08;
  --bxfaq-line: rgba(211, 254, 3, .14);
  --bxfaq-lime: #D3FE03;
  --bxfaq-lime-ink: #1D2300;
  --bxfaq-text: #F2F6E4;
  --bxfaq-muted: rgba(242, 246, 228, .62);
  --bxfaq-font: "DoranNoEn-Medium", "DoranMedium", Vazirmatn, Tahoma, sans-serif;
  --bxfaq-launcher: 60px;
  --bxfaq-side: 24px;
  --bxfaq-w: 380px;
  --bxfaq-h: 600px;
  --bxfaq-radius: 22px;
  --bxfaq-z: 99990;
  --bxfaq-ease: cubic-bezier(.2, .9, .25, 1.15);
  position: fixed;
  bottom: var(--bxfaq-offset, 24px);
  z-index: var(--bxfaq-z);
  font-family: var(--bxfaq-font);
  direction: rtl;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

#bxfaq[data-pos="left"] { left: var(--bxfaq-side); }
#bxfaq[data-pos="right"] { right: var(--bxfaq-side); }

#bxfaq *, #bxfaq *::before, #bxfaq *::after { box-sizing: border-box; }

#bxfaq button {
  font: inherit;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  line-height: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#bxfaq svg { display: block; width: 100%; height: 100%; }

#bxfaq .bxfaq-launcher {
  position: relative;
  width: var(--bxfaq-launcher);
  height: var(--bxfaq-launcher);
  padding: 0;
  border-radius: 50%;
  background: var(--bxfaq-lime);
  color: var(--bxfaq-lime-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(29, 35, 0, .35), 0 0 0 0 rgba(211, 254, 3, .55);
  transition: transform .35s var(--bxfaq-ease), box-shadow .3s ease;
  animation: bxfaq-ring 2.8s ease-out 1.5s 3;
}

#bxfaq .bxfaq-launcher:hover { transform: scale(1.07); }
#bxfaq .bxfaq-launcher:active { transform: scale(.94); }
#bxfaq .bxfaq-launcher:focus-visible { outline: 3px solid var(--bxfaq-bg); outline-offset: 3px; }

#bxfaq .bxfaq-ic {
  position: absolute;
  width: 28px;
  height: 28px;
  transition: transform .4s var(--bxfaq-ease), opacity .25s ease;
}

#bxfaq .bxfaq-ic.is-x { opacity: 0; transform: rotate(-90deg) scale(.6); width: 24px; height: 24px; }
#bxfaq.is-open .bxfaq-ic.is-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
#bxfaq.is-open .bxfaq-ic.is-x { opacity: 1; transform: none; }
#bxfaq.is-open .bxfaq-launcher { animation: none; }

#bxfaq .bxfaq-nudge {
  position: absolute;
  bottom: calc(var(--bxfaq-launcher) / 2 - 20px);
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bxfaq-bg);
  color: var(--bxfaq-text);
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  border: 1px solid var(--bxfaq-line);
  opacity: 0;
  pointer-events: none;
  transform: translateX(var(--bxfaq-nudge-x, -8px)) scale(.92);
  transition: opacity .3s ease, transform .4s var(--bxfaq-ease);
}

#bxfaq[data-pos="left"] .bxfaq-nudge { left: calc(var(--bxfaq-launcher) + 12px); --bxfaq-nudge-x: -8px; }
#bxfaq[data-pos="right"] .bxfaq-nudge { right: calc(var(--bxfaq-launcher) + 12px); --bxfaq-nudge-x: 8px; }
#bxfaq .bxfaq-nudge.is-show { opacity: 1; pointer-events: auto; transform: none; }

#bxfaq .bxfaq-panel {
  position: absolute;
  bottom: calc(var(--bxfaq-launcher) + 14px);
  width: var(--bxfaq-w);
  height: min(var(--bxfaq-h), calc(100vh - var(--bxfaq-launcher) - var(--bxfaq-offset, 24px) - 40px));
  height: min(var(--bxfaq-h), calc(100dvh - var(--bxfaq-launcher) - var(--bxfaq-offset, 24px) - 40px));
  display: flex;
  flex-direction: column;
  background: var(--bxfaq-bg);
  color: var(--bxfaq-text);
  border-radius: var(--bxfaq-radius);
  border: 1px solid var(--bxfaq-line);
  box-shadow: 0 24px 60px rgba(10, 13, 0, .45);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.96);
  transition: opacity .25s ease, transform .4s var(--bxfaq-ease), visibility 0s linear .4s;
}

#bxfaq[data-pos="left"] .bxfaq-panel { left: 0; transform-origin: bottom left; }
#bxfaq[data-pos="right"] .bxfaq-panel { right: 0; transform-origin: bottom right; }

#bxfaq.is-open .bxfaq-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s ease, transform .4s var(--bxfaq-ease), visibility 0s;
}

#bxfaq .bxfaq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--bxfaq-surface) 0%, var(--bxfaq-bg) 100%);
  border-bottom: 1px solid var(--bxfaq-line);
  flex-shrink: 0;
}

#bxfaq .bxfaq-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bxfaq-lime);
  color: var(--bxfaq-lime-ink);
  display: grid;
  place-items: center;
  padding: 9px;
  overflow: hidden;
  flex-shrink: 0;
}

#bxfaq .bxfaq-avatar img {
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  max-width: none;
  margin: -9px;
  object-fit: cover;
  display: block;
}

#bxfaq .bxfaq-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#bxfaq .bxfaq-head-txt strong { font-size: 15.5px; font-weight: normal; color: var(--bxfaq-text); line-height: 1.5; }

#bxfaq .bxfaq-head-txt span {
  font-size: 12.5px;
  color: var(--bxfaq-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bxfaq .bxfaq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bxfaq-lime);
  box-shadow: 0 0 0 3px rgba(211, 254, 3, .18);
  flex-shrink: 0;
}

#bxfaq .bxfaq-close {
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 12px;
  color: var(--bxfaq-muted);
  transition: background .2s ease, color .2s ease;
  flex-shrink: 0;
}

#bxfaq .bxfaq-close:hover { background: var(--bxfaq-surface-2); color: var(--bxfaq-text); }
#bxfaq .bxfaq-close:focus-visible { outline: 2px solid var(--bxfaq-lime); outline-offset: 1px; }

#bxfaq .bxfaq-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--bxfaq-surface-2) transparent;
}

#bxfaq .bxfaq-body::-webkit-scrollbar { width: 6px; }
#bxfaq .bxfaq-body::-webkit-scrollbar-thumb { background: var(--bxfaq-surface-2); border-radius: 6px; }

#bxfaq .bxfaq-msg { display: flex; max-width: 100%; }
#bxfaq .bxfaq-msg.is-bot { justify-content: flex-start; }
#bxfaq .bxfaq-msg.is-user { justify-content: flex-end; }

#bxfaq .bxfaq-bubble {
  max-width: 88%;
  padding: 11px 15px;
  font-size: 14px;
  border-radius: 18px;
  overflow-wrap: anywhere;
}

#bxfaq .is-bot .bxfaq-bubble {
  background: var(--bxfaq-surface);
  color: var(--bxfaq-text);
  border: 1px solid var(--bxfaq-line);
  border-top-right-radius: 6px;
}

#bxfaq .is-user .bxfaq-bubble {
  background: var(--bxfaq-lime);
  color: var(--bxfaq-lime-ink);
  border-top-left-radius: 6px;
}

#bxfaq .bxfaq-bubble p { margin: 0 0 .6em; color: inherit; font-size: inherit; line-height: inherit; }
#bxfaq .bxfaq-bubble p:last-child { margin-bottom: 0; }
#bxfaq .bxfaq-bubble ul, #bxfaq .bxfaq-bubble ol { margin: .3em 0 .6em; padding: 0 1.2em 0 0; }
#bxfaq .bxfaq-bubble li { margin: 0 0 .25em; }
#bxfaq .bxfaq-bubble strong, #bxfaq .bxfaq-bubble b { color: var(--bxfaq-lime); font-weight: normal; }
#bxfaq .is-user .bxfaq-bubble strong { color: inherit; }
#bxfaq .bxfaq-bubble a { color: var(--bxfaq-lime); text-decoration: underline; text-underline-offset: 3px; }
#bxfaq .bxfaq-bubble img { max-width: 100%; height: auto; border-radius: 10px; }

#bxfaq .bxfaq-bubble table { width: 100%; border-collapse: collapse; margin: .4em 0; font-size: 13px; }
#bxfaq .bxfaq-bubble th, #bxfaq .bxfaq-bubble td { border: 1px solid var(--bxfaq-line); padding: 6px 8px; text-align: right; }
#bxfaq .bxfaq-bubble th { background: var(--bxfaq-surface-2); font-weight: normal; }

#bxfaq .is-typing .bxfaq-bubble { display: flex; gap: 5px; padding: 15px 16px; }

#bxfaq .is-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bxfaq-lime);
  opacity: .35;
  animation: bxfaq-blink 1.1s infinite ease-in-out;
}

#bxfaq .is-typing i:nth-child(2) { animation-delay: .15s; }
#bxfaq .is-typing i:nth-child(3) { animation-delay: .3s; }

#bxfaq .bxfaq-msg.is-in { animation: bxfaq-in .38s var(--bxfaq-ease) both; }

#bxfaq .bxfaq-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  padding-bottom: 6px;
}

#bxfaq .bxfaq-chips-label { font-size: 12.5px; color: var(--bxfaq-muted); margin: 6px 4px 2px; }

#bxfaq .bxfaq-chip {
  max-width: 100%;
  text-align: right;
  padding: 9px 15px;
  font-size: 13.5px;
  line-height: 1.6;
  border-radius: 14px;
  border: 1px solid rgba(211, 254, 3, .45);
  color: var(--bxfaq-lime);
  background: rgba(211, 254, 3, .04);
  transition: background .2s ease, color .2s ease, transform .25s var(--bxfaq-ease), border-color .2s ease;
}

#bxfaq .bxfaq-chip:hover { background: var(--bxfaq-lime); color: var(--bxfaq-lime-ink); border-color: var(--bxfaq-lime); transform: translateX(-3px); }
#bxfaq .bxfaq-chip:active { transform: scale(.97); }
#bxfaq .bxfaq-chip:focus-visible { outline: 2px solid var(--bxfaq-lime); outline-offset: 2px; }
#bxfaq .bxfaq-chip.is-asked { border-color: var(--bxfaq-line); color: var(--bxfaq-muted); background: transparent; }
#bxfaq .bxfaq-chip.is-asked:hover { background: var(--bxfaq-surface-2); color: var(--bxfaq-text); border-color: var(--bxfaq-surface-2); }

#bxfaq .bxfaq-chips.is-in .bxfaq-chip {
  animation: bxfaq-in .4s var(--bxfaq-ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

#bxfaq .bxfaq-foot { padding: 10px 14px 14px; border-top: 1px solid var(--bxfaq-line); flex-shrink: 0; }

#bxfaq .bxfaq-support {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bxfaq-surface);
  color: var(--bxfaq-text);
  font-size: 13px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

#bxfaq .bxfaq-support svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--bxfaq-lime); }
#bxfaq .bxfaq-support:hover { background: var(--bxfaq-lime); color: var(--bxfaq-lime-ink); }
#bxfaq .bxfaq-support:hover svg { color: var(--bxfaq-lime-ink); }

@keyframes bxfaq-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes bxfaq-blink {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@keyframes bxfaq-ring {
  0% { box-shadow: 0 10px 28px rgba(29, 35, 0, .35), 0 0 0 0 rgba(211, 254, 3, .55); }
  70% { box-shadow: 0 10px 28px rgba(29, 35, 0, .35), 0 0 0 16px rgba(211, 254, 3, 0); }
  100% { box-shadow: 0 10px 28px rgba(29, 35, 0, .35), 0 0 0 0 rgba(211, 254, 3, 0); }
}

@media (max-width: 520px) {
  #bxfaq {
    --bxfaq-launcher: 54px;
    --bxfaq-side: 16px;
    bottom: var(--bxfaq-offset-m, 90px);
  }

  #bxfaq .bxfaq-nudge { font-size: 12.5px; padding: 8px 13px; }

  #bxfaq .bxfaq-panel {
    position: fixed;
    left: 0 !important;
    right: 0 !important;
    bottom: 0;
    width: 100%;
    height: 82vh;
    height: 82dvh;
    border-radius: var(--bxfaq-radius) var(--bxfaq-radius) 0 0;
    border-bottom: 0;
    transform: translateY(100%);
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, visibility 0s linear .42s;
    padding-bottom: env(safe-area-inset-bottom);
  }

  #bxfaq.is-open .bxfaq-panel {
    transform: none;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, visibility 0s;
  }

  #bxfaq.is-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 13, 0, .55);
    animation: bxfaq-fade .3s ease both;
  }

  #bxfaq.is-open .bxfaq-launcher { opacity: 0; pointer-events: none; transform: scale(.6); }
  #bxfaq .bxfaq-bubble { max-width: 92%; }
}

@keyframes bxfaq-fade { from { opacity: 0; } to { opacity: 1; } }

html.bxfaq-lock, html.bxfaq-lock body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
  #bxfaq *, #bxfaq *::before, #bxfaq *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
