/* ---------- FAQ-чат на жёлтом фоне ---------- */
.fq-chat { display: grid; }
@keyframes fq-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes fq-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }

.fq-chat__win { background: #fff; border-radius: 28px; overflow: hidden; display: grid; height: 560px;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "side top" "side body";
  box-shadow: 0 40px 80px -40px rgba(29, 29, 63, .6), 0 0 0 1px rgba(255, 255, 255, .8); }
.fq-chat__side { grid-area: side; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #eef0f7; background: #fff; }
.fq-chat__hint { margin: 0; padding: 22px 20px 10px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b6d88; }
.fq-chat__top { grid-area: top; }
.fq-chat__body { grid-area: body; }
.fq-chat__top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef0f7; }
.fq-chat__av { width: 42px; height: 42px; border-radius: 14px; background: var(--blue); display: grid; place-items: center; flex: none; }
.fq-chat__av { color: var(--yellow, #ffd200); font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.fq-chat__top b { display: block; font-size: 15px; }
.fq-chat__top small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6b6d88; }
.fq-chat__top small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #29c941; box-shadow: 0 0 0 3px rgba(41, 201, 65, .18); }
.fq-chat__body { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #f6f7fc; overscroll-behavior: contain; }
.fq-msg { margin: 0; max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.55; animation: fq-pop .35s cubic-bezier(.2, .8, .2, 1) both; }
.fq-msg--bot { align-self: flex-start; background: #fff; border: 1px solid #eceef6; border-bottom-left-radius: 6px; color: #1d1d3f; }
.fq-msg--me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.fq-msg--typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.fq-msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9cb8; animation: fq-dot 1s infinite; }
.fq-msg--typing i:nth-child(2) { animation-delay: .15s; }
.fq-msg--typing i:nth-child(3) { animation-delay: .3s; }
.fq-chat__chips { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 10px 14px; overscroll-behavior: contain; }
.fq-chip { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; color: #1d1d3f; border-radius: 14px; padding: 11px 12px; min-height: 44px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; transition: background-color .2s, color .2s; }
.fq-chip::after { content: ""; width: 7px; height: 7px; flex: none; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .35; transition: opacity .2s, transform .2s; }
.fq-chip:hover { background: #f1f2fa; color: var(--blue); }
.fq-chip:hover::after { opacity: .8; transform: translateX(2px) rotate(45deg); }
.fq-chip.is-used:not(.is-active) { color: #6b6d88; }
.fq-chip.is-active { background: var(--blue); color: #fff; }
.fq-chip.is-active::after { opacity: 1; }
.fq-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

@media (max-width: 1024px) {
  .fq-chat__win { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); }
}
/* телефон: вопросы лентой над перепиской */
@media (max-width: 640px) {
  .fq-chat__win { height: 580px; border-radius: 22px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top" "side" "body"; }
  .fq-chat__side { border-right: 0; border-bottom: 1px solid #eef0f7; }
  .fq-chat__hint { display: none; }
  .fq-chat__chips { flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 12px 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .fq-chat__chips::-webkit-scrollbar { display: none; }
  .fq-chip { width: auto; flex: none; white-space: nowrap; border: 1px solid rgba(52, 51, 154, .25); border-radius: 999px; padding: 9px 14px; scroll-snap-align: start; }
  .fq-chip::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fq-msg { animation: none; }
}
