#myDiv.legacy1-r18-gate{
  position:absolute;
  inset:0;
  z-index:30;
  display:block;
  min-height:260px;
  background:rgba(255,255,255,.72);
  text-align:center;
}

/* Provider ad surface stays centered in the overlay. */
#myDiv.legacy1-r18-gate .legacy1-r18-ad-surface{
  position:absolute;
  z-index:1;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:block;
  min-width:300px;
  min-height:250px;
  text-align:center;
}

#myDiv.legacy1-r18-gate .legacy1-r18-ad-surface iframe,
#myDiv.legacy1-r18-gate .legacy1-r18-ad-surface img,
#myDiv.legacy1-r18-gate .legacy1-r18-ad-surface object,
#myDiv.legacy1-r18-gate .legacy1-r18-ad-surface embed{
  max-width:100%;
}

/* MATIKAN-ADBLOCK: center position for blocked/default state. */
#newButton{
  position:absolute;
  z-index:6;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  min-width:220px;
  padding:12px 24px;
  border:0;
  border-radius:0;
  background:#f00;
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

/* WAIT / SKIP: bottom-right so it does not cover the visible ad. */
#myButton{
  position:absolute;
  z-index:7;
  right:20px;
  bottom:20px;
  min-width:220px;
  padding:12px 24px;
  border:0;
  border-radius:0;
  background:#f00;
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

#myButton[disabled]{
  cursor:not-allowed;
  opacity:.95;
}

@media (max-width:640px){
  #myButton{
    right:12px;
    bottom:12px;
    min-width:180px;
    padding:10px 16px;
    font-size:13px;
  }

  #newButton{
    min-width:190px;
    padding:10px 16px;
    font-size:13px;
  }
}

/* v3.13.100 R18 visual full-width fix:
   Make the player iframe and the #myDiv ad-gate overlay fill the same player container.
   Fixes right-side empty strip/black gap without changing R18 adblock mechanics. */
.player-stage,
.movie-player,
.watch-player,
.player-shell,
.video-player-shell,
.embed-player,
.video-embed,
.responsive-embed {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
}

#video-player,
iframe#video-player {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  border: 0;
  margin: 0;
  padding: 0;
}

#myDiv.legacy1-r18-gate,
#myDiv {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* v3.13.101 R13 MOBILE-SAFE AD-GATE
   Source evidence: Atlas R13 known-good low-viewport test.
   Goal: ad + Skip Ads visible on desktop and small mobile viewport.
   No KAMUCURANG. No fixed viewport button. */
.adgate-player-box{
  position:relative !important;
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  aspect-ratio:16/9 !important;
  min-height:340px !important;
  overflow:hidden !important;
  background:#000 !important;
  margin:0 auto !important;
  box-sizing:border-box !important;
}

.adgate-player-box #video-player,
.adgate-player-box iframe#video-player,
.adgate-player-box #myDiv,
.adgate-player-box #myDiv.legacy1-r17-gate,
.adgate-player-box #myDiv.legacy1-r18-gate{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  max-width:100% !important;
  height:100% !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}

.adgate-player-box #video-player,
.adgate-player-box iframe#video-player{
  z-index:1 !important;
  border:0 !important;
}

.adgate-player-box #myDiv,
.adgate-player-box #myDiv.legacy1-r17-gate,
.adgate-player-box #myDiv.legacy1-r18-gate{
  z-index:20 !important;
}

.adgate-player-box #myButton,
.adgate-player-box #myDiv #myButton,
.adgate-player-box button#myButton{
  position:absolute !important;
  right:10px !important;
  top:50% !important;
  bottom:auto !important;
  left:auto !important;
  transform:translateY(-50%) !important;
  z-index:2147483647 !important;
  max-width:min(220px, calc(100% - 20px)) !important;
  box-sizing:border-box !important;
  pointer-events:auto !important;
}

.adgate-player-box #newButton{
  z-index:2147483646 !important;
}

/* v3.13.101 R13 PLAYER-STAGE CLIPPING FIX
   Root cause: .player-stage / cinema parent clips the ad-gate area on small viewport. */
@media (max-width: 767px), (max-height: 560px){
  [data-player-gate-host],
  .cinema-shell,
  .atlas-cinema,
  .player-card,
  .movie-player,
  .watch-player,
  .player-shell,
  .video-player-shell{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
  }

  .player-stage{
    position:relative !important;
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:clamp(430px, 74svh, 560px) !important;
    min-height:430px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    overflow:hidden !important;
    background:#000 !important;
    box-sizing:border-box !important;
  }

  .player-stage .player-poster{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    z-index:0 !important;
    overflow:hidden !important;
  }

  .player-stage .adgate-player-box{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:none !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
    overflow:hidden !important;
    background:transparent !important;
    z-index:5 !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  .player-stage .adgate-player-box #video-player,
  .player-stage .adgate-player-box iframe#video-player,
  .player-stage .adgate-player-box #myDiv,
  .player-stage .adgate-player-box #myDiv.legacy1-r17-gate,
  .player-stage .adgate-player-box #myDiv.legacy1-r18-gate{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    max-width:100% !important;
    height:100% !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    box-sizing:border-box !important;
  }

  .player-stage .adgate-player-box #myDiv{
    z-index:20 !important;
    overflow:hidden !important;
  }

  .player-stage .adgate-player-box #myButton,
  .player-stage .adgate-player-box #myDiv #myButton,
  .player-stage .adgate-player-box button#myButton{
    position:absolute !important;
    right:10px !important;
    top:50% !important;
    bottom:auto !important;
    left:auto !important;
    transform:translateY(-50%) !important;
    z-index:2147483647 !important;
    max-width:min(220px, calc(100% - 20px)) !important;
    box-sizing:border-box !important;
    pointer-events:auto !important;
  }

  .player-stage .adgate-player-box #newButton{
    z-index:2147483646 !important;
  }
}

