/*
 * themes/alder/css/alder-lesson-reel.css
 * The lesson reel (partials/_lesson-reel.tpl.php): a 9:16 frame reserved
 * before the video loads, the "tap for sound" pill on top of it, and the
 * transcript disclosure underneath. The reels are drawn on light cream
 * (#F7EFDF), so the empty frame is that colour and nothing flashes dark.
 * Every tap target is at least 44px. States from js/alder-lesson-reel.js:
 * is-sound (unmuted: the pill goes).
 */

/* The article rule in alder-learn.css sets every child to max-width: none;
   this selector outranks it so the reel keeps phone size on a wide column. */
.lrn-reel, body.al-theme .lrn article.lrn-lesson > figure.lrn-reel {
  width: 100%; max-width: 320px; margin: 0 auto 32px;
}
@media (min-width: 1024px) {
  body.al-theme .lrn article.lrn-lesson > figure.lrn-reel { margin-left: 0; }
}
.lrn-reel__frame {
  position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: 18px; background: #F7EFDF; box-shadow: 0 0 0 1px rgba(14, 42, 27, .10);
}
.lrn-reel__video {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; background: #F7EFDF;
}

/* Top of the frame, clear of the native control bar at the bottom. */
.lrn-reel__sound {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 16px 0 12px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(14, 42, 27, .82); color: #fff;
  font: 600 14px/1 var(--al-sans, system-ui, sans-serif); letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.lrn-reel__sound[hidden], .lrn-reel.is-sound .lrn-reel__sound { display: none; }
.lrn-reel__sound svg { width: 20px; height: 20px; flex: none; }
.lrn-reel__sound:focus-visible { outline: 3px solid var(--al-sage, #A8DEB5); outline-offset: 3px; }
@media (hover: hover) {
  .lrn-reel__sound:hover { background: var(--al-ink, #0E2A1B); }
}

.lrn-reel__transcript { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--al-body, #1F3A2C); }
.lrn-reel__transcript summary {
  display: flex; align-items: center; min-height: 44px; cursor: pointer;
  font-weight: 600; color: var(--al-moss, #2F6B3F); list-style: none;
}
.lrn-reel__transcript summary::-webkit-details-marker { display: none; }
.lrn-reel__transcript summary::before {
  content: ""; width: 7px; height: 7px; margin: 0 12px 0 4px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .18s var(--al-ease, ease);
}
.lrn-reel__transcript[open] summary::before { transform: rotate(45deg); }
.lrn-reel__transcript summary:focus-visible { outline: 3px solid var(--al-sage, #A8DEB5); outline-offset: 2px; border-radius: 6px; }
.lrn-reel__transcript ol { margin: 4px 0 0; padding-left: 1.4em; }
.lrn-reel__transcript li { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .lrn-reel__transcript summary::before { transition: none; }
}
