/* Official n8n widget, scoped to the site's green and gold palette. */
#n8n-chat {
  --chat--color--primary: #edb149;
  --chat--color--primary-shade-50: #f6cb78;
  --chat--color--primary--shade-100: #c88b25;
  --chat--color--secondary: #edb149;
  --chat--color-secondary-shade-50: #f6cb78;
  --chat--font-family: var(--font);
  --chat--window--width: min(500px, calc(100vw - 32px));
  --chat--window--height: min(750px, calc(100dvh - 116px));
  --chat--window--bottom: max(16px, env(safe-area-inset-bottom));
  --chat--window--right: max(20px, env(safe-area-inset-right));
  --chat--window--z-index: 1000;
  --chat--window--border: 0;
  --chat--window--border-radius: 16px;
  --chat--window--margin-bottom: 14px;
  --chat--header--padding: 28px 18px;
  --chat--header--background: #18282b;
  --chat--header--color: #fff;
  --chat--heading--font-size: 23px;
  --chat--subtitle--font-size: 14px;
  --chat--subtitle--line-height: 1.4;
  --chat--body--background: #fffaf0;
  --chat--message--font-size: 18px;
  --chat--message--padding: 12px 15px;
  --chat--message--border-radius: 16px;
  --chat--message--margin-bottom: 12px;
  --chat--message--bot--background: #f0eee7;
  --chat--message--bot--color: #34484b;
  --chat--message--user--background: #1d393c;
  --chat--message--user--color: #fff;
  --chat--messages-list--padding: 14px;
  --chat--toggle--color: #18282b;
  --chat--toggle--size: 72px;
  --chat--toggle--background: #edb149;
  --chat--toggle--hover--background: #f6cb78;
  --chat--toggle--active--background: #c88b25;
  --chat--textarea--height: 60px;
  --chat--textarea--max-height: 120px;
  --chat--input--font-size: 17px;
  --chat--input--background: #f6f6f6;
  --chat--input--text-color: #333;
  --chat--input--border: 1px solid #d9d9df;
  --chat--input--border-active: 1px solid #edb149;
  --chat--input--border-radius: 12px;
  --chat--input--padding: 14px 10px;
  --chat--input--container--background: #fff;
  --chat--input--container--padding: 16px 12px 12px;
  --chat--input--send--button--background: transparent;
  --chat--input--send--button--color: #edb149;
  --chat--input--send--button--background-hover: #f7efdd;
  --chat--input--send--button--color-hover: #f6cb78;
  --chat--footer--background: #fff;
  --chat--footer--color: #34484b;
  --chat--footer--border-top: 1px solid #eee;
  --chat--button--background--primary: #edb149;
  --chat--button--background--primary--hover: #f6cb78;
  --chat--button--color--primary: #18282b;
  --chat--button--color--primary--hover: #18282b;
  --chat--button--border-radius: 10px;
  --chat--close--button--color-hover: #fff;
  color: #34484b;
}
#n8n-chat *, .avr-chat-launcher, .avr-chat-notice { box-sizing: border-box; }
#n8n-chat .chat-window { box-shadow: 0 10px 40px #0002; }
#n8n-chat .chat-header { gap: 4px; flex-shrink: 0; position: relative; }
#n8n-chat .chat-header::before { content: 'СК АВРОРА'; margin-bottom: 5px; color: #edb149; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
#n8n-chat .chat-header h1 { margin: 0; font-family: var(--font); font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; }
#n8n-chat .chat-header p { margin: 0 0 0 32px; color: #b5d7c2; }
#n8n-chat .chat-body { min-height: 0; }
#n8n-chat .chat-close-button { min-width: 44px; min-height: 44px; padding: 8px; color: #fff; }
#n8n-chat .chat-message { max-width: 100%; border-radius: 16px; }
#n8n-chat .chat-message p { margin: 0 0 12px; letter-spacing: 0; }
#n8n-chat .chat-message p:last-child { margin-bottom: 0; }
#n8n-chat .chat-message a { color: inherit; text-decoration: underline; font-weight: 600; overflow-wrap: anywhere; }
#n8n-chat .chat-message pre { max-width: 100%; overflow-wrap: anywhere; }
#n8n-chat .chat-footer { flex-shrink: 0; }
#n8n-chat button { font-family: var(--font); letter-spacing: 0; }
#n8n-chat textarea { resize: none; min-height: 60px; max-height: 120px; color: var(--chat--input--text-color); border: var(--chat--input--border); }
#n8n-chat textarea:focus { border: var(--chat--input--border-active); }
#n8n-chat :is(button, textarea, a, .chat-window-toggle):focus-visible, .avr-chat-launcher:focus-visible { outline: 3px solid #f6bc54; outline-offset: 3px; }
#n8n-chat .avr-chat-error { margin: 12px; padding: 12px; border-radius: 10px; background: var(--chat--message--bot--background); color: var(--chat--message--bot--color); font: 14px/1.5 var(--font); }
#n8n-chat .chat-window-toggle { position: relative; border: 0; box-shadow: 0 5px 24px #0002; }
/* n8n fades its bubble/chevron SVGs out-in. Keep them hidden in every frame. */
#n8n-chat .chat-window-toggle > svg { display: none; }
#n8n-chat .chat-window-toggle::before { content: '🤖'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; }
#n8n-chat .chat-window-toggle[aria-expanded=true]::before { content: none; }
#n8n-chat .chat-window-toggle[aria-expanded=true]::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translate(-50%, -70%) rotate(45deg); }
.avr-chat-launcher { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 1000; display: grid; place-items: center; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; background: #edb149; color: #18282b; font-size: 34px; cursor: pointer; box-shadow: 0 5px 24px #0002; }
.avr-chat-launcher:hover { background: #f6cb78; }
.avr-chat-launcher:disabled { opacity: .7; cursor: wait; }
.avr-chat-notice { position: fixed; z-index: 1000; right: 20px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 86px); width: min(300px, calc(100vw - 40px)); margin: 0; padding: 14px 18px; border-radius: 12px; background: #fff; color: #333; box-shadow: 0 5px 24px #0002; font: 16px/1.5 var(--font); }
.avr-chat-notice[hidden] { display: none; }
/* Keep footer contacts and the theme switch clear of the fixed launcher. */
.avr-chat-ready .avr-footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
html[data-theme=dark] #n8n-chat { --chat--body--background: #122326; --chat--message--bot--background: #243a3c; --chat--message--bot--color: #e8efeb; --chat--input--background: #243a3c; --chat--input--text-color: #e8efeb; --chat--input--border: 1px solid #536967; --chat--input--container--background: #1b3033; --chat--footer--background: #1b3033; --chat--footer--color: #e8efeb; --chat--footer--border-top: 1px solid #3a5151; --chat--color-disabled: #84969b; --chat--color-typing: #e8efeb; --chat--input--send--button--color: #edb149; --chat--input--send--button--background-hover: #304c50; --chat--input--send--button--color-hover: #f6cb78; color: #e8efeb; }
html[data-theme=dark] #n8n-chat textarea::placeholder { color: #b1c3bc; }
html[data-theme=dark] .avr-chat-notice { background: #243a3c; color: #e8efeb; }
@media (max-width: 600px) {
  #n8n-chat { --chat--window--width: calc(100vw - 24px); --chat--window--right: max(12px, env(safe-area-inset-right)); --chat--window--bottom: max(12px, env(safe-area-inset-bottom)); --chat--window--height: min(700px, calc(100dvh - 100px)); --chat--toggle--size: 64px; --chat--header--padding: 20px 16px; --chat--message--font-size: 16px; }
  .avr-chat-launcher { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: 64px; height: 64px; font-size: 30px; }
  .avr-chat-notice { right: 12px; }
}
@media (max-height: 550px) { #n8n-chat { --chat--header--padding: 12px 16px; --chat--window--height: calc(100dvh - 112px); } }
@media (prefers-reduced-motion: reduce) { #n8n-chat { --chat--transition-duration: 0s; } }
