/* Deltas for the YouTube flow (/doorstops/youtube).

   The step system, cards and templates come from bathroom-flow.css,
   repainted for the zine by components/flow/flow-css.js. This file adds what
   only this page has: the blocked-page-to-video lead beside the title, the
   three-way "what's blocking it" choice, the tool picker with its demo, and
   the result inputs.

   Everything inside a step is drawn with rules, not boxes: the step is
   already the card. */

.yt .yt-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center;
  width: 100%; max-width: 920px; margin: 0 auto; text-align: left;
}
.yt .yt-hero .bf-title { max-width: 13ch; margin: 0 0 14px; text-align: left; }
.yt .yt-hero-sub { max-width: 440px; margin: 0 0 24px; font-size: 18px; line-height: 1.55; color: var(--dl-muted); }
@media (max-width: 760px) {
  .yt .yt-hero { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .yt .yt-hero .bf-title { margin: 0 auto 14px; text-align: center; }
  .yt .yt-hero-sub { margin: 0 auto 24px; }
  .yt .yt-hero .yt-lead { grid-row: 1; }
}

#bf-school-status:empty { display: none; }
.yt a { display: inline; }

/* Any class rule with a `display` beats the browser's own `[hidden]`. */
.yt [hidden] { display: none !important; }

.yt .bf-solution-body { padding-left: 0; }

/* ---------------------------------------------------------- the lead */

.yt .yt-lead { display: flex; justify-content: center; }
.yt .yt-screen {
  position: relative; width: min(340px, 100%); aspect-ratio: 16 / 10;
  border: 3px solid #16130f; background: #fff; box-shadow: 6px 6px 0 #16130f;
  overflow: hidden;
}
.yt .yt-blocked, .yt .yt-player {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 6px; padding: 14px; text-align: center;
}
.yt .yt-blocked { background: #FDE2DC; opacity: 0; }
.yt .yt-blocked span, .yt .yt-player span { display: block; }
.yt .yt-blocked-icon { font-size: 34px; line-height: 1; }
.yt .yt-blocked-t { font-family: var(--dl-font-display); font-size: 20px; font-weight: 700; color: #16130f; }
.yt .yt-blocked-s { font-size: 12.5px; color: #6b5f52; }

.yt .yt-player { place-content: stretch; grid-template-rows: 1fr auto auto; justify-items: stretch; text-align: left; gap: 4px; }
.yt .yt-video { position: relative; display: grid; place-items: center; border: 2px solid #16130f; background: #3ECFB0; }
.yt .yt-play {
  width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 26px;
  border-color: transparent transparent transparent #16130f;
}
.yt .yt-video-t { font-family: var(--dl-font-display); font-size: 15.5px; font-weight: 700; color: #16130f; }
.yt .yt-video-s { font-size: 12.5px; font-weight: 600; color: #148d75; }

/* resting style is the last frame; the animation only runs under .is-play */
.yt .yt-lead.is-play .yt-blocked { animation: yt-blocked 3.2s ease both; }
.yt .yt-lead.is-play .yt-player { animation: yt-player 3.2s ease both; }
.yt .yt-lead.is-play .yt-video-s { animation: yt-stamp 3.2s ease both; }
@keyframes yt-blocked { 0%, 45% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes yt-player { 0%, 45% { opacity: 0; } 62%, 100% { opacity: 1; } }
@keyframes yt-stamp { 0%, 72% { opacity: 0; } 85%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .yt .yt-lead.is-play .yt-blocked, .yt .yt-lead.is-play .yt-player, .yt .yt-lead.is-play .yt-video-s { animation: none; }
}

/* ------------------------------------------------- what's blocking it */

@media (min-width: 720px) { .yt .yt-blocks { grid-template-columns: 1fr 1fr 1fr; } }
.yt .bf-step-body p.yt-unsure { margin-top: 22px; }

/* --------------------------------------------------------- the tools */

.yt .yt-tools { margin: 6px 0 14px; }
.yt .yt-url { display: block; margin: 0 0 4px; font-weight: 700; color: #148d75; }
.yt .yt-demo { margin: 0 0 18px; }
.yt .yt-works-choices { margin-bottom: 20px; }
.yt .yt-demo .yt-hint { margin-top: 8px; }

/* -------------------------------------------------------- shared bits */

.yt .yt-left { justify-content: flex-start; flex-wrap: wrap; }
.yt .yt-hint { margin: 2px 0 10px; font-size: 14px; line-height: 1.5; color: var(--bf-soft); }
.yt .yt-find { margin: 8px 0 0; font-size: 14px; color: var(--bf-soft); }
.yt .bf-template > .yt-find { margin: -4px 0 0; padding: 0 18px 16px; }
.yt .bf-step-body p.yt-links { font-size: 15px; }

.yt .yt-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 0 16px; align-items: end; margin-top: 8px; }
.yt .yt-inputs .bf-field { margin-bottom: 6px; }
@media (max-width: 560px) { .yt .yt-inputs { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- the session */

.yt .yt-session h3 { margin: 0 0 8px; font-family: var(--dl-font-display); font-size: 22px; }
.yt .yt-session ul { margin: 0 0 12px; padding-left: 20px; }
.yt .yt-session li { margin: 0 0 6px; font-size: 15.5px; line-height: 1.5; }
