/* ============================================================================
   product-video.css — the video player of the "Related Products" cards
   (pregnancy.html only, together with script.js/product-video.js).
   Nothing here touches the rest of the website: every rule starts with
   .showcase-card--video or .gf-pv.
   ========================================================================== */

/* ---- the card: one big button for a visitor -------------------------------- */

.showcase-card--video {
  position: relative;
}

/* role="button" is set by the script for visitors only, so an admin (who edits
   the card instead of playing the video) never gets the hand cursor. */
.showcase-card--video[role='button'] {
  cursor: pointer;
}

.showcase-card--video[role='button']:focus-visible {
  outline: 3px solid #7e0b9e;
  outline-offset: 3px;
}

.showcase-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(126, 11, 158, 0.92);
  box-shadow: 0 6px 16px rgba(26, 37, 90, 0.28);
  pointer-events: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.showcase-card__play svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.showcase-card--video:hover .showcase-card__play,
.showcase-card--video[role='button']:focus-visible .showcase-card__play {
  transform: scale(1.08);
  background: #d63384;
}

/* ---- the admin's own way in (the "Preview video" chip) --------------------- */

.gf-pv-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 37, 90, 0.86);
  color: #ffffff;
  font-family: "Inter", "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.gf-pv-chip:hover {
  background: #7e0b9e;
}

.gf-pv-chip:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* ---- the player window ----------------------------------------------------- */

/* below the admin panel (2147482000) but above everything on the page */
.gf-pv {
  position: fixed;
  inset: 0;
  z-index: 2147480000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Poppins", "Inter", sans-serif;
}

.gf-pv__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 37, 90, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gf-pv__box {
  position: relative;
  width: min(960px, 92vw);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gf-pv__bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gf-pv__title {
  flex: 1;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1rem, 0.8rem + 0.8vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
}

.gf-pv__close {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gf-pv__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gf-pv__close:focus-visible,
.gf-pv__sound:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* the picture is always landscape 16:9 and never cut, stretched or turned */
.gf-pv__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(82vh, calc(100vh - 150px));
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.gf-pv__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.gf-pv__sound {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #1a255a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.gf-pv__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  text-align: center;
}

/* the page behind the player does not scroll */
html.gf-pv-open,
body.gf-pv-open {
  overflow: hidden;
}

/* a phone held sideways: the window keeps the shape and stays on the screen */
@media (orientation: landscape) and (max-height: 520px) {
  .gf-pv {
    padding: 10px 12px;
  }

  .gf-pv__box {
    gap: 6px;
    max-height: calc(100vh - 20px);
  }

  .gf-pv__stage {
    max-height: 82vh;
    width: auto;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .gf-pv__title {
    font-size: 0.95rem;
  }

  .gf-pv__close {
    width: 38px;
    height: 38px;
  }

  .gf-pv__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-card__play,
  .gf-pv__close {
    transition: none;
  }
}
