:root{--wme-accent:#c70000}
.wme-open{overflow:hidden!important}

/* Eigener, robuster Videodialog. Unabhängig von Theme- und GLightbox-Größenregeln. */
.wme-video-modal[hidden]{display:none!important}
.wme-video-modal{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;
  opacity:0;
  transition:opacity .16s ease;
}
.wme-video-modal.is-open{opacity:1}
.wme-video-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.94)}
.wme-video-stage{
  position:relative!important;
  z-index:1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:min(94vw,1400px,calc(82dvh * 16 / 9))!important;
  max-width:calc(100vw - max(36px,env(safe-area-inset-left)) - max(36px,env(safe-area-inset-right)))!important;
  max-height:82dvh!important;
  margin:auto!important;
  box-sizing:border-box!important;
}
.wme-video-frame{
  position:relative!important;
  width:100%!important;
  aspect-ratio:16/9!important;
  max-height:82dvh!important;
  background:#000!important;
  box-shadow:0 24px 80px rgba(0,0,0,.65)!important;
  overflow:hidden!important;
}
.wme-video-frame video,.wme-video-frame iframe{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  border:0!important;
  object-fit:contain!important;
  background:#000!important;
}
.wme-video-close,.wme-video-nav{
  position:absolute!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  min-height:48px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:50%!important;
  background:rgba(10,10,10,.82)!important;
  color:#fff!important;
  font-family:Arial,sans-serif!important;
  line-height:1!important;
  cursor:pointer!important;
  appearance:none!important;
  box-shadow:none!important;
}
.wme-video-close{top:-62px!important;right:0!important;font-size:38px!important;font-weight:200!important}
.wme-video-prev{left:-62px!important;top:50%!important;transform:translateY(-50%)!important;font-size:42px!important}
.wme-video-next{right:-62px!important;top:50%!important;transform:translateY(-50%)!important;font-size:42px!important}
.wme-video-close:hover,.wme-video-nav:hover,.wme-video-close:focus-visible,.wme-video-nav:focus-visible{background:var(--wme-accent)!important;outline:2px solid #fff!important;outline-offset:2px!important}

/* GLightbox bleibt nur für Bilder und Galerien zuständig. */
.glightbox-container{z-index:2147483000!important}
.goverlay{background:rgba(0,0,0,.94)!important}
.gclose,.gnext,.gprev{z-index:2147483647!important;pointer-events:auto!important}

@media(max-width:760px){
  .wme-video-modal{
    padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;
  }
  .wme-video-stage{
    width:min(calc(100vw - 24px),calc(78dvh * 16 / 9))!important;
    max-width:calc(100vw - max(24px,env(safe-area-inset-left)) - max(24px,env(safe-area-inset-right)))!important;
    max-height:78dvh!important;
  }
  .wme-video-frame{max-height:78dvh!important}
  .wme-video-close{top:-56px!important;right:0!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}
  .wme-video-prev{left:8px!important;top:auto!important;bottom:-58px!important;transform:none!important}
  .wme-video-next{right:8px!important;top:auto!important;bottom:-58px!important;transform:none!important}
}

@media(orientation:landscape) and (max-height:600px){
  .wme-video-stage{width:min(90vw,calc(72dvh * 16 / 9),1400px)!important;max-height:72dvh!important}
  .wme-video-frame{max-height:72dvh!important}
  .wme-video-close{top:0!important;right:-56px!important}
}
