/* -----------------------------------------------
   Agri YouTube Custom Thumbnail — frontend styles
   ----------------------------------------------- */

.wp-block-embed.is-type-video .wp-block-embed__wrapper {
  position: relative;
}

/* Overlay sits on top of the iframe */
.yct-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #000;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle darkening layer — lightens on hover */
.yct-thumbnail-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
}

.yct-thumbnail-overlay:hover::after {
  background: rgba(0, 0, 0, 0.05);
}

/* YouTube-style play button */
.yct-play-button {
  position: relative;
  z-index: 3;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 68px;
  height: 48px;
  transition: transform 0.15s ease;
}

.yct-play-button:hover {
  transform: scale(1.1);
}

.yct-play-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  border-radius: 4px;
}

.yct-play-button svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fade out overlay after video starts playing */
.yct-thumbnail-overlay {
  transition: opacity 0.4s ease;
}

.yct-thumbnail-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}
