.video-wrapper {
  position: relative;
  width: 100%;
}
/* Global ad container styles */
.global-ad-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  background-color: rgba(0, 0, 0, 0.8);
  pointer-events: all;
}

.global-ad-container.is-active {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* Container for positioning the ad over the video */
.ad-positioning-container {
  position: absolute;
  z-index: 1020;
  display: none;
  overflow: hidden;
}

.ad-positioning-container.is-active {
  display: block !important;
}

/* Zajistit, že po dokončení reklamy nebude kontejner blokovat interakci */
.global-ad-container:not(.is-active) {
  display: none !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* Video placeholder styles */
.video-placeholder {
  cursor: pointer;
  overflow: hidden;
  background-color: #000;
  transition: opacity 0.3s ease;
}

.video-placeholder:hover {
  opacity: 0.9;
}

.video-placeholder-overlay {
  transition: transform 0.3s ease;
}

.video-placeholder:hover .video-placeholder-overlay {
  transform: scale(1.05);
}

.video-placeholder-play {
  transition: background-color 0.3s ease;
}

.video-placeholder:hover .video-placeholder-play {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Legacy plyr__ads styles for backward compatibility */
.plyr__ads {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
}

.plyr__ads.is-active {
  display: block !important;
}

.plyr__ads:not(.is-active) {
  display: none !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.plyr--stopped .plyr__control--overlaid,
.plyr--paused .plyr__control--overlaid {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.plyr--full-ui.plyr--video .plyr__control--overlaid {
  display: flex !important;
}
.plyr--stopped .plyr__controls {
  display: none !important;
}

.plyr__controls *:hover {
  background: transparent !important;
}

.plyr__controls .plyr__controls__item.plyr__volume {
  order: -1;
}
.plyr__controls .plyr__controls__item.plyr__control[data-plyr="play"] {
  order: -2;
}
.plyr__controls .plyr__controls__item.plyr__control[data-plyr="play"] svg {
  aspect-ratio: 1 / 1;
  width: 11px;
}
.plyr__controls .plyr__controls__item.plyr__volume svg {
  aspect-ratio: 1 / 1;
  width: 14px;
}

.plyr__controls input[type="range"] {
  color: #fff !important;
  border-radius: 0 !important;
}
.plyr__controls input[type="range"]::-webkit-slider-thumb {
  width: 8px !important;
  height: 8px !important;
  top: 3px !important;
}

.plyr__controls
  .plyr__controls__item.plyr__control[data-plyr="fullscreen"]
  svg {
  aspect-ratio: 1 / 1;
  width: 14px;
}
.plyr__controls .plyr__controls__item.plyr__time--current.plyr__time {
  font-size: 10px !important;
}

button.plyr__control--overlaid {
  background: transparent !important;
  border: 1.5px solid #fff;
  border-radius: 100%;
  color: #fff;
  position: absolute;
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
  z-index: 100;
  padding: 1.25em;
  transition: all 0.3s ease;
  pointer-events: auto;
}

button.plyr__control--overlaid > svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

/* Zobrazení controls */
.plyr__controls {
  display: flex !important;
  opacity: 1 !important;
  padding: 0 !important;
}

/* Styling pro volume control */
.plyr__volume {
  position: relative;
}

.plyr__volume input[type="range"] {
  display: none;
}

.plyr__volume:hover input[type="range"] {
  display: block;
}