.ppr-chat-bubble {
  position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px;
  border-radius: 50%; background: #b8895c; color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.25); z-index: 99998;
}
.ppr-chat-panel {
  position: fixed; bottom: 88px; right: 20px; width: 320px; max-width: calc(100vw - 24px);
  height: 420px; max-height: 65vh; max-height: 65dvh; background: #fff; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25); z-index: 99999;
  flex-direction: column; overflow: hidden; font-family: sans-serif;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .ppr-chat-panel {
    right: 12px; left: 12px; width: auto; max-width: none;
    bottom: 80px;
    height: min(420px, 56vh); height: min(420px, 56dvh);
  }
  .ppr-chat-bubble { width: 52px; height: 52px; font-size: 22px; bottom: 16px; right: 16px; }
}
.ppr-chat-header {
  background: #2b2420; color: #f6f1e6; padding: 14px 16px; font-weight: 600;
  font-size: 15px; display: flex; justify-content: space-between; align-items: center;
}
.ppr-chat-close { cursor: pointer; font-size: 20px; line-height: 1; }
.ppr-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.ppr-chat-msg {
  max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4;
  word-wrap: break-word;
}
.ppr-chat-msg-visitor {
  align-self: flex-end; background: #b8895c; color: #fff; border-bottom-right-radius: 2px;
}
.ppr-chat-msg-bot, .ppr-chat-msg-operator {
  align-self: flex-start; background: #f1efe8; color: #2b2420; border-bottom-left-radius: 2px;
}
.ppr-chat-msg-typing {
  align-self: flex-start; background: #f1efe8; padding: 10px 14px;
}
.ppr-typing-dots { display: inline-flex; gap: 4px; align-items: center; height: 8px; }
.ppr-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #a8a29a;
  animation: ppr-typing-bounce 1.2s infinite ease-in-out both;
}
.ppr-typing-dots span:nth-child(1) { animation-delay: -0.28s; }
.ppr-typing-dots span:nth-child(2) { animation-delay: -0.14s; }
@keyframes ppr-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}
.ppr-chat-input-row {
  display: flex; gap: 8px; border-top: 1px solid #e8e5dc; padding: 10px; box-sizing: border-box;
}
.ppr-chat-input {
  flex: 1; min-width: 0; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 16px;
  box-sizing: border-box;
  /* 16px — минимум, ниже которого iOS Safari и большинство мобильных браузеров
     автоматически увеличивают масштаб страницы при фокусе на поле ввода. */
}
.ppr-chat-send {
  flex-shrink: 0; background: #b8895c; color: #fff; border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; box-sizing: border-box;
}
.ppr-chat-disclaimer {
  padding: 9px 10px; font-size: 11px; line-height: 1.4; color: #6b6b6b;
  background: #faf8f3; border-bottom: 1px solid #e8e5dc; box-sizing: border-box;
}
.ppr-chat-consent {
  padding: 0 10px 10px; font-size: 11px; line-height: 1.4; color: #6b6b6b;
  box-sizing: border-box;
  /* Контраст намеренно не ниже: строка согласия, которую не видно, --
     готовый довод «я этого не видел». Тот же урок, что на лид-формах. */
}
.ppr-chat-consent a { color: #8a6a44; text-decoration: underline; }
