/* TRITE: Scroll-to-bottom component (isolated styles) */
.trite-scroll-bottom {
  position: absolute; /* parent should be position: relative */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: calc(var(--chat-input-height, 56px) + 24px + env(safe-area-inset-bottom, 0px));
  z-index: 1; /* just above bubbles; below other UI */
  pointer-events: none; /* container doesn't block; button does */
}

.trite-scroll-bottom .tsb-btn {
  pointer-events: auto;
  display: none; /* toggled by JS */
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: var(--tsb-bg, rgba(0, 0, 0, 0.6));
  color: var(--tsb-fg, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.trite-scroll-bottom .tsb-btn:hover { opacity: .9; }
.trite-scroll-bottom .tsb-btn:active { transform: scale(0.98); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .trite-scroll-bottom .tsb-btn { transition: none; }
}

/* Utility class to show the button */
.trite-scroll-bottom .tsb-btn.is-visible { display: inline-flex; }
