/* A row of cards that slides sideways. Used by the Groups page and the OI
   Connect page, with /card-rows.js. */
/* The row runs to the edge of the screen, so a card cut off at the right says
   there is more. */
.card-row-frame {
  position: relative;
}

.card-row {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0.25rem clamp(1rem, 4vw, 3.75rem) 0.9rem;
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: clamp(1rem, 4vw, 3.75rem);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #d6c6ae transparent;
}

.card-row > li {
  flex: 0 0 min(78vw, 17rem);
  display: flex;
  scroll-snap-align: start;
}

.card-row-button {
  all: unset;
  position: absolute;
  top: calc(50% - 1.6rem);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #d6c6ae;
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 4px 14px rgb(47 36 24 / 18%);
  color: #5a3e1f;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.card-row-button.previous {
  left: 0.5rem;
}

.card-row-button.next {
  right: 0.5rem;
}

.card-row-button:hover {
  background: #f2e6d2;
}

.card-row-button:focus-visible {
  outline: 2px solid #8a6a43;
  outline-offset: 2px;
}

/* A finger slides the row; the arrows are for a mouse. */
@media (hover: none) {
  .card-row-button {
    display: none;
  }
}
