.ok-yt-player {
  --okvp-bg: #000;
  --okvp-text: #fff;
  --okvp-muted: rgba(255, 255, 255, .74);
  --okvp-track: rgba(255, 255, 255, .28);
  --okvp-primary: var(--color-primary, #0b57d0);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--okvp-bg);
  color: var(--okvp-text);
  font-family: var(--font-family-main, Arial, sans-serif);
  user-select: none;
  border-radius: 0 !important;
}

.ok-has-yt-player {
  border-radius: 0 !important;
}

.ok-yt-player video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #000;
  border-radius: 0 !important;
}

.ok-single-media .ok-yt-player,
.ok-single-media .ok-yt-player video,
.ok-single-media--video .ok-yt-player,
.ok-single-media--video .ok-yt-player video,
.ok-single-content .ok-yt-player,
.ok-single-content .ok-yt-player video,
.wp-video .ok-yt-player,
.wp-video .ok-yt-player video {
  border-radius: 0 !important;
}

html.ok-video-player-fullscreen,
body.ok-video-player-fullscreen {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.ok-yt-player.is-player-fullscreen,
.ok-yt-player:fullscreen,
.ok-yt-player:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: -webkit-fill-available !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  background: #000 !important;
}

.ok-yt-player:fullscreen,
.ok-yt-player:-webkit-full-screen {
  position: fixed !important;
}

.ok-yt-player.is-fill-fullscreen video,
.ok-yt-player.is-player-fullscreen video,
.ok-yt-player:fullscreen video,
.ok-yt-player:-webkit-full-screen video {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #000 !important;
}

.ok-yt-player video::-webkit-media-controls {
  display: none !important;
}

.ok-yt-player__surface {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.ok-yt-player__big {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: opacity .18s ease, transform .18s ease;
}

.ok-yt-player.is-playing .ok-yt-player__big {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.9);
  pointer-events: none;
}

.ok-yt-player__close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 20;
  display: none !important;
  background: rgba(0, 0, 0, .52) !important;
  backdrop-filter: blur(10px);
}

.ok-yt-player.is-player-fullscreen .ok-yt-player__close {
  display: grid !important;
}

.ok-yt-player__controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 12;
  display: grid;
  gap: 8px;
  padding: 56px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82));
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.ok-yt-player.is-controls-active .ok-yt-player__controls,
.ok-yt-player.is-paused .ok-yt-player__controls {
  opacity: 1;
}

.ok-yt-player__controls button,
.ok-yt-player__controls input,
.ok-yt-player__bar,
.ok-yt-player__close,
.ok-yt-player__big {
  pointer-events: auto;
}

.ok-yt-player__bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--okvp-track);
  cursor: pointer;
}

.ok-yt-player__progress,
.ok-yt-player__buffer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
}

.ok-yt-player__buffer {
  background: rgba(255, 255, 255, .34);
}

.ok-yt-player__progress {
  background: var(--okvp-primary);
}

.ok-yt-player__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ok-yt-player__left,
.ok-yt-player__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ok-yt-player button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.ok-yt-player button:hover,
.ok-yt-player button:focus-visible {
  background: rgba(255, 255, 255, .16);
  outline: none;
}

.ok-yt-player svg {
  display: block !important;
  width: 22px;
  height: 22px;
  max-width: none !important;
  color: inherit !important;
  fill: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.ok-yt-player svg path {
  fill: currentColor !important;
}

.ok-yt-player__time {
  min-width: 98px;
  color: var(--okvp-muted);
  font-size: 13px;
  font-weight: 700;
}

.ok-yt-player__volume {
  width: 82px;
  accent-color: #fff;
}

.ok-yt-player__loader {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, .24);
  border-top-color: var(--okvp-primary);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: okvp-spin .8s linear infinite;
  pointer-events: none;
}

.ok-yt-player.is-waiting .ok-yt-player__loader {
  opacity: 1;
}

@keyframes okvp-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 640px) {
  .ok-yt-player__controls {
    padding: 42px 10px 10px;
    padding: 42px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .ok-yt-player.is-player-fullscreen .ok-yt-player__controls {
    padding-top: 56px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .ok-yt-player__volume {
    display: none;
  }

  .ok-yt-player__time {
    min-width: auto;
    font-size: 12px;
  }

  .ok-yt-player button {
    width: 36px;
    height: 36px;
  }

  .ok-yt-player__big {
    width: 58px;
    height: 58px;
  }
}
