/* yedxjav-style player shell (ads optional; empty = play clip only) */
.rt-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px);
}

.rt-wrapper.is-ready #rt-main-player {
  visibility: visible;
}

#rt-main-player {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#rt-main-player .pp,
#rt-main-player iframe,
#rt-main-player video.pp-video {
  width: 100% !important;
  height: 100% !important;
}

#rt-main-player .pp {
  position: absolute;
  inset: 0;
  aspect-ratio: auto !important;
  border-radius: 0;
  height: 100% !important;
}

#rt-main-player iframe {
  border: 0;
  display: block;
  background: #000;
}

#rt-start-overlay,
#rt-preroll-wrap,
#rt-ad-overlay {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
}

#rt-start-overlay {
  z-index: 99997;
  display: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
}

#rt-start-overlay.is-on {
  display: flex;
}

#rt-start-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 12px 35px rgba(0, 0, 0, 0.6);
  position: relative;
}

#rt-start-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-left: 22px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

#rt-preroll-wrap {
  z-index: 99998;
  background: #000;
  flex-direction: column;
}

#rt-preroll-wrap.is-on {
  display: flex;
}

#rt-preroll-wrap video,
#rt-preroll {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.rt-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  z-index: 2;
}

.rt-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
}

.rt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rt-cta-btn {
  background: #e11d48;
  text-decoration: none;
}

#rt-ad-overlay {
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
}

#rt-ad-overlay.is-on {
  display: flex;
}

.rt-ad-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 92%;
}

.rt-ad-image-wrapper {
  position: relative;
  max-width: 350px;
  width: 100%;
}

.rt-ad-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.rt-ad-close-corner {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.rt-ad-close-btn-bottom {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

/* When shell is active, watch-player fills width; inner .pp uses absolute fill */
.watch-player .rt-wrapper .pp-video {
  object-fit: contain;
}

/* PILOT embed iframe (2 Dec 2026): give the iframe a 16:9 box so it is not 150px tall */
#rt-main-player .responsive-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
#rt-main-player .responsive-player iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Embed pages (iframe): do not stick the player to the top on portrait phones */
@media (max-width: 768px) and (orientation: portrait) {
  .watch-player:has(.responsive-player) {
    position: relative;
    top: auto;
    z-index: auto;
  }
}
