/* HTNS r114 — compact chat sheet. Final layer after the historical chat skins. */
html body #htnsChatBackdrop {
  background:rgba(20,40,65,.22) !important;
  backdrop-filter:blur(2px) !important;
  -webkit-backdrop-filter:blur(2px) !important;
}
html body #htnsChatDrawer {
  position:fixed !important;
  top:auto !important;
  left:max(8px,env(safe-area-inset-left)) !important;
  right:max(8px,env(safe-area-inset-right)) !important;
  bottom:calc(var(--chat-keyboard-inset,0px) + max(8px,env(safe-area-inset-bottom))) !important;
  width:auto !important;
  height:min(var(--chat-panel-height,64dvh),560px) !important;
  max-height:calc(var(--chat-viewport-height,100dvh) - max(20px,env(safe-area-inset-top))) !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border:1px solid #dce5ed !important;
  border-radius:18px !important;
  background:#fff !important;
  box-shadow:0 14px 44px rgba(20,45,70,.18) !important;
  box-sizing:border-box !important;
}
html body #htnsChatDrawer .chat-drawer-head {
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-height:50px !important;
  margin:0 !important;
  padding:6px 10px 4px 14px !important;
  border:0 !important;
  background:#fff !important;
}
html body #htnsChatDrawer #htnsChatTitle {
  flex:1 1 auto !important;
  min-width:0 !important;
  margin:0 !important;
  color:#153c65 !important;
  font-size:18px !important;
  font-weight:750 !important;
  line-height:1.2 !important;
  letter-spacing:0 !important;
}
html body #htnsChatDrawer #htnsChatStatus {
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  gap:5px !important;
  padding:0 !important;
  border:0 !important;
  color:#738093 !important;
  font-size:10px !important;
  font-weight:500 !important;
  line-height:1.2 !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
}
html body #htnsChatDrawer #htnsChatStatus::before {
  content:"" !important;
  width:6px !important;
  height:6px !important;
  border-radius:50% !important;
  background:#9ba9b6 !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer #htnsChatStatus.live::before {background:#26a66b !important;}
html body #htnsChatDrawer #htnsChatStatus.offline {color:#b95061 !important;}
html body #htnsChatDrawer #htnsChatStatus.offline::before {background:#c46271 !important;}
html body #htnsChatDrawer .chat-close {
  width:36px !important;
  height:36px !important;
  min-width:36px !important;
  flex:0 0 36px !important;
  display:grid !important;
  place-items:center !important;
  padding:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:transparent !important;
  color:#64768a !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer .chat-close svg {width:20px !important;height:20px !important;}
html body #htnsChatDrawer #htnsChatTabs {
  display:grid !important;
  grid-template-columns:repeat(var(--chat-tab-count,1),minmax(0,1fr)) !important;
  flex:0 0 auto !important;
  gap:4px !important;
  margin:0 !important;
  padding:0 10px 8px !important;
  border:0 !important;
  border-bottom:1px solid #eef2f6 !important;
  background:#fff !important;
}
html body #htnsChatDrawer .chat-tab {
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  min-width:0 !important;
  min-height:40px !important;
  margin:0 !important;
  padding:6px !important;
  gap:4px !important;
  border:0 !important;
  border-radius:10px !important;
  background:transparent !important;
  color:#66758a !important;
  box-shadow:none !important;
  text-align:center !important;
}
html body #htnsChatDrawer .chat-tab.on {background:#eaf4fc !important;color:#176b9f !important;}
html body #htnsChatDrawer .chat-tab-copy {display:block !important;min-width:0 !important;}
html body #htnsChatDrawer .chat-tab-copy strong {
  color:inherit !important;
  font-size:12px !important;
  font-weight:650 !important;
  line-height:1.15 !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
}
html body #htnsChatDrawer .chat-tab-count {
  position:static !important;
  transform:none !important;
  flex:0 0 auto !important;
  min-width:16px !important;
  height:16px !important;
  padding:0 4px !important;
  border-radius:8px !important;
  color:#fff !important;
  background:#2482b8 !important;
  font-size:9px !important;
  font-weight:650 !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer [hidden] {display:none !important;}
html body #htnsChatDrawer #htnsChatMessages {
  flex:1 1 auto !important;
  min-height:0 !important;
  padding:10px 12px !important;
  background:#fff !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-width:thin !important;
  scroll-behavior:auto !important;
}
html body #htnsChatDrawer .chat-load-older {
  min-height:28px !important;
  margin:0 0 6px !important;
  padding:3px !important;
  border:0 !important;
  background:transparent !important;
  color:#6d7f91 !important;
  font-size:10px !important;
  font-weight:500 !important;
}
html body #htnsChatDrawer .chat-date-separator {
  display:block !important;
  margin:10px 0 !important;
  padding:0 !important;
  background:transparent !important;
  color:#8a96a5 !important;
  font-size:10px !important;
  font-weight:500 !important;
  text-align:center !important;
  letter-spacing:0 !important;
}
html body #htnsChatDrawer .chat-date-separator::before,
html body #htnsChatDrawer .chat-date-separator::after {content:none !important;}
html body #htnsChatDrawer .chat-message {display:block !important;margin:0 0 9px !important;}
html body #htnsChatDrawer .chat-message-row {display:flex !important;gap:0 !important;align-items:flex-start !important;}
html body #htnsChatDrawer .chat-message-stack {
  width:auto !important;
  max-width:min(86%,360px) !important;
  gap:3px !important;
}
html body #htnsChatDrawer .chat-message-head {margin:0 !important;padding:0 3px !important;}
html body #htnsChatDrawer .chat-message-head strong {color:#64758a !important;font-size:11px !important;font-weight:650 !important;}
html body #htnsChatDrawer .chat-bubble {
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  padding:8px 10px 5px !important;
  border:0 !important;
  border-radius:13px 13px 13px 4px !important;
  background:#f0f4f8 !important;
  color:#253e58 !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer .chat-message.mine .chat-bubble {border-radius:13px 13px 4px 13px !important;background:#247eae !important;color:#fff !important;}
html body #htnsChatDrawer .chat-message.deleted .chat-bubble,
html body #htnsChatDrawer .chat-message.mine.deleted .chat-bubble {min-width:0 !important;background:#f4f6f8 !important;color:#8492a1 !important;}
html body #htnsChatDrawer .chat-message-body {font-size:14px !important;line-height:1.4 !important;font-weight:450 !important;}
html body #htnsChatDrawer .chat-message-meta {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:7px !important;
  margin-top:2px !important;
  min-height:17px !important;
  color:#8592a1 !important;
  font-size:9px !important;
  font-weight:500 !important;
}
html body #htnsChatDrawer .chat-message.mine .chat-message-meta {color:rgba(255,255,255,.8) !important;}
html body #htnsChatDrawer .chat-message.deleted .chat-message-meta {color:#8492a1 !important;}
html body #htnsChatDrawer .chat-reaction-row {min-height:0 !important;gap:4px !important;margin:0 !important;}
html body #htnsChatDrawer .chat-reaction-add {
  display:grid !important;
  place-items:center !important;
  width:24px !important;
  min-width:24px !important;
  height:24px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:inherit !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer .chat-reaction-add svg {width:15px !important;height:15px !important;}
html body #htnsChatDrawer .chat-reaction-chip {height:24px !important;min-width:28px !important;padding:0 6px !important;font-size:11px !important;}
html body #htnsChatDrawer .chat-reaction-picker {bottom:8px !important;}
html body #htnsChatDrawer .chat-composer {
  display:block !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:8px !important;
  border-top:1px solid #edf1f5 !important;
  background:#fff !important;
}
html body #htnsChatDrawer .chat-composer-row {
  display:grid !important;
  grid-template-columns:44px minmax(0,1fr) 44px !important;
  align-items:end !important;
  gap:6px !important;
  width:100% !important;
}
html body #htnsChatDrawer .chat-composer-btn {
  width:44px !important;
  height:44px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:12px !important;
  background:transparent !important;
  color:#627b91 !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer .chat-composer-btn svg {width:21px !important;height:21px !important;}
html body #htnsChatDrawer .chat-input-shell {
  display:block !important;
  min-width:0 !important;
  min-height:44px !important;
  padding:0 !important;
  border:1px solid #e2e9f0 !important;
  border-radius:13px !important;
  background:#f6f8fa !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer #htnsChatInput {
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  min-height:42px !important;
  max-height:88px !important;
  margin:0 !important;
  padding:10px 11px !important;
  border:0 !important;
  background:transparent !important;
  color:#263f57 !important;
  font-size:16px !important;
  font-weight:400 !important;
  line-height:1.35 !important;
  box-sizing:border-box !important;
  resize:none !important;
  overflow-y:auto !important;
}
html body #htnsChatDrawer #htnsChatInput::placeholder {color:#98a4b1 !important;}
html body #htnsChatDrawer #htnsChatSend.chat-send-btn {
  width:44px !important;
  min-width:44px !important;
  height:44px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:13px !important;
  background:#247eae !important;
  color:#fff !important;
  box-shadow:none !important;
}
html body #htnsChatDrawer #htnsChatSend.chat-send-btn:disabled {background:#e8edf2 !important;color:#a4b3c0 !important;opacity:1 !important;}
html body #htnsChatDrawer #htnsChatSend.chat-send-btn svg {width:21px !important;height:21px !important;}
html body #htnsChatDrawer .chat-pending-wrap {
  flex:0 1 auto !important;
  min-height:0 !important;
  max-height:112px !important;
  padding:6px 10px !important;
  overflow-y:auto !important;
  background:#fbfcfe !important;
}
html body #htnsChatDrawer .chat-pending-list {gap:5px !important;}
html body #htnsChatDrawer .chat-pending-item {padding:5px 7px !important;gap:7px !important;border:1px solid #e2e9f0 !important;border-radius:10px !important;box-shadow:none !important;}
html body #htnsChatDrawer .chat-attachment-thumb,
html body #htnsChatDrawer .chat-attachment-icon {width:32px !important;height:32px !important;flex-basis:32px !important;border-radius:8px !important;}
html body #htnsChatDrawer .chat-attachment-copy b {font-size:11px !important;font-weight:600 !important;}
html body #htnsChatDrawer .chat-attachment-copy small {font-size:9px !important;font-weight:500 !important;}
html body #htnsChatDrawer .chat-pending-remove {width:32px !important;height:32px !important;flex-basis:32px !important;}
html body #htnsChatDrawer button:focus-visible {outline:2px solid #70acd2 !important;outline-offset:-2px !important;}
html body #htnsChatDrawer .chat-input-shell:focus-within {border-color:#8fbdd8 !important;}
@media (min-width:720px) {
  html body #htnsChatDrawer {left:auto !important;right:16px !important;width:min(400px,calc(100vw - 32px)) !important;}
}
