/* 홈의 GICUS 제품 영상(gicus/GicusProductVideo.tsx) */
.gc-product-video {
  --video-radius: 18px;
  min-width: 0;
  border: 0;
  border-radius: var(--video-radius);
  background: transparent;
  box-shadow: 0 24px 64px -24px rgb(23 55 85 / 24%);
}
/* 창은 정확히 16:9로 둔다: 좁은 휴대폰에서 가운데 플레이어가 YouTube 최소 높이를 채워도
   빈 레터박스는 이 창 밖에 남는다. */
/* iframe은 둥근 마스크 하나로만 합성한다: 둥근 overflow와 clip-path를 겹치면
   영상 가장자리에 어두운 이음선이 남을 수 있다. */
.gc-product-video-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--video-radius);
  -webkit-mask-image: linear-gradient(#fff, #fff);
  mask-image: linear-gradient(#fff, #fff);
  background: #eef5fd;
}
.gc-product-video-player,
.gc-product-video-player iframe,
.gc-product-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gc-product-video-player {
  inset: 50% 0 auto;
  min-height: 200px;
  transform: translateY(-50%);
}
/* YouTube는 내부 영상을 정수 픽셀로 맞춘다: 소수 폭에서 둥근 가장자리에
   어두운 실선이 비치지 않게 프레임을 2px 넘긴다. */
.gc-product-video-player iframe {
  inset: -2px;
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border: 0;
  pointer-events: none;
}
.gc-product-video-player {
  opacity: 0;
  transition: opacity 600ms ease;
}
.gc-product-video-stage[data-status='ready'] .gc-product-video-player {
  opacity: 1;
}
.gc-product-video-poster {
  display: grid;
  place-items: center;
  background: #eef5fd;
  opacity: 1;
  transition: opacity 600ms ease;
}
.gc-product-video-stage[data-status='ready'] .gc-product-video-poster {
  opacity: 0;
  pointer-events: none;
}
.gc-product-video-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gc-product-video-stage:is([data-status='poster'], [data-status='error']) .gc-product-video-poster::after {
  position: absolute;
  inset: 0;
  background: rgb(15 24 34 / 20%);
  content: '';
}
.gc-product-video-start {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid rgb(255 255 255 / 36%);
  border-radius: 999px;
  color: #fff;
  background: #163c64;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}
.gc-product-video-start svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.gc-product-video-start:disabled {
  cursor: progress;
}
.gc-product-video-start:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
.gc-product-video-toggle {
  position: absolute;
  z-index: 2;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* 조용한 재생이어도 키보드·스크린리더 사용자에게는 일시정지 버튼을 내준다. */
.gc-product-video-toggle:focus-visible {
  inset: auto 16px 16px auto;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 16px;
  clip-path: none;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #163c64;
  outline: 2px solid #fff;
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .gc-product-video {
    --video-radius: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gc-product-video-player,
  .gc-product-video-poster {
    transition: none;
  }
}
