.faq-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(380px, calc(100vw - 36px));
  font-family: Arial, Helvetica, sans-serif;
}

.faq-chat__toggle,
.faq-chat__send {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: #17130a;
  font-weight: 850;
  cursor: pointer;
}

.faq-chat__send:disabled,
.faq-chat__input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.faq-chat__toggle {
  float: right;
  padding: 12px 16px;
  box-shadow: 0 16px 34px rgba(10, 24, 54, 0.22);
}

.faq-chat__panel {
  clear: both;
  display: none;
  overflow: hidden;
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(10, 24, 54, 0.2);
}

.faq-chat.is-open .faq-chat__panel {
  display: block;
}

.faq-chat__header {
  padding: 16px;
  background: var(--navy);
  color: var(--white);
}

.faq-chat__header h2 {
  margin: 0;
  color: var(--white);
  font-size: 1rem;
}

.faq-chat__header p {
  margin: 6px 0 0;
  color: #e7e9f0;
  font-size: 0.86rem;
}

.faq-chat__messages {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding: 14px;
  background: #f7f8fb;
}

.faq-chat__message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.42;
}

.faq-chat__message--bot {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

.faq-chat__message--user {
  justify-self: end;
  max-width: 86%;
  background: var(--navy);
  color: var(--white);
}

.faq-chat__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.faq-chat__input {
  min-height: 46px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

.faq-chat__send {
  padding: 10px 14px;
}

@media (max-width: 720px) {
  .faq-chat {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .faq-chat__messages {
    max-height: 300px;
  }
}
