.site-chat {
  --chat-bottom: 24px;
  --chat-consent: 0px;
  position: fixed;
  right: 50px;
  bottom: calc(var(--chat-bottom) + var(--chat-consent));
  z-index: 10;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
  pointer-events: none;
}
.site-chat__hint, .site-chat__launcher, .site-chat__panel { pointer-events: auto; }
.site-chat[hidden], .site-chat [hidden] { display: none; }
body:has(.page-loader) .site-chat, body:has(.page-loader) .chat-backdrop { visibility: hidden; }
.site-chat button, .site-chat input, .site-chat textarea { font: inherit; letter-spacing: 0; }
.site-chat button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.site-chat input:focus, .site-chat textarea:focus { outline: none; }
.site-chat button:disabled { cursor: default; }
.site-chat__launcher { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin-left: auto; border-radius: 50%; background: var(--ink); box-shadow: 0 10px 30px #0008; touch-action: manipulation; }
.site-chat__launcher img { width: 48px; height: 48px; animation: chat-attention 8s ease-in-out infinite; }
.site-chat__launcher picture { display: block; }
.site-chat__dot { position: absolute; top: 24px; right: 24px; width: 12px; height: 12px; border-radius: 50%; background: var(--gray); }
.site-chat--online .site-chat__dot, .site-chat--online .site-chat__badge::before { background: #1ddc19; }
.site-chat__unread { position: absolute; top: 0; right: 0; min-width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--blue); color: white; text-align: center; font-size: 12px; }
.site-chat__hint { display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(420px, calc(100vw - 100px)); margin-right: 48px; padding: 16px; color: white; border-radius: 16px; background: #0008; box-shadow: 0 10px 30px #0008; animation: chat-enter .25s ease-out; overflow-wrap: anywhere; }
.site-chat__hint-open { display: flex; align-items: center; gap: 6px; min-width: 0; text-align: left; }
.site-chat__hint-open > span:last-child { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-chat__hint { position: relative; -webkit-backdrop-filter: blur(3px) saturate(1.15); backdrop-filter: var(--chat-refraction, blur(3px) saturate(1.15)); }
.site-chat__hint::after, .site-chat__panel::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 1px 1px 0 #ffffff66, inset -1px -1px 0 #ffffff1a; }
.site-chat__hint::after { box-shadow: inset 1px 1px 0 #ffffff80, inset -1px -1px 0 #0003; }
.site-chat__hand { flex: 0 0 24px; width: 24px; height: 24px; transform-origin: 70% 80%; animation: chat-wave 3s ease-in-out infinite; }
.site-chat__hand img { max-width: none; }
.site-chat__hint-close { display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 24px; }
.site-chat__panel { position: relative; display: flex; flex-direction: column; gap: 12px; width: 413px; max-width: calc(100vw - 48px); height: 660px; max-height: calc(100dvh - var(--chat-consent) - 48px); padding: 24px; border-radius: 48px; background: #ffffff66; box-shadow: 0 10px 30px #0008; -webkit-backdrop-filter: blur(5px) saturate(1.15); backdrop-filter: var(--chat-refraction, blur(5px) saturate(1.15)); animation: chat-enter .25s ease-out; }
.site-chat__header { display: flex; align-items: flex-start; justify-content: space-between; flex: 0 0 auto; }
.site-chat__profile { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid #ffffffcc; border-radius: 36px; background: #0000001a; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.site-chat__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--gray); }
.site-chat__badge { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 12px; color: white; background: var(--ink); font-size: 12px; }
.site-chat__badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.site-chat__collapse { flex: 0 0 24px; width: 24px; height: 24px; }
.site-chat__body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 24px 12px 12px; border-radius: 24px; background: #e6e8eb; }
.site-chat__log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.site-chat__intro { font-size: 18px; margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-chat__messages { display: flex; flex-direction: column; gap: 8px; }
.site-chat__message { align-self: flex-start; max-width: 100%; padding: 16px; border-radius: 16px; background: white; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-chat__message--owner { width: 100%; color: white; background: var(--ink); }
.site-chat__message small { display: block; margin-top: 8px; color: #65666a; font-size: 11px; white-space: normal; }
.site-chat__message button { margin-top: 8px; text-decoration: underline; font-size: 12px; }
.site-chat__date { align-self: center; margin: 0 0 8px; padding: 6px 12px; border-radius: 50px; color: white; background: #1c1d2033; font-size: 10px; }
.site-chat__quick { display: grid; grid-template-rows: 1fr; flex: 0 1 auto; min-height: 0; max-height: 75%; margin-top: 12px; transition: grid-template-rows .3s ease, opacity .3s ease, margin .3s ease; }
.site-chat__quick--closing { grid-template-rows: 0fr; opacity: 0; margin-top: 0; pointer-events: none; }
.site-chat__options { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.site-chat__option { display: flex; gap: 12px; align-items: center; justify-content: space-between; max-width: 100%; padding: 12px; border: 1px solid #414ae84d; border-radius: 16px; background: white; text-align: left; }
.site-chat__option:hover { border-color: var(--blue); }
.site-chat__option { flex-shrink: 0; overflow-wrap: anywhere; }
.site-chat__option span { min-width: 0; }
.site-chat__option img { flex: 0 0 24px; width: 24px; height: 24px; }
.site-chat__composer { display: flex; align-items: flex-end; gap: 12px; flex: 0 0 auto; margin-top: 12px; padding: 12px; border: 1px solid var(--gray); border-radius: 24px; background: white; }
.site-chat__composer--filled, .site-chat__composer:focus-within, .site-chat__contact-form:focus-within { border-color: var(--blue); }
.site-chat__input { display: block; flex: 1; width: 0; min-width: 0; height: 48px; max-height: 140px; resize: none; border: 0; padding: 15px 0; background: transparent; color: var(--ink); line-height: 18px; }
.site-chat__input::placeholder, .site-chat__contact-input::placeholder { color: var(--gray); opacity: 1; }
.site-chat__send { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; }
.site-chat__send:disabled { filter: grayscale(1); opacity: .55; }
.site-chat__contact { margin-top: 8px; padding: 16px; border-radius: 24px; color: white; background: var(--ink); overflow-wrap: anywhere; }
.site-chat__contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid var(--gray); border-radius: 16px; background: white; }
.site-chat__contact-input { width: 100%; min-width: 0; padding: 0; border: 0; color: var(--ink); background: white; }
.site-chat__contact-send { width: 100%; padding: 12px; border-radius: 500px; background: var(--blue); color: white; }
.site-chat__contact-send:disabled { background: var(--gray); }
.site-chat__skip { margin-top: 12px; color: white; text-decoration: underline; font-size: 12px; }
.site-chat__feedback { flex: 0 0 auto; margin-top: 8px; color: #9b2335; font-size: 12px; overflow-wrap: anywhere; }
.chat-backdrop { display: none; }
.chat-glass-defs { position: absolute; width: 0; height: 0; pointer-events: none; }
.site-chat--solid .site-chat__hint { background: #1c1d20ed; }
.site-chat--solid .site-chat__panel { background: #e6e8ebed; }
@keyframes chat-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chat-wave { 0%, 55%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(18deg); } 20%, 40% { transform: rotate(-10deg); } }
@keyframes chat-attention { 0%, 85%, 100% { transform: translateY(0); } 89%, 95% { transform: translateY(-3px); } 92% { transform: translateY(0); } }
@media (max-width: 1100px) {
  .site-chat { --chat-bottom: 12px; right: 12px; }
  .site-chat__launcher { width: 60px; height: 60px; }
  .site-chat__launcher img { width: 36px; height: 36px; }
  .site-chat__dot { top: 12px; right: 12px; width: 8px; height: 8px; }
  .site-chat__hint { gap: 8px; max-width: calc(100vw - 54px); margin-right: 30px; padding: 12px; font-size: 12px; }
  .site-chat__hint-open { gap: 3px; }
  .site-chat__hand { flex-basis: 20px; width: 20px; height: 20px; }
  .site-chat__hand img { transform: scale(.833333); transform-origin: top left; }
  .site-chat__hint-close { flex-basis: 12px; width: 12px; }
  .site-chat__hint-close img { max-width: none; transform: scale(.75); transform-origin: left center; }
  .site-chat--open { right: 0; bottom: calc(var(--chat-consent) + var(--chat-keyboard, 0px)); width: 100%; }
  .site-chat__panel { width: 100%; max-width: none; height: calc(var(--chat-viewport, 100dvh) - 58px - var(--chat-consent)); max-height: calc(var(--chat-viewport, 100dvh) - 16px - var(--chat-consent)); padding: 16px 16px max(16px, env(safe-area-inset-bottom)); border-radius: 36px 36px 0 0; }
  .site-chat__profile { padding: 6px 12px 6px 6px; }
  .site-chat__avatar { width: 36px; height: 36px; }
  .site-chat__badge { font-size: 10px; }
  .site-chat__intro { font-size: 14px; }
  .site-chat__option { padding: 6px; }
  .site-chat__composer { padding: 6px 6px 6px 12px; border-radius: 18px; }
  .site-chat__input { height: 36px; padding: 9px 0; }
  .site-chat__send { flex-basis: 36px; width: 36px; height: 36px; overflow: hidden; }
  .site-chat__send img { width: 36px; height: 36px; }
  .chat-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 9; background: #0003; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .site-chat *, .site-chat *::before { animation: none; transition: none; }
}
