.bn-landing-support {
  --chat-blue: #2545c5;
  --chat-green: #39cd8d;
  --chat-dock: max(18px, env(safe-area-inset-right));
  --chat-bottom: max(18px, env(safe-area-inset-bottom));
}
.bn-landing-support [hidden] { display: none !important; }
.bn-landing-support__launcher {
  position: fixed;
  z-index: 30;
  right: var(--chat-dock);
  bottom: max(var(--chat-bottom), calc(var(--chat-banner-offset, 0px) + 12px));
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--chat-blue);
  color: #fff;
  box-shadow: 0 7px 23px #0e286b3d;
  transition: transform .18s ease, box-shadow .18s ease;
}
.bn-landing-support__launcher .icon { width: 27px; height: 27px; }
@media (hover: hover) {
  .bn-landing-support__launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 26px #0e286b52; }
}
.bn-landing-support__dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b97aa;
}
.bn-landing-support__launcher .bn-landing-support__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--surface);
}
.bn-landing-support[data-unread="true"] .bn-landing-support__launcher[aria-expanded="false"]::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #cf334c;
  content: '';
}
.bn-landing-support[data-online="true"] .bn-landing-support__dot { background: var(--chat-green); }
.bn-landing-support[data-online="true"] .bn-landing-support__dot::after {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--chat-green);
  border-radius: inherit;
  content: '';
  animation: bn-landing-chat-pulse 2s ease-out infinite;
}
@keyframes bn-landing-chat-pulse {
  0% { opacity: .8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(2.4); }
}

.bn-landing-chat {
  position: fixed;
  inset: auto var(--chat-dock) var(--chat-bottom) auto;
  width: min(380px, calc(100% - var(--chat-dock) - max(12px, env(safe-area-inset-left))));
  height: 480px;
  max-width: none;
  max-height: calc(100vh - var(--chat-bottom) - 12px);
  max-height: calc(100dvh - var(--chat-bottom) - 12px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 15px 65px #131d3e42;
}
.bn-landing-chat[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.bn-landing-chat::backdrop { background: #10182c30; }
.bn-landing-chat__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.bn-landing-chat__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--primary);
}
.bn-landing-chat__mark .icon { width: 22px; height: 22px; }
.bn-landing-chat__header h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.bn-landing-chat__presence { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.bn-landing-chat__close, .bn-landing-chat__send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 13px;
}
.bn-landing-chat__close { background: var(--surface-soft); color: var(--ink); }
.bn-landing-chat__close .icon, .bn-landing-chat__send .icon { width: 20px; height: 20px; }
.bn-landing-chat__scroll { padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.bn-landing-chat__messages { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bn-landing-chat__welcome, .bn-landing-chat__message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.bn-landing-chat__message p { margin: 0; white-space: pre-wrap; }
.bn-landing-chat__message.is-own { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--chat-blue); color: #fff; }
.bn-landing-chat__message a { text-decoration: underline; text-underline-offset: 2px; }
.bn-landing-chat__message time { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; text-align: right; }
.bn-landing-chat__message.is-own time { color: #e0e8ff; }
.bn-landing-chat__earlier {
  display: block;
  margin: 0 auto 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--primary);
  font-size: 12px;
}
.bn-landing-chat__form { padding: 12px; border-top: 1px solid var(--line); }
.bn-landing-chat__compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.bn-landing-chat__compose textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.bn-landing-chat__compose textarea::placeholder { color: var(--muted); }
.bn-landing-chat__send { background: var(--chat-blue); color: #fff; }
.bn-landing-chat__send:disabled { opacity: .55; }
.bn-landing-chat__state { margin: 6px 2px 0; color: var(--muted); font-size: 12px; }
.bn-landing-chat .bn-chat-typing:not([hidden]) { display: flex; align-items: center; gap: 7px; margin: 0 2px 6px; color: var(--muted); font-size: 12px; }
.bn-landing-chat .bn-chat-typing-dots { display: inline-flex; align-items: center; gap: 3px; }
.bn-landing-chat .bn-chat-typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: bn-landing-typing .55s ease-in-out infinite alternate; }
.bn-landing-chat .bn-chat-typing-dots i:nth-child(2) { animation-delay: .14s; }
.bn-landing-chat .bn-chat-typing-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes bn-landing-typing { to { opacity: .35; transform: translateY(-3px); } }
@media (max-width: 480px) {
  .bn-landing-support { --chat-dock: max(12px, env(safe-area-inset-right)); --chat-bottom: max(12px, env(safe-area-inset-bottom)); }
  .bn-landing-support__launcher { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-landing-support__launcher { transition: none; }
  .bn-landing-support[data-online="true"] .bn-landing-support__dot::after { animation: none; opacity: 0; }
  .bn-landing-chat .bn-chat-typing-dots i { animation: none; }
}
