/*
 * Zalfol tutorial clip block (VIDEO-001).
 * Markup comes from scripts/inject_clip_block.py; behaviour from /blog/clip.js.
 * Scoped to .zf-clip so it never touches the page around it. No reset.
 */
.zf-clip {
  max-width: 320px;
  margin: 2rem auto;
  padding: 0;
}
.zf-clip-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;           /* reserves the box before the poster loads: no layout shift */
  border-radius: 22px;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid rgba(201, 168, 76, 0.35);
}
.zf-clip-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d0d0d;
}
/* controls row under the frame (VIDEO-004): the voiced clips' burned-in captions start 37-43 px from
   the top on every clip, so buttons inside the frame would cover them. Static markup: no layout shift.
   flex-end follows dir, so the row sits right in EN and left in AR. */
.zf-clip-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.zf-clip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.7);
  background: rgba(8, 8, 8, 0.72);
  color: #e8e4dc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
/* sound on/off, beside the play button */
.zf-clip-sound {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.7);
  background: rgba(8, 8, 8, 0.72);
  color: #e8e4dc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.zf-clip-sound[aria-pressed="false"] .zf-clip-waves { display: none; }
.zf-clip-sound[aria-pressed="true"] .zf-clip-strike { display: none; }
.zf-clip-sound:focus-visible,
.zf-clip-btn:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 3px;
}
/* play triangle by default; two bars while playing */
.zf-clip-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 4px;
}
.zf-clip.is-playing .zf-clip-icon {
  width: 14px;
  height: 16px;
  border: 0;
  margin: 0;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}
.zf-clip-title {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.75;
}
.zf-clip-hint {
  display: block;
  margin-top: 0.15rem;
}
.zf-clip-transcript {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.7;
}
.zf-clip-transcript summary {
  cursor: pointer;
  color: #C9A84C;
  text-align: center;
}
.zf-clip-transcript p {
  margin: 0.4rem 0 0;
}
/* hero variant (BLOG-002): the science library's first screen. Same 9:16 frame, narrower. */
.zf-clip--hero {
  max-width: 280px;
  margin: 20px auto 0;
}
@media (max-width: 600px) {
  .zf-clip--hero { max-width: 240px; margin-top: 16px; }
}
/* one link under a clip (hero "All 6 videos", Videos page "Read the short answer") */
.zf-clip-more {
  text-align: center;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
}
[dir="rtl"] .zf-clip,
.zf-clip[dir="rtl"] {
  letter-spacing: 0;
}
