{% css %}

.videoWithSound,
.videoTube {
  position: relative;

  /* Safari mobile bug */
  z-index: 1;
  cursor: pointer;
  
  /* Чтобы кнопка плей была по-центру узких видео */
  width: min(100%, var(--w, 100%));
}

.videoWithSound .muteButton {
  position: absolute;
  z-index: 1;
  top: var(--margin-grid-half);
  right: var(--margin-grid-half);
  width: 38rem;
  height: 38rem;
}

.videoTube .paused {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 88rem;
  height: 88rem;
}

.videoTube .paused,
.videoWithSound .muteButton {
  background-color: rgb(187 187 188 / 12%);
  box-shadow: 0 4rem 12rem rgb(0 0 0 / 12%);
  isolation: isolate;
  overflow: hidden;
  border-radius: 100rem;
  transition: 200ms;
}

.videoTube .paused::before,
.videoWithSound .muteButton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  filter: url("#video-glass-filter");
  backdrop-filter: blur(1px);
  /* Сафари не поддерживает глас-фильтр, поэтому ему блюр */
  -webkit-backdrop-filter: blur(16px);
}

.videoTube .paused::after,
.videoWithSound .muteButton::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 18%),
    inset 1.5rem 2.5rem 0 -2rem rgb(255 255 255 / 60%),
    inset -2rem -2rem 0 -2rem rgb(255 255 255 / 40%),
    inset -2rem -6rem 1rem -5rem rgb(255 255 255 / 20%),
    inset 0 2rem 3rem -2rem rgb(0 0 0 / 18%);
}

.videoTube .pausedIcon,
.videoWithSound .muteIcon {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: filter 200ms;
}

.videoTube:hover .paused,
.videoWithSound:hover .muteButton {
  transform: scale(1.08);
}

{% endcss %}
