/* Reusable scroll region with centred back-to-top (unified library search). */

.library-scroll-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.library-scroll-pane__viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.library-scroll-pane__back-to-top {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--sp-steel-300, #b0bec5);
  border-radius: 999px;
  background: var(--sp-white, #fff);
  box-shadow: 0 2px 10px rgba(27, 58, 75, 0.22);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sp-navy-700, #1b3a4b);
  cursor: pointer;
}

.library-scroll-pane__back-to-top[hidden] {
  display: none !important;
}

.library-scroll-pane__back-to-top:not([hidden]) {
  display: inline-flex;
}

.library-scroll-pane__back-to-top:hover {
  background: var(--sp-steel-50, #f4f6f8);
}
