.av-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1200; font-family: var(--font-body, 'Inter', sans-serif); }
.av-chat-toggle {
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: linear-gradient(150deg, #ecc95f, #d4af37);
  color: #191002; font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.85), 0 0 30px -12px rgba(212, 175, 55, 0.7);
}
.av-chat-toggle.open { font-size: 24px; line-height: 1; }
.av-chat-panel {
  position: absolute; right: 0; bottom: 72px;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, #0d1628f5, #070c18fa);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 18px;
  box-shadow: 0 28px 70px -20px rgba(0, 0, 0, 0.95), 0 0 50px -30px rgba(212, 175, 55, 0.5);
  overflow: hidden;
  backdrop-filter: blur(18px);
}
/* JS ставит panel.hidden, но display:flex выше перекрывает атрибут [hidden] —
   без этого правила панель видна сразу и не закрывается. */
.av-chat-panel[hidden] { display: none; }
.av-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(212, 175, 55, 0.14); }
.av-chat-title { font-weight: 700; color: #eae7df; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.av-chat-title span { font-weight: 400; color: #8d8a80; font-size: 11px; }
.av-chat-close { border: 0; background: transparent; color: #a7a49a; font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.av-chat-messages { flex: 1 1 auto; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.av-chat-msg { max-width: 85%; padding: 9px 12px; border-radius: 13px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.av-chat-msg.in { align-self: flex-start; background: rgba(13, 22, 42, 0.95); border: 1px solid rgba(212, 175, 55, 0.12); color: #eae7df; border-bottom-left-radius: 4px; }
.av-chat-msg.out { align-self: flex-end; background: rgba(212, 175, 55, 0.16); border: 1px solid rgba(212, 175, 55, 0.3); color: #f4efdf; border-bottom-right-radius: 4px; }
.av-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(212, 175, 55, 0.12); }
.av-chat-form textarea {
  flex: 1 1 auto; resize: none; min-height: 44px; max-height: 110px;
  background: rgba(7, 12, 24, 0.9); color: #eae7df; font: inherit; font-size: 13.5px;
  border: 1px solid rgba(212, 175, 55, 0.22); border-radius: 11px; padding: 9px 10px;
}
.av-chat-form textarea:focus { outline: 2px solid rgba(212, 175, 55, 0.35); outline-offset: 1px; }
.av-chat-form button {
  align-self: flex-end; border: 0; border-radius: 11px; padding: 10px 14px;
  background: linear-gradient(150deg, #ecc95f, #d4af37); color: #191002; font-weight: 700; font-size: 13px; cursor: pointer;
}
.av-chat-form button:disabled { opacity: 0.55; cursor: default; }
.av-chat-note { padding: 0 14px 12px; color: #6f6c64; font-size: 10.5px; line-height: 1.35; }
@media (max-width: 520px) {
  .av-chat { right: 12px; bottom: 12px; }
  .av-chat-panel { right: -4px; bottom: 66px; }
}
