@use 'sass:map';

$play-button-circle-diameter: (
  'desktop': 100px,
  'mobile': 60px
);

.video-loader {
  animation: loading 1.1s infinite linear;
  border-block-end: 4px solid rgba(255, 255, 255, 0.2);
  border-block-start: 4px solid rgba(255, 255, 255, 0.2);
  border-inline-end: 4px solid rgba(255, 255, 255, 0.2);
  border-inline-start: 4px solid #fff;
  display: none;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  margin-block-start: -(map.get($play-button-circle-diameter, 'mobile') * 0.5);
  margin-inline-start: -(map.get($play-button-circle-diameter, 'mobile') * 0.5);
  position: absolute;
  text-indent: -9999em;
  z-index: 1;

  @media (min-width: $breakpoint-tablet) {
    margin-block-start: -(map.get($play-button-circle-diameter, 'desktop') * 0.5);
    margin-inline-start: -(map.get($play-button-circle-diameter, 'desktop') * 0.5);
  }
}

.video-loader,
.video-loader::after {
  block-size: map.get($play-button-circle-diameter, 'mobile');
  border-radius: 50%;
  inline-size: map.get($play-button-circle-diameter, 'mobile');

  @media (min-width: $breakpoint-tablet) {
    block-size: map.get($play-button-circle-diameter, 'desktop');
    inline-size: map.get($play-button-circle-diameter, 'desktop');
  }
}

@keyframes loading {
  0% {
    rotate: 0deg;
  }

  100% {
    rotate: 360deg;
  }
}
