/**
 * Mobile Swiper fluidity helpers.
 *
 * Keeps horizontal drags on the compositor and avoids browser pan conflicts on
 * mobile without changing the visual design of existing cards.
 */

.frc-swiper,
.frc-single-run__runs-section .frc-swiper--runs,
.frc-single-club__runs-section .frc-swiper--runs,
.frc-search-page__map-list .swiper {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: contain;
}

.frc-swiper .swiper-wrapper,
.frc-single-run__runs-section .frc-swiper--runs .swiper-wrapper,
.frc-single-club__runs-section .frc-swiper--runs .swiper-wrapper,
.frc-search-page__map-list .swiper-wrapper {
  will-change: transform;
}

.frc-swiper .swiper-slide,
.frc-single-run__runs-section .frc-swiper--runs .swiper-slide,
.frc-single-club__runs-section .frc-swiper--runs .swiper-slide,
.frc-search-page__map-list .swiper-slide {
  backface-visibility: hidden;
  flex-shrink: 0;
  transform: translateZ(0);
}

@media (max-width: 767px) {
  .frc-swiper--runs {
    overflow: visible;
  }

  .frc-swiper--runs .swiper-slide {
    width: min(78vw, 280px);
  }

  .frc-swiper--runs .frc-card-allruns,
  .frc-swiper--runs .frc-card-run {
    width: 100%;
    max-width: none;
  }

  .frc-single-run__runs-section .frc-card-run,
  .frc-single-club__runs-section .frc-card-run {
    width: 100%;
  }

  .frc-search-page__map-list .swiper {
    touch-action: pan-y !important;
  }
}

@media (prefers-reduced-motion: reduce) {
.frc-swiper .swiper-wrapper,
.frc-single-run__runs-section .frc-swiper--runs .swiper-wrapper,
.frc-single-club__runs-section .frc-swiper--runs .swiper-wrapper,
.frc-search-page__map-list .swiper-wrapper {
    will-change: auto;
  }
}
