/* ==========================================================================
   YouTube Shorts block (inc/video.php)
   9:16 frame. The 4:3 thumbnail has black bars; object-fit: cover shows only the frame.
   Selectors start with figure.hm-video so they beat .prose rules from theme.css.
   ========================================================================== */

figure.hm-video {
  max-width: min(300px, 100%);
  margin: 2rem auto;
  color: #0B1F3A;
}

figure.hm-video .hm-video-play {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 16px;
  background: #0B1F3A;
  color: #fff;
  text-decoration: none;
  background-image: none;
  isolation: isolate;
}

figure.hm-video .hm-video-play:focus-visible {
  outline: 3px solid #007A82;
  outline-offset: 3px;
}

figure.hm-video .hm-video-thumb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 0;
}

figure.hm-video .hm-video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 14px rgba(6, 17, 31, 0.45));
}

figure.hm-video .hm-video-disc { fill: #008C95; }
figure.hm-video .hm-video-tri { fill: #fff; }

figure.hm-video .hm-video-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

figure.hm-video figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  color: #526073;
}

figure.hm-video .hm-video-duration {
  margin-left: 0.4em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  figure.hm-video .hm-video-thumb,
  figure.hm-video .hm-video-icon {
    transition: transform 0.4s ease;
  }
  figure.hm-video .hm-video-play:hover .hm-video-thumb { transform: scale(1.03); }
  figure.hm-video .hm-video-play:hover .hm-video-icon { transform: translate(-50%, -50%) scale(1.06); }
}
