/* ==========================================
   TOTCAST HOMEPAGE SLIDER
   Desktop: horizontal, 4 of 8 thumbs visible, left/right arrows.
   Mobile:  vertical, 4 of 8 thumbs visible, up/down arrows.
========================================== */

.tz-totcast-slider {
  position: relative;
  padding: 0 48px;
  box-sizing: border-box;
}

.tz-totcast-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.tz-totcast-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.tz-totcast-track.tz-totcast-no-transition {
  transition: none;
}

.tz-totcast-slide {
  flex: 0 0 25%;
  max-width: 25%;
  box-sizing: border-box;
  padding: 0 8px;
}

.tz-totcast-slide .youtube-thumb {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Arrows */

.tz-totcast-arrow {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--totzine-yellow);
  background: #fff;
  color: var(--totzine-grey);
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}

.tz-totcast-arrow:hover,
.tz-totcast-arrow:focus-visible {
  background: var(--totzine-yellow);
  color: #fff;
}

.tz-totcast-arrow--prev {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.tz-totcast-arrow--next {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.tz-totcast-arrow--up,
.tz-totcast-arrow--down {
  display: none;
  left: 50%;
  transform: translateX(-50%);
}

.tz-totcast-arrow--up {
  top: -10px;
}

.tz-totcast-arrow--down {
  bottom: -10px;
}

/* Hide the whole arrow set when there is only one page of thumbnails */

.tz-totcast-slider--single-page .tz-totcast-arrow {
  display: none;
}

/* Mobile: vertical slider */

@media (max-width: 767.98px) {
  .tz-totcast-slider {
    padding: 44px 0;
  }

  .tz-totcast-viewport {
    touch-action: pan-x;
  }

  .tz-totcast-track {
    flex-direction: column;
  }

  .tz-totcast-slide {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    padding: 8px 0;
  }

  .tz-totcast-arrow--prev,
  .tz-totcast-arrow--next {
    display: none;
  }

  .tz-totcast-arrow--up,
  .tz-totcast-arrow--down {
    display: flex;
  }

  .tz-totcast-slider--single-page .tz-totcast-arrow {
    display: none;
  }
}
