/* ==========================================================================
   video-local.css — Estilo de la fachada perezosa de vídeo (clon imarnet.net)
   --------------------------------------------------------------------------
   La fachada ocupa exactamente el mismo hueco que ocupaba el iframe de Embedly
   (el contenedor .embed-block-wrapper ya define el aspect ratio con
   padding-bottom:56.2%). Aquí solo se pinta la miniatura y el botón de play.
   ========================================================================== */

.yt-fachada {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
  overflow: hidden;
  border: 0;
  padding: 0;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.yt-fachada:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/* Miniatura: ocupa todo el hueco, centrada y recortada como hace YouTube */
.yt-fachada-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease, filter 400ms ease;
}

/* Al pasar el ratón, un leve zoom (coherente con el estilo del sitio) */
.yt-fachada:hover .yt-fachada-thumb {
  transform: scale(1.03);
  filter: brightness(0.92);
}

/* Botón de play: mismo lenguaje visual que YouTube, centrado */
.yt-fachada-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 200ms ease;
}

.yt-fachada:hover .yt-fachada-play {
  opacity: 1;
}

.yt-fachada-play svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Cuando el reproductor real se inyecta, el iframe ocupa todo el hueco */
.yt-fachada-activa {
  cursor: default;
  background: #000;
}

.yt-fachada-activa .yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
