/* Онлайн-консультант. Цвета — из токенов refined.css. */
.pa-fab { position: fixed; right: 24px; bottom: 24px; z-index: 70; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent, #14735c); color: #fff; font: 650 15px/1 var(--f-body, Manrope, system-ui, sans-serif); box-shadow: 0 8px 28px rgba(20, 40, 32, .28); cursor: pointer; transition: background .15s, transform .15s; }
.pa-fab:hover { background: var(--accent-deep, #0b4c3d); }
.pa-fab svg { flex: 0 0 auto; }
.pa-fab__dot { position: absolute; top: 9px; left: 36px; width: 9px; height: 9px; border-radius: 50%; background: #7fe0b5; border: 2px solid var(--accent, #14735c); }
body.pa-open .pa-fab, body.modal-open .pa-fab, body.lb-open .pa-fab { display: none; }

.pa-panel { position: fixed; right: 24px; bottom: 24px; z-index: 75; width: 390px; height: min(640px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: #fff; color: var(--ink, #202522); border: 1px solid var(--line, #dfe5e1); border-radius: 12px; box-shadow: 0 24px 80px rgba(16, 28, 22, .24); overflow: hidden; font-family: var(--f-body, Manrope, system-ui, sans-serif); }
.pa-panel[hidden] { display: none !important; }
body section.pa-panel { padding: 0; margin: 0; }
.pa-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line, #dfe5e1); background: var(--bg-soft, #f4f6f5); }
.pa-head__mark { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; background: var(--accent, #14735c); display: grid; place-items: center; }
.pa-head__txt { flex: 1; min-width: 0; }
.pa-head__title { font-weight: 700; font-size: 15px; line-height: 1.25; }
.pa-head__sub { font-size: 12px; color: var(--muted, #65706a); margin-top: 2px; }
.pa-close { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink, #202522); font-size: 26px; line-height: 1; cursor: pointer; }
.pa-close:hover { background: #e7ece9; }

.pa-log { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.pa-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pa-msg--bot { align-self: flex-start; background: var(--bg-soft, #f4f6f5); border-bottom-left-radius: 4px; }
.pa-msg--user { align-self: flex-end; background: var(--accent, #14735c); color: #fff; border-bottom-right-radius: 4px; }
.pa-msg a { color: var(--accent, #14735c); text-decoration: underline; text-underline-offset: 2px; }
.pa-msg--user a { color: #fff; }
.pa-msg strong { font-weight: 700; }
.pa-typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 13px 14px; background: var(--bg-soft, #f4f6f5); border-radius: 12px; border-bottom-left-radius: 4px; }
.pa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa8a0; animation: pa-blink 1.2s infinite ease-in-out; }
.pa-typing i:nth-child(2) { animation-delay: .2s; }
.pa-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes pa-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.pa-actions { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px; }
.pa-act { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent, #14735c); background: #fff; color: var(--accent, #14735c); font: 650 14px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.pa-act--primary { background: var(--accent, #14735c); color: #fff; }
.pa-act:hover { filter: brightness(.96); }

.pa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.pa-chips[hidden] { display: none; }
.pa-chip { padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line, #dfe5e1); background: #fff; color: var(--ink-2, #424944); font: 500 13px/1.25 inherit; font-family: inherit; cursor: pointer; text-align: left; }
.pa-chip:hover { border-color: var(--accent, #14735c); color: var(--accent, #14735c); }

.pa-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line, #dfe5e1); }
.pa-input { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 11px 12px; border: 1px solid #bdc9c1; border-radius: 8px; font: 15px/1.4 inherit; font-family: inherit; color: var(--ink, #202522); background: #fff; }
.pa-input:focus { outline: 2px solid var(--accent, #14735c); outline-offset: 0; border-color: var(--accent, #14735c); }
.pa-send { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 8px; background: var(--accent, #14735c); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pa-send:disabled { opacity: .45; cursor: default; }
.pa-note { padding: 0 14px 10px; font-size: 11.5px; line-height: 1.4; color: var(--muted, #65706a); }

@media (max-width: 720px) {
  .pa-fab { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: 52px; padding: 0; justify-content: center; }
  .pa-fab__label { display: none; }
  .pa-fab__dot { left: 32px; top: 8px; }
  body:has(#calc-sticky-bar.is-visible) .pa-fab { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .pa-panel { right: 0; bottom: 0; left: 0; top: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; }
  body.pa-open { overflow: hidden; }
  body.pa-open .mob-cta, body.pa-open .cookie-bar, body.pa-open .mob-msg, body.pa-open #calc-sticky-bar { display: none !important; }
  .pa-msg { font-size: 15px; }
  .pa-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .pa-typing i { animation: none; } .pa-fab { transition: none; } }
