@property --chat-scroll-thumb {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

[data-chat-scrollbar] {
  --chat-scroll-active: rgba(128, 99, 143, .64);
  --chat-scroll-thumb: transparent;
  scrollbar-color: var(--chat-scroll-thumb) transparent;
  scrollbar-width: thin;
  transition: --chat-scroll-thumb 180ms ease-out;
}
[data-chat-scrollbar][data-chat-scrolling] {
  --chat-scroll-thumb: var(--chat-scroll-active);
  transition-duration: 90ms;
}

@supports selector(::-webkit-scrollbar) {
  [data-chat-scrollbar] { scrollbar-color: auto; scrollbar-width: auto; }
  [data-chat-scrollbar]::-webkit-scrollbar { width: 8px; background: transparent; }
  [data-chat-scrollbar]::-webkit-scrollbar-track,
  [data-chat-scrollbar]::-webkit-scrollbar-corner { background: transparent; }
  [data-chat-scrollbar]::-webkit-scrollbar-thumb {
    background: var(--chat-scroll-thumb);
    border-radius: 8px;
  }
  [data-chat-scrollbar]::-webkit-scrollbar-thumb:hover,
  [data-chat-scrollbar]::-webkit-scrollbar-thumb:active { background: var(--chat-scroll-active); }
}
