/* ============================================================
   Product Page — Floating 9:16 Video Widget
   ============================================================ */

.pv-float-wrap {
  position: fixed;
  right: 12px;
  z-index: 9000;          /* below sticky nav (9999) */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  background: #000;
  cursor: pointer;
  transition:
    top 0.25s ease,
    transform 0.3s ease,
    opacity 0.3s ease;
  will-change: top, transform;

  /* 9:16 sizing — mobile ≈ 22vw (max 100px) */
  width: clamp(76px, 22vw, 100px);
  aspect-ratio: 9 / 16;
}

/* tablet */
@media (min-width: 768px) {
  .pv-float-wrap {
    width: 150px;
  }
}

/* desktop */
@media (min-width: 1280px) {
  .pv-float-wrap {
    width: 190px;
  }
}

/* ── video element ───────────────────────────── */
.pv-float-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── top gradient + controls ─────────────────── */
.pv-float-controls {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 5px 5px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.pv-float-wrap:hover .pv-float-controls,
.pv-float-wrap.pv-touched .pv-float-controls {
  opacity: 1;
  pointer-events: auto;
}

/* ── bottom gradient + sound ─────────────────── */
.pv-float-bottom {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 14px 5px 5px;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.pv-float-wrap:hover .pv-float-bottom,
.pv-float-wrap.pv-touched .pv-float-bottom {
  opacity: 1;
  pointer-events: auto;
}

/* ── icon buttons ────────────────────────────── */
.pv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.pv-btn:hover {
  background: rgba(0,0,0,.80);
}

/* ── slide-out hidden state ──────────────────── */
.pv-float-wrap.pv-hidden {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

/* ── play-pause icon overlay ─────────────────── */
.pv-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 26px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.pv-float-wrap.pv-paused .pv-play-icon {
  opacity: 1;
}
