/* Main card = player.html surface + red circular controls (image match) */
#sp-walkthrough .cinematic-slide .sp-ph-player {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 50 !important;
  background: #000 !important;
  display: none;
  overflow: hidden;
  border-radius: inherit;
}
#sp-walkthrough .cinematic-slide.sp-ph-active .sp-ph-player {
  display: block !important;
}
#sp-walkthrough .cinematic-slide.sp-ph-active .poster-wrapper > img,
#sp-walkthrough .cinematic-slide.sp-ph-active a.playBut,
#sp-walkthrough .cinematic-slide.sp-ph-active .poster-wrapper > .sp-custom-scrub {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#sp-walkthrough .cinematic-slide.sp-ph-active .poster-wrapper > .live-video {
  display: none !important;
  visibility: hidden !important;
}
#sp-walkthrough .cinematic-slide .sp-ph-frame,
#sp-walkthrough .cinematic-slide .sp-ph-frame iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}
#sp-walkthrough .cinematic-slide .sp-ph-frame iframe {
  pointer-events: none !important;
}

/* player.html-style bottom bar */
#sp-walkthrough .cinematic-slide .sp-ph-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.45) 75%, transparent 100%);
  pointer-events: auto;
}

/* Red circular buttons — match reference image */
#sp-walkthrough .cinematic-slide .sp-ph-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #e50914;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  pointer-events: auto;
}
#sp-walkthrough .cinematic-slide .sp-ph-btn:hover {
  filter: brightness(1.08);
}
#sp-walkthrough .cinematic-slide .sp-ph-btn svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  display: block;
  pointer-events: none;
}

#sp-walkthrough .cinematic-slide .sp-ph-time-cur,
#sp-walkthrough .cinematic-slide .sp-ph-time-dur {
  flex: 0 0 auto;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: center;
  white-space: nowrap;
}

#sp-walkthrough .cinematic-slide .sp-ph-track {
  flex: 1 1 auto;
  position: relative;
  height: 6px;
  min-width: 40px;
  background: rgba(255,255,255,0.28);
  border-radius: 4px;
  cursor: pointer;
  overflow: visible;
}
#sp-walkthrough .cinematic-slide .sp-ph-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: #e50914;
  border-radius: 4px;
  pointer-events: none;
}
#sp-walkthrough .cinematic-slide .sp-ph-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  pointer-events: none;
}

#sp-walkthrough .cinematic-slide .sp-ph-quality {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 4px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(0,0,0,0.35);
}

@media (max-width: 991px) {
  #sp-walkthrough .cinematic-slide .sp-ph-controls {
    gap: 8px;
    padding: 12px 10px 10px;
  }
  #sp-walkthrough .cinematic-slide .sp-ph-btn {
    width: 32px;
    height: 32px;
  }
  #sp-walkthrough .cinematic-slide .sp-ph-btn svg {
    width: 14px;
    height: 14px;
  }
  #sp-walkthrough .cinematic-slide .sp-ph-time-cur,
  #sp-walkthrough .cinematic-slide .sp-ph-time-dur {
    font-size: 11px;
    min-width: 30px;
  }
  #sp-walkthrough .cinematic-slide .sp-ph-quality {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* 1440p fit — fill card, no stretch blur */
#sp-walkthrough .cinematic-slide .sp-ph-frame {
  background: #000 !important;
}
#sp-walkthrough .cinematic-slide .sp-ph-frame iframe {
  object-fit: contain !important;
  transform: none !important;
  filter: none !important;
  image-rendering: auto !important;
}
/* Expanded window — same crisp fit */
body.sp-player-expanded .sp-ph-player,
body.sp-player-expanded .sp-ph-frame,
body.sp-player-expanded .sp-ph-frame iframe,
html body .poster-wrapper.is-expanded .sp-ph-player,
html body .poster-wrapper.is-expanded iframe {
  transform: none !important;
  filter: none !important;
}
html body .poster-wrapper.is-expanded,
html body .poster-wrapper.is-expanded .sp-ph-player {
  background: #000 !important;
}
html body .poster-wrapper.is-expanded .sp-ph-frame iframe {
  width: 100% !important;
  height: 100% !important;
  inset: 0 !important;
  object-fit: contain !important;
}
/* Keep ph controls usable in expand */
html body .poster-wrapper.is-expanded .sp-ph-controls,
body.sp-player-expanded .sp-ph-controls {
  display: flex !important;
  z-index: 100050 !important;
  pointer-events: auto !important;
}

/* EXPAND: video fills the expanded window completely */
html body.sp-player-expanded .poster-wrapper.sp-expand-on,
html body .poster-wrapper.sp-expand-on {
  overflow: hidden !important;
  background: #000 !important;
}
html body.sp-player-expanded .poster-wrapper.sp-expand-on .sp-ph-player,
html body .poster-wrapper.sp-expand-on .sp-ph-player,
html body.sp-player-expanded .cinematic-slide.sp-ph-active .sp-ph-player {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 1 !important;
}
html body.sp-player-expanded .sp-ph-frame,
html body .poster-wrapper.sp-expand-on .sp-ph-frame {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
html body.sp-player-expanded .sp-ph-frame iframe,
html body .poster-wrapper.sp-expand-on .sp-ph-frame iframe,
html body .poster-wrapper.sp-expand-on iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  transform: none !important;
  filter: none !important;
  object-fit: contain !important;
}
/* In-card (not expanded) also fill poster area */
#sp-walkthrough .cinematic-slide.sp-ph-active .poster-wrapper {
  overflow: hidden !important;
}
#sp-walkthrough .cinematic-slide.sp-ph-active .sp-ph-player,
#sp-walkthrough .cinematic-slide.sp-ph-active .sp-ph-frame,
#sp-walkthrough .cinematic-slide.sp-ph-active .sp-ph-frame iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
}

/* EXPAND: video only — no scrub, no quality, no buttons */
html body.sp-player-expanded .sp-ph-controls,
html body .poster-wrapper.sp-expand-on .sp-ph-controls,
html body.sp-player-expanded .sp-custom-scrub,
html body .poster-wrapper.sp-expand-on .sp-custom-scrub {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Quality menu */
#sp-walkthrough .cinematic-slide .sp-ph-q-wrap {
  position: relative;
  flex: 0 0 auto;
}
#sp-walkthrough .cinematic-slide .sp-ph-quality {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 4px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  pointer-events: auto;
}
#sp-walkthrough .cinematic-slide .sp-ph-quality:hover {
  border-color: #e50914;
  color: #e50914;
}
#sp-walkthrough .cinematic-slide .sp-ph-q-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 100px;
  background: rgba(10,10,10,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
}
#sp-walkthrough .cinematic-slide .sp-ph-q-menu[hidden] {
  display: none !important;
}
#sp-walkthrough .cinematic-slide .sp-ph-q-menu button {
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#sp-walkthrough .cinematic-slide .sp-ph-q-menu button:hover {
  background: rgba(229,9,20,0.85);
}
/* Card (not expanded): controls always on while playing */
html body:not(.sp-player-expanded) #sp-walkthrough .cinematic-slide.sp-ph-active .sp-ph-controls {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
