/* Ensure full-width and consistent layout */
.wp-block-video {
  position: relative;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}

.wp-block-video video {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
}

/* Custom central play button */
.custom-play-button {
  all: unset;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
}

/* Hide central play button when video is playing */
.wp-block-video video.playing ~ .custom-play-button {
  display: none;
}

/* Hover effect on play icon background */
.custom-play-button:hover svg .play-bg {
  fill: rgba(255, 255, 255, 0.3); 
}

/* 🔒 Hide native controls before playing */
.wp-block-video video:not(.playing)::-webkit-media-controls {
  display: none !important;
  pointer-events: none;
}

/* 👆 Show controls only on hover while playing */
.wp-block-video video.playing::-webkit-media-controls {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.wp-block-video video.playing:hover::-webkit-media-controls {
  opacity: 1;
  pointer-events: auto;
}

/* (Optional) Firefox - limited support */
.wp-block-video video:not(:hover)::-moz-media-controls {
  visibility: hidden;
}
