.chat { position: fixed; z-index: 1000; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); color: #0A0A0A; font: 16px/1.55 Poppins, sans-serif; }
.chat *, .chat *::before, .chat *::after { box-sizing: border-box; }
.chat [hidden] { display: none !important; }
.chat button, .chat textarea { font: inherit; color: inherit; }
.chat button { cursor: pointer; }
.chat svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; flex-shrink: 0; }
.chat :is(button, textarea, a):focus-visible, .chat__messages:focus-visible { outline: 2px solid #0A0A0A; outline-offset: 3px; }
.chat__launcher { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 12px 21px; border: 1px solid #0A0A0A; border-radius: 3px; background: #FFFFFF; box-shadow: 0 6px 24px #0A0A0A20; font-weight: 500 !important; }
.chat__launcher:hover { background: #4EBEF0; }
.chat__panel { display: flex; flex-direction: column; width: 360px; max-width: calc(100vw - 44px); max-height: min(560px, calc(var(--chat-viewport, 100dvh) - 116px)); background: #FFFFFF; border: 1px solid #0A0A0A29; border-top: 3px solid #4EBEF0; border-radius: 3px; box-shadow: 0 12px 60px #0A0A0A29, 0 2px 8px #0A0A0A0D; overflow: hidden; animation: chat-arrive .28s ease both; }
.chat[data-conversation] .chat__panel { height: 560px; }
.chat[data-expanded] .chat__panel { width: 480px; height: min(740px, calc(var(--chat-viewport, 100dvh) - 52px)); max-height: calc(var(--chat-viewport, 100dvh) - 52px); }
.chat__header { display: flex; flex: none; align-items: center; gap: 9px; padding: 8px 10px 8px 16px; border-bottom: 1px solid #0A0A0A16; }
.chat__mark { display: grid; place-items: center; width: 34px; height: 38px; }
.chat__mark svg { width: 29px; height: 29px; }
.chat__identity { display: flex; flex: 1; flex-direction: column; gap: 1px; }
.chat__identity strong { font-size: 17px; font-weight: 500; letter-spacing: -.03em; }
.chat__identity > span { font-size: 11px; letter-spacing: .04em; color: #0A0A0AB3; }
.chat__close, .chat__expand { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 40px; padding: 0; border: 0; background: transparent; }
.chat__close:hover, .chat__expand:hover { background: #0A0A0A08; }
.chat__availability { flex: none; padding: 8px 16px; background: #0A0A0A04; border-bottom: 1px solid #0A0A0A12; }
.chat__availability p { display: flex; gap: 8px; align-items: center; margin: 0 0 3px; font-size: 12px; font-weight: 500; line-height: 1.5; }
.chat__dot { width: 6px; height: 6px; flex-shrink: 0; background: #0A0A0A66; border-radius: 50%; }
.chat__availability[data-online="true"] .chat__dot { background: #4EBEF0; box-shadow: 0 0 0 3px #4EBEF026; }
.chat__availability > span { display: block; font-size: 11px; line-height: 1.65; color: #0A0A0AB3; }
.chat[data-conversation] .chat__availability > span { display: none; }
.chat__messages { flex: 1 1 auto; min-height: 60px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-padding: 16px; padding: 16px; scrollbar-width: thin; scrollbar-color: #0A0A0A33 transparent; }
.chat__welcome h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.045em; }
.chat__welcome p { margin: 0; font-size: 14px; line-height: 1.6; color: #0A0A0ABF; }
.chat__suggestions { display: grid; margin-top: 14px; gap: 6px; }
.chat__suggestions button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; padding: 9px 11px; background: #FFFFFF; border: 1px solid #0A0A0A33; border-radius: 2px; text-align: left; font-size: 13px; line-height: 1.6; }
.chat__suggestions button:hover { border-color: #0A0A0A; background: #0A0A0A04; }
.chat__msg { margin: 0 0 18px; overflow-wrap: anywhere; word-break: normal; font-size: 16px; line-height: 1.6; }
.chat__msg:last-child { margin-bottom: 0; }
.chat__msg--user { padding: 12px 14px; background: #0A0A0A06; border-left: 2px solid #4EBEF0; font-size: 15px; line-height: 1.65; }
.chat__speaker { display: block; margin-bottom: 8px; color: #0A0A0AA6; font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.chat__msg p { font: inherit; margin: 0 0 12px; white-space: pre-wrap; }
.chat__msg p:last-child { margin-bottom: 0; }
.chat__msg ul, .chat__msg ol { padding-left: 21px; margin: 8px 0 12px; }
.chat__msg li { margin-bottom: 6px; }
.chat__msg a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.chat__status { flex: none; margin: 0; padding: 9px 22px; background: #0A0A0A04; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.chat__status a { color: inherit; text-decoration: underline; }
.chat__actions { flex: none; display: grid; gap: 5px; padding: 10px 16px 8px; border-top: 1px solid #0A0A0A16; }
.chat__book { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 46px; padding: 11px 15px; background: #0A0A0A; color: #FFFFFF; border: 1px solid #0A0A0A; border-radius: 2px; font-size: 14px; font-weight: 500; text-decoration: none; }
.chat__book:hover { background: #4EBEF0; color: #0A0A0A; }
.chat__contact { justify-self: center; padding: 3px 7px; color: #0A0A0A; font-size: 12px; text-decoration: none; }
.chat__contact:hover { text-decoration: underline; text-underline-offset: 4px; }
.chat__contact span { margin-left: 9px; }
.chat__form { position: relative; flex: none; margin: 0; padding: 0 15px; }
.chat__controls { display: flex; align-items: flex-end; gap: 4px; padding: 5px; border: 1px solid #0A0A0A33; border-radius: 2px; }
.chat__controls:focus-within { border-color: #0A0A0A; }
.chat__controls textarea { flex: 1; min-width: 0; width: 100%; height: 38px; max-height: 98px; min-height: 38px; resize: none; padding: 9px 5px; border: 0; border-radius: 0; background: transparent; font-size: 13px; line-height: 20px; box-shadow: none; }
.chat__controls textarea::placeholder { color: #0A0A0AA6; opacity: 1; }
.chat__controls textarea:focus-visible { outline: 0; }
.chat__send { display: grid; place-items: center; width: 38px; min-width: 38px; height: 38px; padding: 0; background: #4EBEF0; border: 0; border-radius: 2px; }
.chat__send:disabled { opacity: .45; cursor: wait; }
.chat__privacy { flex: none; margin: 0; padding: 8px 10px; font-size: 10px; color: #0A0A0AD9; text-align: center; line-height: 1.5; }
.chat__privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.chat__sr, .chat__hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.mobile-nav-open .chat, html.nav-open .chat { visibility: hidden; pointer-events: none; }
@keyframes chat-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .chat { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .chat__panel { width: 360px; max-width: calc(100vw - 20px); max-height: min(560px, calc(var(--chat-viewport, 100dvh) - 108px)); }
  .chat[data-expanded] .chat__panel { width: calc(100vw - 20px); height: calc(var(--chat-viewport, 100dvh) - 24px); max-height: calc(var(--chat-viewport, 100dvh) - 24px); }
  .chat__header { padding: 9px 10px 9px 16px; gap: 8px; }
  .chat__close, .chat__expand { width: 40px; height: 40px; }
  .chat__availability { padding: 8px 16px; }
  .chat__controls textarea { font-size: 16px; }
  .chat__privacy { font-size: 10px; padding: 9px 8px; }
  .chat__msg { font-size: 16px; }
}
@media (max-height: 650px) {
  .chat__availability > span, .chat__welcome > p { display: none; }
  .chat__messages { padding: 12px; }
  .chat__welcome h2 { font-size: 20px; line-height: 1.2; margin-bottom: 0; }
  .chat__suggestions { margin-top: 6px; }
}
@media (max-height: 550px) {
  .chat__panel, .chat[data-conversation] .chat__panel, .chat[data-expanded] .chat__panel { max-height: calc(var(--chat-viewport, 100dvh) - 24px); height: calc(var(--chat-viewport, 100dvh) - 24px); }
  .chat__availability > span { display: none; }
  .chat__header { padding-top: 5px; padding-bottom: 5px; }
  .chat__actions { display: flex; align-items: center; padding: 8px 14px; }
  .chat__book { flex: 1; min-height: 40px; }
  .chat__contact { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .chat__panel { animation: none; } }
