/* Video (D-215; board 2026-11-11 Video; docs/design/DESIGN-SYSTEM.md, Worldrig's pieces: Video bar, Video tile,
   Moving picture, Video line, Blank video). Colours come from the tokens only. */

/* ---- A moving picture: laid over the picture it moves (video-loop.mjs places it and gives it the picture's look) ---- */
.wl-moving { position: absolute; overflow: hidden; isolation: isolate; pointer-events: none; }
.wl-moving[hidden] { display: none; }
.wl-moving video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }

/* ---- In Studio: a video's tile plays; its chip says Loop or Once, its length sits at the foot ---- */
.st-pic .wl-video-face { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-pic:has(.wl-video-face) { position: relative; }
.wl-video-chip, .wl-video-len { position: absolute; z-index: 2; display: inline-flex; align-items: center; height: 20px; border-radius: 999px; background: color-mix(in srgb, var(--wl-bg) 62%, transparent); color: var(--wl-on-picture); font-size: 11px; font-weight: 600; pointer-events: none; }
.wl-video-chip { top: 8px; left: 8px; gap: 5px; padding: 0 8px 0 6px; }
.wl-video-chip .wt-glyph { display: flex; }
.wl-video-chip svg { width: 12px; height: 12px; }
.wl-video-len { right: 8px; bottom: 8px; padding: 0 7px; font-family: var(--wl-font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.wl-video-len:empty { display: none; }
/* An open video, as large as a picture is shown. */
.st-picture .wl-video-face.is-big { display: block; max-width: 100%; max-height: 100%; border-radius: var(--r-md); }
.st-picture:has(.wl-video-face) { position: relative; }

/* ---- A video being made ---- */
.st-tile.wl-video.is-making .st-pic { position: relative; cursor: default; background: var(--wl-surface); }
.st-tile.wl-video.is-making .st-pic img { filter: saturate(.5) brightness(.5); }
.wl-video-making { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; color: var(--wl-on-picture); font: 500 var(--t-ui) var(--wl-font-ui); text-align: center; }
.wl-video-making .wt-glyph { display: flex; }
.wl-video-making svg { width: 18px; height: 18px; }
.wl-video-spin svg { animation: st-spin .9s linear infinite; }
.wl-video-making small { color: var(--wl-on-picture-2); font-size: var(--t-help); font-family: var(--wl-font-mono); }
.st-making.wl-video-job.is-failed { border-color: color-mix(in srgb, var(--wl-danger) 36%, var(--wl-line)); background: var(--wl-surface); }
.st-making.wl-video-job .st-making-note.is-error { color: var(--wl-danger); }
.st-making.wl-video-job .st-making-note .st-link { margin-left: 8px; }

/* ---- The Video bar: From and the picture it moves from ---- */
.st-bar.is-video .wl-video-from { cursor: pointer; }
.st-bar.is-video .st-ref.is-empty { gap: 6px; height: 24px; padding: 0 10px 0 8px; border: 1px dashed var(--wl-line-strong); background: none; color: var(--wl-text-2); font: 500 11.5px var(--wl-font-ui); }
.st-bar.is-video .st-ref.is-empty:hover { border-color: var(--wl-selection); color: var(--wl-text); }
.st-bar.is-video .st-ref.is-empty .wt-glyph { display: flex; }
.st-bar.is-video .st-ref.is-empty svg { width: 13px; height: 13px; }
.st-bar.is-video .wl-video-from:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 2px; }
.st-bar.is-video .wl-video-for { color: var(--wl-text-3); }

/* ---- The Video line on a place's page: the Music line's look, its length quiet beside the name ---- */
.wl-video-pick-more { color: var(--wl-text-3); font-family: var(--wl-font-mono); font-size: 11px; font-weight: 400; }

/* ---- Home: Make it move beside Change cover ---- */
.wl-video-home .wl-video-price { margin-left: 2px; opacity: .8; font-family: var(--wl-font-mono); font-size: .92em; }

@media (prefers-reduced-motion: reduce) {
  .wl-video-spin svg { animation: none; }
}

/* ---- What Make costs, on Make itself once the row is too narrow for the maker (music's bar too) ---- */
.st-make > .wl-make-price { display: none; margin-left: 4px; font-family: var(--wl-font-mono); font-size: .9em; font-weight: 500; }
body .wl-studio-page .st-bar.fit-4 .st-make > span.wl-make-price, body .wl-studio-page .st-bar.fit-6 .st-make > span.wl-make-price { display: inline; }
body .wl-studio-page .st-bar.fit-4:not(.fit-6) .st-make > span.wl-make-price::before { content: '· '; }
