
/* ============================================================
   RW SCROLL PLAYER — geïsoleerde stijlen
   Scoped reset zodat Elementor / theme niets overschrijft
============================================================ */
.rw-sp-section,
.rw-sp-section *,
.rw-sp-section *::before,
.rw-sp-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Scroll layout ===== */
.rw-sp-section {
  display: block;

  width: 100%;
}

.rw-sp-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== Player ===== */
.rw-sp-player {
  position: relative;
  width: 75%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0,0,0,.45);
  transition: width .7s cubic-bezier(.2,.8,.2,1),
              border-radius .7s ease;

  /* Zelfde CSS variabelen als rw-player */
  --rw-sp-gap:          12px;
  --rw-sp-btn-bg:       rgba(255,255,255,.08);
  --rw-sp-btn-fg:       #fff;
  --rw-sp-btn-bg-hover: rgba(255,255,255,.18);
  --rw-sp-track-bg:     rgba(255,255,255,.28);
  --rw-sp-track-h:      6px;
  --rw-sp-thumb-w:      26px;
  --rw-sp-thumb-h:      18px;
  --rw-sp-fill:         #fff;
}

.rw-sp-section.is-active .rw-sp-player {
  width: 100%;
  border-radius: 0;
}

/* ===== Video ===== */
.rw-sp-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Grote center play knop ===== */
.rw-sp-center {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 74px !important;
  height: 74px !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(0,0,0,.55) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255,255,255,.15) !important;
  color: #fff !important;
  cursor: pointer;
  z-index: 3;
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1 !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  font-size: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}
.rw-sp-center:hover {
  transform: translate(-50%,-50%) scale(1.06) !important;
  background: rgba(0,0,0,.68) !important;
}
.rw-sp-center svg {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.rw-sp-player.is-playing .rw-sp-center {
  opacity: 0;
  pointer-events: none;
}

/* ===== Controls balk ===== */
.rw-sp-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: var(--rw-sp-gap);
  padding: 10px 12px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 4;
}
.rw-sp-glass {
  background: rgba(20,20,20,.35);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.16);
}
.rw-sp-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Zichtbaar: hover, controls-visible class, of gepauzeerd */
.rw-sp-player:hover .rw-sp-controls,
.rw-sp-player.controls-visible .rw-sp-controls,
.rw-sp-player:not(.is-playing) .rw-sp-controls {
  opacity: 1;
  transform: none;
}

/* ===== Buttons — identiek aan rw-btn ===== */
.rw-sp-btn {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  max-width: none !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: var(--rw-sp-btn-bg) !important;
  color: var(--rw-sp-btn-fg) !important;
  cursor: pointer;
  transition: background .2s, transform .2s;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1 !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  font-size: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
  float: none !important;
}
.rw-sp-btn:hover  { background: var(--rw-sp-btn-bg-hover); }
.rw-sp-btn:active { transform: translateY(1px); }

/* Icons — identiek aan rw-icon */
.rw-sp-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

/* Play/pause wissel */
.rw-sp-icon-pause                           { display: none; }
.rw-sp-player.is-playing .rw-sp-icon-play  { display: none; }
.rw-sp-player.is-playing .rw-sp-icon-pause { display: block; }

/* Volume wissel */
.rw-sp-icon-vol-off                        { display: none; }
.rw-sp-player.is-muted .rw-sp-icon-vol-on  { display: none; }
.rw-sp-player.is-muted .rw-sp-icon-vol-off { display: block; }

/* ===== Seekbar — identiek aan rw-track / rw-seek ===== */
.rw-sp-track {
  --p: 0;
  position: relative;
  flex: 1 1 auto;
  height: var(--rw-sp-track-h);
  display: flex;
  align-items: center;
  will-change: transform;
}

.rw-sp-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--rw-sp-track-h);
  background: var(--rw-sp-track-bg);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  /* Elementor reset */
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.rw-sp-seek-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: var(--rw-sp-track-h);
  width: 100%;
  transform-origin: left center;
  transform: translateY(-50%) scaleX(var(--p));
  background: var(--rw-sp-fill);
  border-radius: 999px;
  z-index: 1;
  transition: transform 90ms linear;
  pointer-events: none;
}

.rw-sp-track.is-dragging .rw-sp-seek-fill {
  transition: none;
}

/* Thumb — ovaal, identiek aan rw-seek thumb */
.rw-sp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--rw-sp-thumb-w);
  height: var(--rw-sp-thumb-h);
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  position: relative;
  z-index: 3;
  cursor: pointer;
}
.rw-sp-seek::-moz-range-thumb {
  width: var(--rw-sp-thumb-w);
  height: var(--rw-sp-thumb-h);
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  cursor: pointer;
}
.rw-sp-seek::-moz-range-track {
  height: var(--rw-sp-track-h);
  background: transparent;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  /* Op mobiel: sticky hoogte = video hoogte, geen lege ruimte */
  .rw-sp-sticky {
    height: auto;
    align-items: flex-start;
  }
  .rw-sp-player {
    width: 100%;
    border-radius: 0;
  }
  .rw-sp-section.is-active .rw-sp-player {
    border-radius: 0;
  }
  .rw-sp-controls { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; }
  .rw-sp-center   { width: 64px; height: 64px; }
}

.rw-sp-player:focus-within .rw-sp-controls {opacity:1;transform:none}
.rw-sp-section button:focus-visible,.rw-sp-seek:focus-visible {outline:2px solid #ffa800;outline-offset:3px}
.rw-sp-section .rw-sp-btn {width:44px!important;height:44px!important}
.rw-sp-player.is-playing .rw-sp-center {visibility:hidden}
.rw-sp-video {border-radius:0!important}
.rw-sp-section {margin:56px 0 80px}
.rw-sp-error {position:absolute;top:12px;left:12px;color:white;background:#111;padding:8px}
.rw-sp-error:empty {display:none}
@media(prefers-reduced-motion:reduce){.rw-sp-section *{transition:none!important}.rw-sp-player{width:100%}}

.single-product .rwc-product-sections > .rw-sp-section {width:var(--cs-media-viewport,100%);max-width:none;margin-left:calc(50% - var(--cs-media-viewport,100%)/2)!important}
.rw-sp-section .rw-sp-player,.rw-sp-section.is-active .rw-sp-player {width:100%;flex-shrink:0;transform-origin:center;transition:none;border-radius:0}
.rw-sp-section .rw-sp-sticky {height:max(100vh,56.25vw)}
@media(max-width:640px){.rw-sp-section .rw-sp-sticky{height:auto}}
