/* Видеоплеер */

/* Видео: плеер в просмотрщике «Видеогалереи» */
.video-player {
  display: flex;
  flex-direction: column;
  margin: 0 3.75rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #050a1b;
}
.video-player__stage { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 10rem); background: #000; }
/* ролик вписан в сцену 16 : 9 — вертикальное видео не растягивает её по высоте */
.video-player__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}
.video-player__video:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.video-player__fallback { padding: 2rem; color: #fff; }
.video-player__fallback a { color: var(--orange); text-decoration: underline; }
/* Большая кнопка по центру — пока ролик на паузе */
.video-player__big {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6rem;                     /* 96 */
  height: 6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.video-player__big:hover,
.video-player__big:focus-visible { background-color: #f18f34; transform: translate(-50%, -50%) scale(1.06); }
.video-player__big svg { display: block; width: 2.25rem; height: 2.25rem; margin-left: .25rem; }
.video-player__big[hidden],
.video-player.is-playing .video-player__big { display: none; }
/* Панель: пауза, перемотка, время, звук, громкость, полный экран */
.video-player__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .875rem 1.5rem;
  background: #050a1b;
  color: #fff;
}
.video-player__bar[hidden] { display: none; }
.video-player__btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;                   /* 40 */
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.video-player__btn:hover,
.video-player__btn:focus-visible { color: var(--orange); }
.video-player__btn--play { background: var(--orange); }
.video-player__btn--play:hover,
.video-player__btn--play:focus-visible { background-color: #f18f34; color: #fff; }
.video-player__btn svg { display: block; width: 1.5rem; height: 1.5rem; }
.video-player__btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* Значки состояний: у каждой кнопки оба варианта в разметке, видим нужный */
.video-player__icon-pause,
.video-player__icon-muted,
.video-player__icon-exit { display: none; }
.video-player.is-playing .video-player__icon-play { display: none; }
.video-player.is-playing .video-player__icon-pause { display: inline; }
.video-player.is-muted .video-player__icon-sound { display: none; }
.video-player.is-muted .video-player__icon-muted { display: inline; }
.video-player.is-fullscreen .video-player__icon-enter { display: none; }
.video-player.is-fullscreen .video-player__icon-exit { display: inline; }
.video-player__time {
  flex: none;
  margin: 0;
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .8);
}
.video-player__range {
  --fill: 0%;
  flex: 1 1 auto;
  min-width: 0;
  height: 1.25rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.video-player__range--volume { flex: 0 0 6rem; }
.video-player__range::-webkit-slider-runnable-track {
  height: .3125rem;
  border-radius: .3125rem;
  background: linear-gradient(to right, var(--orange) var(--fill), rgba(255, 255, 255, .25) var(--fill));
}
.video-player__range::-webkit-slider-thumb {
  width: .875rem;
  height: .875rem;
  margin-top: -.28125rem;
  border: 0;
  border-radius: 50%;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
.video-player__range::-moz-range-track { height: .3125rem; border-radius: .3125rem; background: rgba(255, 255, 255, .25); }
.video-player__range::-moz-range-progress { height: .3125rem; border-radius: .3125rem; background: var(--orange); }
.video-player__range::-moz-range-thumb { width: .875rem; height: .875rem; border: 0; border-radius: 50%; background: #fff; }
.video-player__range:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.video-player:fullscreen { width: 100%; height: 100%; margin: 0; border-radius: 0; }
.video-player:fullscreen .video-player__stage { flex: 1 1 auto; aspect-ratio: auto; }
.video-player:-webkit-full-screen { width: 100%; height: 100%; margin: 0; border-radius: 0; }
.video-player:-webkit-full-screen .video-player__stage { flex: 1 1 auto; aspect-ratio: auto; }
@media (max-width: 1279px) {
  .video-player { margin: 0 1rem; }
  .video-player__bar { gap: 1rem; padding: .75rem 1rem; }
  .video-player__big { width: 4.5rem; height: 4.5rem; }
  .video-player__big svg { width: 1.75rem; height: 1.75rem; }
}
@media (max-width: 767px) {
  .video-player { margin: 0 20px; }
  .video-player__bar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px 12px; }
  .video-player__range--progress { order: -1; flex: 1 1 100%; }
  .video-player__range--volume { display: none; }
  .video-player__time { margin-right: auto; font-size: 14px; }
  .video-player__btn { width: 36px; height: 36px; }
  .video-player__btn svg { width: 22px; height: 22px; }
  .video-player__big { width: 60px; height: 60px; }
  .video-player__big svg { width: 24px; height: 24px; margin-left: 3px; }
}
