/* ============================================================
   components/youtube.css — facade de video con carga diferida
   Par de resources/views/components/youtube.blade.php
   ============================================================ */

.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-card);
}

.yt__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: block;
}

/* La miniatura es un <img> real, no un background-image en línea: así la
   CSP no necesita 'unsafe-inline' en los estilos. Ocupa todo el botón. */
.yt__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.yt__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .5));
  transition: background .2s ease;
}
.yt__btn:hover::after,
.yt__btn:focus-visible::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .58));
}

.yt__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-green);
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.yt__btn:hover .yt__play,
.yt__btn:focus-visible .yt__play { transform: translate(-50%, -50%) scale(1.08); }
.yt__play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }

.yt__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.2;
  padding: 1rem 1.1rem;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.yt__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
