/* Horizontal scroller affordance (see h-scroll.js). The row spans the full width of its container. */
.hscroll { position: relative; width: 100%; min-width: 0; }
.hscroll > .hscroll-row { width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.hscroll > .hscroll-row::-webkit-scrollbar { display: none; }

/* Fade over the last visible item on the right (and the first one on the left once scrolled). */
.hscroll::before, .hscroll::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 56px; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity .18s ease;
}
.hscroll::after { right: 0; background: linear-gradient(to right, transparent, var(--hscroll-fade, #111) 85%); }
.hscroll::before { left: 0; width: 36px; background: linear-gradient(to left, transparent, var(--hscroll-fade, #111) 85%); }
.hscroll[data-hscroll-more]::after { opacity: 1; }
.hscroll[data-hscroll-back]::before { opacity: 1; }

/* Small /play-style arrow buttons. */
.hscroll-btn {
  position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 100px; cursor: pointer;
  background: var(--ui-control, #454545); color: #fff; box-shadow: 0 3px 0 var(--ui-depth, #151515);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.hscroll-next { right: 4px; }
.hscroll-back { left: 4px; display: none; }
.hscroll-btn:hover { background: var(--ui-control-hover, #555); }
.hscroll-btn[data-button-pressed] { box-shadow: 0 0 0 var(--ui-depth, #151515); transform: translateY(3px); }
.hscroll[data-hscroll-more] > .hscroll-next { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .hscroll-back { display: grid; }
  .hscroll[data-hscroll-back] > .hscroll-back { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .hscroll::before, .hscroll::after, .hscroll-btn { transition: none; } }
