/* FACTORYRACING V11.68 — Vídeo de cabecera a pantalla completa.
   En las fichas con YouTube, el control de consentimiento inserta
   .fr104-embed alrededor del iframe. Debe cubrir el hero, no colocarse
   como una tarjeta/reproductor pequeño dentro del flujo del documento.
   CSS exclusivamente para fichas publicadas: no afecta al menú, al
   ADMIN, a los vídeos locales, ni a otros embeds de la web. */
body[data-fr167-ficha="1"] .fr-detail > .fr-detail-hero > .fr104-embed {
  position:absolute!important;
  inset:0!important;
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
  background:transparent!important;
  z-index:0!important;
}
/* Un iframe 16:9 debe cubrir toda la ventana (cover), sin barras,
   y mantenerse bajo el degradado y el texto de la cabecera. */
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > iframe,
body[data-fr167-ficha="1"] .fr-detail-hero > iframe {
  position:absolute!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  box-sizing:border-box!important;
  width:max(100%,177.7778svh)!important;
  height:max(100%,56.25vw)!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  transform:translate(-50%,-50%)!important;
  pointer-events:none!important;
  z-index:0!important;
}
/* Antes del consentimiento, el iframe sigue bloqueado por
   fr-v104-legal.css y se ve la imagen de portada original.
   Convertimos el aviso en un botón compacto, sin ningún mini-reproductor. */
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder:not([hidden]) {
  position:absolute!important;
  top:auto!important;
  left:auto!important;
  right:clamp(16px,3vw,46px)!important;
  bottom:clamp(18px,3vw,38px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-width:calc(100% - 32px)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  z-index:1!important;
  pointer-events:auto!important;
}
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder > p {
  display:none!important;
}
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder > button {
  width:auto!important;
  min-height:40px!important;
  margin:0!important;
  padding:10px 16px!important;
  border:1px solid rgba(255,255,255,.55)!important;
  border-radius:999px!important;
  background:rgba(10,21,33,.87)!important;
  box-shadow:0 7px 23px rgba(0,0,0,.28)!important;
  color:#fff!important;
  font:700 11px/1.35 Montserrat,Arial,sans-serif!important;
  cursor:pointer!important;
}
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder > button:hover,
body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder > button:focus-visible {
  background:rgba(25,42,60,.98)!important;
  outline-offset:3px!important;
}
/* No ofrecer «Pausar vídeo» si YouTube todavía está bloqueado.
   Cuando el usuario lo autoriza, el script de consentimiento retira
   data-fr-src y el botón de pausa se habilita automáticamente. */
body[data-fr167-ficha="1"] .fr-detail-hero:has(.fr104-embed iframe[data-fr-src]) > .fr-detail-media-toggle {
  display:none!important;
}
@media(max-width:680px) {
  body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder:not([hidden]) {
    right:16px!important;
    bottom:15px!important;
  }
  body[data-fr167-ficha="1"] .fr-detail-hero > .fr104-embed > .fr104-embed-placeholder > button {
    min-height:38px!important;
    padding:9px 13px!important;
  }
}
