/* DETAIL_VIDEO_CONTROLS_AND_FULL_HEIGHT_SIDE_FADE_V1
   Publication detail only: side fade over the real media frame, never the page,
   and site-owned controls above it. Do not crop or filter third-party players. */

/* Keep the original picture and provider iframe intact. The vignette only
   fades the outer 19% of the shared content frame, top to bottom. */
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
>.detail-media-card>.offer-media.detail-market-media[data-detail-media]::before,
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
>.detail-media-card>.offer-media.detail-market-media[data-detail-media]::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  height:100%!important;
  width:min(19%,225px)!important;
  max-width:50%!important;
  min-height:0!important;
  z-index:14!important;
  border:0!important;
  border-radius:0!important;
  opacity:1!important;
  pointer-events:none!important;
  filter:none!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
>.detail-media-card>.offer-media.detail-market-media[data-detail-media]::before{
  left:0!important;right:auto!important;
  background:linear-gradient(90deg,#000 0%,rgba(0,0,0,.96) 8%,rgba(0,0,0,.70) 33%,rgba(0,0,0,.24) 74%,transparent 100%)!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
>.detail-media-card>.offer-media.detail-market-media[data-detail-media]::after{
  right:0!important;left:auto!important;
  background:linear-gradient(270deg,#000 0%,rgba(0,0,0,.96) 8%,rgba(0,0,0,.70) 33%,rgba(0,0,0,.24) 74%,transparent 100%)!important;
}
/* The toolbar is a direct child of the media stage, not of the embedded
   iframe wrapper. This prevents the full-height player from clipping it. */
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls{
  position:absolute!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  left:clamp(16px,2.5vw,30px)!important;
  right:auto!important;
  top:auto!important;
  bottom:clamp(16px,2.5vw,30px)!important;
  width:max-content!important;
  max-width:calc(100% - 32px)!important;
  min-height:48px!important;
  height:auto!important;
  gap:8px!important;
  margin:0!important;
  padding:6px!important;
  background:rgba(10,10,10,.74)!important;
  border:1px solid rgba(255,255,255,.32)!important;
  border-radius:14px!important;
  box-shadow:0 6px 24px rgba(0,0,0,.35)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  color:#fff!important;
  z-index:70!important;
  pointer-events:auto!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls[hidden]{
  display:none!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button{
  display:inline-flex!important;
  position:relative!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 42px!important;
  width:42px!important;height:42px!important;
  min-width:42px!important;min-height:42px!important;
  max-width:42px!important;max-height:42px!important;
  margin:0!important;padding:9px!important;
  transform:none!important;
  box-sizing:border-box!important;
  background:rgba(255,255,255,.12)!important;
  border:1px solid rgba(255,255,255,.26)!important;
  border-radius:10px!important;
  box-shadow:none!important;
  color:#fff!important;
  opacity:1!important;visibility:visible!important;
  cursor:pointer!important;
  overflow:visible!important;
  z-index:71!important;
  pointer-events:auto!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button:is(:hover,:focus-visible){
  background:rgba(255,255,255,.24)!important;
  border-color:rgba(255,255,255,.75)!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button:focus-visible{
  outline:2px solid #fff!important;outline-offset:2px!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button svg{
  display:block!important;width:20px!important;height:20px!important;
  min-width:0!important;max-width:100%!important;
  stroke:currentColor!important;stroke-width:1.8!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;
  fill:none!important;pointer-events:none!important;
}
/* Do not brighten the original picture or dim the provider's actual pixels. */
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
>.detail-media-card .detail-market-media .detail-inline-video :is(iframe,video){
  opacity:1!important;filter:none!important;
  transform:none!important;object-fit:contain!important;
}
/* Fullscreen includes the external player and our own controls. */
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication .detail-market-media[data-detail-media]:fullscreen{
  width:100vw!important;height:100vh!important;max-height:none!important;
  background:#000!important;border-radius:0!important;
}
html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication .detail-market-media[data-detail-media]:fullscreen .detail-inline-video{
  height:100%!important;width:100%!important;
}
@media(max-width:640px){
  html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
  >.detail-media-card>.offer-media.detail-market-media[data-detail-media]::before,
  html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-page.offer-detail.detail-unified-v3
  >.detail-media-card>.offer-media.detail-market-media[data-detail-media]::after{
    width:min(15%,75px)!important;
  }
  html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
  >.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls{
    left:12px!important;bottom:12px!important;
    gap:5px!important;padding:4px!important;
    min-height:42px!important;max-width:calc(100% - 24px)!important;
  }
  html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
  >.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button{
    flex-basis:38px!important;width:38px!important;height:38px!important;
    min-width:38px!important;min-height:38px!important;
    max-width:38px!important;max-height:38px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html:is(.theme-dark,.theme-light) body.lms-navigation-v2.page-shell.route-publication main.detail-unified-v3
  >.detail-media-card>.detail-market-media[data-detail-media]>.detail-video-controls>button{
    transition:none!important;
  }
}
