/* Чат-виджет в цветах сайта (переменные из style.css) */
:root {
  --chat--font-family: inherit;
  --chat--color--primary: #b8322a;
  --chat--color--primary-shade-50: #a52d26;
  --chat--color--primary--shade-100: #8e2620;
  --chat--color--secondary: #3f6b3a;
  --chat--color-secondary-shade-50: #355a31;
  --chat--color-dark: #2a1d17;
  --chat--color-light: #faf6ef;
  --chat--header--background: #2a1d17;
  --chat--header--color: #faf6ef;
  --chat--body--background: #faf6ef;
  --chat--footer--background: #fffdf8;
  --chat--footer--color: #7a675b;
  --chat--message--bot--background: #fffdf8;
  --chat--message--bot--color: #2a1d17;
  --chat--message--bot--border: 1px solid #ecdfcf;
  --chat--message--user--background: #b8322a;
  --chat--message--user--color: #fffdf8;
  --chat--toggle--background: #b8322a;
  --chat--toggle--hover--background: #8e2620;
  --chat--toggle--active--background: #8e2620;
  --chat--toggle--color: #fffdf8;
  /* 16px — читаемо и не даёт iPhone увеличивать страницу при вводе */
  --chat--input--font-size: 16px;
  --chat--input--placeholder--font-size: 16px;
  --chat--textarea--height: 64px;
  --chat--window--width: 480px;
  --chat--header-height: auto;
  --chat--header--padding: 14px 16px;
}
/* шапка с фото Марии */
#n8n-chat .chat-header { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; align-items: center; }
#n8n-chat .chat-header::before {
  content: ""; grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 50%;
  background: #f5e8d8 url(/maria.svg) center / cover no-repeat; border: 2px solid #faf6ef;
}
#n8n-chat .chat-heading h1 { font-size: 20px; margin: 0; }
#n8n-chat .chat-header p { margin: 2px 0 0; font-size: 14px; opacity: .85; }
#n8n-chat .chat-input textarea { font-size: 16px; line-height: 1.4; min-height: 64px; height: 64px; padding: 12px 14px; }
#n8n-chat .chat-inputs { align-items: center; }
/* строка о персональных данных под полем ввода */
#n8n-chat .chat-consent { margin: 0; padding: 2px 14px 6px; font-size: 10px; line-height: 1.3; color: #9a8a7e; background: #fffdf8; text-align: center; }
#n8n-chat .chat-consent a { color: #8e2620; }
/* формы в чате: бронь, заказ, звонок */
#n8n-chat .cf-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 6px; background: #fffdf8; scrollbar-width: none; border-bottom: 1px solid #f3eadf; }
#n8n-chat .cf-chip { flex: none; border: 1px solid #ecdfcf; background: #fff; color: #2a1d17; border-radius: 999px; padding: 5px 9px; font: 500 12.5px/1.2 inherit; cursor: pointer; white-space: nowrap; }
#n8n-chat .cf-chip:hover { border-color: #b8322a; color: #8e2620; }
#n8n-chat .cf-card { margin: 4px 0 12px; padding: 14px; background: #fffdf8; border: 1px solid #ecdfcf; border-radius: 14px; font-size: 14px; color: #2a1d17; }
#n8n-chat .cf-title { font-weight: 700; margin-bottom: 10px; }
#n8n-chat .cf-field { display: block; margin-bottom: 9px; }
#n8n-chat .cf-field > span { display: block; font-size: 12px; color: #7a675b; margin-bottom: 3px; }
#n8n-chat .cf-field input, #n8n-chat .cf-field select, #n8n-chat .cf-field textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #ecdfcf; border-radius: 8px; background: #fff;
  font: 16px/1.3 inherit; color: #2a1d17; }
#n8n-chat .cf-field textarea { min-height: 56px; resize: vertical; }
#n8n-chat .cf-field input:focus, #n8n-chat .cf-field select:focus, #n8n-chat .cf-field textarea:focus { outline: 2px solid #b8322a33; border-color: #b8322a; }
#n8n-chat .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#n8n-chat .cf-how { display: flex; gap: 16px; margin: 2px 0 10px; }
#n8n-chat .cf-how label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
#n8n-chat .cf-note { display: block; color: #7a675b; font-size: 12px; margin-bottom: 6px; }
#n8n-chat .cf-err { color: #b3261e; font-size: 13px; min-height: 16px; margin: 2px 0 6px; }
#n8n-chat .cf-actions, #n8n-chat .cf-confirm { display: flex; gap: 8px; flex-wrap: wrap; }
#n8n-chat .cf-confirm { margin: 2px 0 12px; }
#n8n-chat .cf-btn { border: 0; background: #b8322a; color: #fffdf8; border-radius: 999px; padding: 8px 16px; font: 600 14px/1.2 inherit; cursor: pointer; }
#n8n-chat .cf-btn:hover { background: #8e2620; }
#n8n-chat .cf-btn.ghost { background: #fff; color: #8e2620; border: 1px solid #b8322a; }
#n8n-chat .cf-short { display: none; }
@media (max-width: 480px) { #n8n-chat .cf-long { display: none; } #n8n-chat .cf-short { display: inline; } }
/* телефон: окно чата почти во всю ширину экрана */
@media (max-width: 520px) {
  :root { --chat--window--width: calc(100vw - 16px); --chat--window--right: 8px; }
  #n8n-chat .chat-window-wrapper { right: 8px; }
}
