/**
 * Feed / post video: spinner until the first frame is ready.
 * Scoped to .card__video and .post__slide--video — does not touch photo cards.
 * Marker: videopreload20260901b — no gray film over playing video.
 */
.card.card__video > .card__media-wrap,
.post__slide--video {
  position: relative;
}

.cotinder-video-preloader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card.card__video > .card__media-wrap.is-video-loading > .cotinder-video-preloader,
.post__slide--video.is-video-loading > .cotinder-video-preloader {
  opacity: 1;
}

.card.card__video > .card__media-wrap.is-video-ready > .cotinder-video-preloader,
.post__slide--video.is-video-ready > .cotinder-video-preloader {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.cotinder-video-preloader__spin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(253, 119, 40, 0.28);
  border-top-color: #fd7728;
  animation: cotinder-video-spin 0.75s linear infinite;
  box-sizing: border-box;
}

@keyframes cotinder-video-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Keep the video visible while loading — hiding it left only the dark wrap visible.
   Skip .has-storage-poster: the JPEG still is the preview until .is-video-playing. */
.card.card__video > .card__media-wrap.is-video-loading:not(.has-storage-poster) .bg-video,
.post__slide--video.is-video-loading:not(.has-storage-poster) .post__video,
.card.card__video > .card__media-wrap.is-video-ready:not(.has-storage-poster) .bg-video,
.post__slide--video.is-video-ready:not(.has-storage-poster) .post__video {
  opacity: 1;
  transition: opacity 0.15s ease;
}
