.chat-launch {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 35;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #252629;
  color: #f5f4f0;
  border: 1px solid #595a5d;
  padding: 14px 20px;
  box-shadow: 0 10px 35px #0006;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.chat-launch:hover { background: #323337; border-color: #8b8c8e; }
.chat-launch:focus-visible { outline: 2px solid #C89733; outline-offset: 4px; }
.chat-launch svg { width: 22px; height: 22px; stroke: #f5f4f0; }
.chat-launch strong { display: block; font-size: 16px; font-weight: 400; line-height: 1.2; }
.chat-launch small { display: block; font-size: 11px; color: #c4c4c7; text-align: left; }
.chat-launch[aria-expanded="true"] { visibility: hidden; }
.chat-launch.compact-chat span { display: none; }
.chat-launch.compact-chat { padding: 13px; }
.chat-panel {
  position: fixed;
  right: 26px;
  bottom: 108px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 370px;
  max-width: calc(100vw - 30px);
  height: 560px;
  max-height: calc(100svh - 145px);
  background: #fff;
  color: #000;
  border: 1px solid #999;
  box-shadow: 0 15px 70px #0008;
}
.chat-panel[hidden] { display: none; }
.chat-header, .chat-topics, .chat-input, .chat-transfer, .chat-disclaimer { flex-shrink: 0; }
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #252629;
  color: #fff;
}
.chat-header strong { font-size: 18px; font-weight: 400; }
.chat-header small { display: block; font-size: 11px; color: #C89733; }
.chat-header button { border: 0; background: none; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }
.chat-messages { min-height: 0; overflow: auto; flex: 1; padding: 18px; scroll-behavior: smooth; }
.chat-bubble {
  margin-bottom: 12px;
  padding: 12px 15px;
  background: #f0f0f0;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-bubble.user { margin-left: 35px; background: #eee3ca; }
.chat-bubble.pending { color: #666; }
.chat-bubble a { color: #735414; }
.chat-topics { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 15px 12px; }
.chat-topics button {
  background: #fff;
  border: 1px solid #aaa;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #ddd; }
.chat-input input { width: 0; flex: 1; border: 1px solid #aaa; padding: 10px; font: inherit; font-size: 15px; }
.chat-input button { background: #000; color: #fff; border: 0; padding: 10px; font: inherit; font-size: 14px; cursor: pointer; }
.chat-input button:disabled, .chat-input input:disabled { opacity: .6; cursor: default; }
.chat-transfer { display: block; padding: 10px 15px; background: #C89733; color: #000; font-size: 13px; text-align: center; text-decoration: none; }
.chat-disclaimer { margin: 0; padding: 8px 15px; color: #666; font-size: 10px; }
body.unit-view > .chat-launch,
body.unit-view > .chat-panel:not([hidden]) { display: flex !important; }
@media (max-width: 760px) {
  .chat-launch { right: 15px; bottom: 72px; padding: 12px 15px; }
  .chat-launch small { font-size: 10px; }
  .chat-panel { right: 15px; bottom: 145px; width: 360px; height: 590px; max-height: calc(100svh - 170px); }
  .chat-header { padding: 12px 18px; }
  .chat-topics { padding-top: 8px; }
}
