.faqChat {
  --faq-color-primary: #2f4f4f;
  --faq-color-accent: #c97a3d;
  --faq-color-bg: #f7f4ee;
  --faq-color-bot-bubble: #ffffff;
  --faq-color-button: #3f5f5f;
  --faq-color-typing-dot: #7d8680;
  --faq-offset-x: 20px;
  --faq-offset-y: 20px;
  --faq-mobile-safe-bottom: 16px;
  position: fixed;
  z-index: 4100;
  pointer-events: none;
}

.faqChat--desktop-bottom-right {
  right: var(--faq-offset-x);
  bottom: var(--faq-offset-y);
}

.faqChat--desktop-bottom-left {
  left: var(--faq-offset-x);
  bottom: var(--faq-offset-y);
}

.faqChat--desktop-mid-right {
  right: var(--faq-offset-x);
  bottom: 50%;
  transform: translateY(50%);
}

.faqChat--mobile-bottom-right {
  right: 10px;
  bottom: var(--faq-mobile-safe-bottom);
}

.faqChat--mobile-bottom-left {
  left: 16px;
  bottom: var(--faq-mobile-safe-bottom);
}

.faqChat--mobile-mid-right {
  right: 8px;
  bottom: 50%;
  transform: translateY(50%);
}

.faqChat__toggle {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--faq-color-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.faqChat__toggle:focus-visible,
.faqChat__choice:focus-visible,
.faqChat__action:focus-visible,
.faqChat__close:focus-visible {
  outline: 2px solid #1f6fb1;
  outline-offset: 2px;
}

.faqChat__panel {
  pointer-events: auto;
  width: 350px;
  max-height: 560px;
  background: var(--faq-color-bg);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  display: none;
  margin-top: 8px;
}

.faqChat.is-open .faqChat__panel {
  display: block;
}

.faqChat.is-open .faqChat__toggle {
  display: none;
}

.faqChat__head {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--faq-color-primary);
  color: #fff;
}

.faqChat__title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.faqChat__close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.faqChat__body {
  max-height: 516px;
  overflow: auto;
  padding: 12px;
}

.faqChat__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faqChat__item {
  margin-bottom: 12px;
  font-size: 13px;
}

.faqChat__item--user {
  text-align: right;
}

.faqChat__bubble {
  display: inline-block;
  text-align: left;
  max-width: 88%;
  line-height: 1.55;
  white-space: pre-line;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}

.faqChat__item--user .faqChat__bubble {
  background: var(--faq-color-primary);
  color: #fff;
}

.faqChat__bubble--typing {
  min-width: 56px;
}

.faqChat__choices {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.faqChat__choices li + li {
  margin-top: 6px;
}

.faqChat__choice,
.faqChat__action {
  width: 100%;
  border: 1px solid var(--faq-color-button);
  border-radius: 6px;
  background: #fff;
  color: var(--faq-color-button);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
}

.faqChat__choice:hover,
.faqChat__action:hover {
  background: var(--faq-color-accent);
  border-color: var(--faq-color-accent);
  color: #fff;
}

.faqChat__choice:disabled,
.faqChat__action:disabled {
  opacity: 0.45;
  cursor: default;
}

.faqChat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.faqChat__typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--faq-color-typing-dot);
  animation: faqTyping 1s ease-in-out infinite;
}

.faqChat__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.faqChat__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

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

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

@media (max-width: 767px) {
  .faqChat__panel {
    width: min(92vw, 340px);
    max-height: 470px;
  }

  .faqChat__body {
    max-height: 426px;
  }
}
