/* Match the navigation's 70rem content width and responsive side gutters. */
body[data-service-page] :is(.merged-video-hero, .hardcoded-merged-hero).sample-stage.wrap {
  width: 100%;
  max-width: 73rem;
  padding-inline: 1.5rem !important;
}

@media (max-width: 48rem) {
  body[data-service-page] :is(.merged-video-hero, .hardcoded-merged-hero).sample-stage.wrap {
    padding-inline: 1.25rem !important;
  }
}

body[data-service-page] :is(.merged-video-hero, .hardcoded-merged-hero) .product-video-pair {
  justify-content: flex-end;
}

/* One control row, inside the clean video's bottom-right corner. */
body[data-service-page] .product-video-demo :is(.product-video-card, .batch-player) {
  position: relative;
}

body[data-service-page] .product-video-demo .compact-video-controls {
  position: absolute;
  inset: auto 8px 8px auto;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  opacity: 1;
  visibility: visible;
}

body[data-service-page] .product-video-demo .compact-video-controls button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-area: auto;
  gap: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 24, 27, .85);
  color: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

body[data-service-page] .product-video-demo .compact-video-controls button::before {
  display: none;
}

body[data-service-page] .product-video-demo .compact-video-controls button:hover {
  background: #242426;
}

body[data-service-page] .product-video-demo .compact-video-controls button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

body[data-service-page] .product-video-demo .compact-video-controls button:active {
  transform: translateY(1px);
}

body[data-service-page] .product-video-demo .compact-video-controls svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Accessible names and tooltips remain on the icon buttons. */
body[data-service-page] .product-video-demo .compact-video-controls button span {
  display: none;
}

/* Icons never intercept a button click, including a press held across a loop. */
body[data-service-page] :is(.compact-video-controls, .tv-controls) button > * {
  pointer-events: none;
}

/* Touch controls stay visible. Hidden desktop controls remain keyboard reachable. */
body[data-service-page] :is(.compact-video-controls, [data-tv-compare] .tv-controls) {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
  transition: opacity .15s ease;
}

@media (hover: hover) and (pointer: fine) {
  body[data-service-page] :is(.compact-video-controls, [data-tv-compare] .tv-controls) {
    opacity: 0 !important;
    pointer-events: none;
  }

  body[data-service-page] :is(.product-video-pair, .batch-video-pair):hover .compact-video-controls,
  body[data-service-page] .compact-video-controls:has(:focus-visible),
  body[data-service-page] [data-tv-compare]:hover .tv-controls,
  body[data-service-page] [data-tv-compare] .tv-controls:has(:focus-visible) {
    opacity: 1 !important;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-service-page] :is(.compact-video-controls, [data-tv-compare] .tv-controls) {
    transition: none;
  }
}
