/* css/clips-ai-video.css: AI video on the Clips Studio's Film step (js/clips/clips-ai-video.js).
 *
 * cav-* classes ONLY. No studio class is named in this sheet, not even its root: the studio's own classes
 * are defined in its own sheet and nowhere else (tests/clips-studio-css-namespace.test.js). Colors are
 * the studio's tokens (--cst-*), which every element inside the studio inherits.
 * The sketch: docs/projects/ai-video-clips/sketch/ai-video-in-clips.html (its .screen, .opt, .bal, .btn).
 * Phone, tablet and desktop: every press target is at least 44px tall (48px on what was added from 30 Nov 2026:
 * the outfit row and its sheet), and nothing scrolls sideways.
 */

/* ── Under a part: I'll film it · AI makes it ── */
.cav-mk { display: flex; margin: -8px 0 4px 46px; border: 1px solid var(--cst-line); border-radius: 12px; overflow: hidden; background: #fff; max-width: 320px; }
.cav-mk-o { flex: 1 1 0; min-width: 0; min-height: 44px; border: 0; border-left: 1px solid var(--cst-line); background: none; padding: 8px 6px; font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--cst-ink-2); cursor: pointer; }
.cav-mk-o:first-child { border-left: 0; }
.cav-mk-o[aria-pressed="true"] { background: var(--cst-ind-soft); color: var(--cst-ind-d); font-weight: 700; }
.cav-mk-o:disabled { opacity: .6; cursor: default; }
.cav-mk-o:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: -2px; }

/* ── The row of a part AI makes ── */
.cav-row.is-failed { border-color: #e7c9a5; background: var(--cst-warn-bg); }
.cav-row.is-failed small { color: var(--cst-warn-ink); }
.cav-bar { display: block; flex: 1 0 100%; height: 6px; border-radius: 999px; background: var(--cst-ind-ring); overflow: hidden; position: relative; }
.cav-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 999px; background: var(--cst-ind); animation: cav-slide 1.6s ease-in-out infinite; }
@keyframes cav-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .cav-bar i { animation: none; width: 100%; opacity: .5; } }

.cav-take { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: -6px 0 0; padding: 14px 16px; border: 1px solid var(--cst-line-2); border-radius: 14px; background: #fff; }
.cav-pv { flex: none; width: 132px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #1b1828; display: flex; align-items: center; justify-content: center; }
.cav-pv video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.cav-pv.is-wait { background: var(--cst-ground); color: var(--cst-ink-2); font-size: 13px; padding: 10px; text-align: center; }
/* The take's still, shown while its video is on its way (and as the video's poster): never a black box. */
.cav-pv.is-wait.is-still { background-size: cover; background-position: center; padding: 0; align-items: flex-end; }
.cav-pv.is-wait.is-still span { display: block; width: 100%; padding: 8px 6px; background: rgba(20, 17, 34, .72); color: #fff; font-size: 12px; line-height: 1.35; }
/* A failed part: what trying again sets aside, then its own button. */
.cav-retry { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: -6px 0 0; padding: 14px 16px; border: 1px solid var(--cst-line-2); border-radius: 14px; background: #fff; }
/* A calm note (not a warning): what Maya did with a "not right" pick, the phone app not out yet. */
.cav-note.cav-lower { background: var(--cst-paper); color: var(--cst-ink-2); border: 1px solid var(--cst-line-2); }
/* A finished Clip's label card (Edit's final video, Post). */
.cav-fin { margin-top: 4px; }
.cav-take-do { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cav-btn, .cav-again { min-height: 44px; }

/* ── The check on a made part: what is not right, then the money, then the button ── */
.cav-fb { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.cav-fb .cav-h:focus { outline: none; }
.cav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cav-chip { min-height: 44px; padding: 9px 16px; border: 1px solid var(--cst-line); border-radius: 999px; background: #fff; font: 600 15px/1.3 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); cursor: pointer; }
.cav-chip[aria-pressed="true"] { border: 2px solid var(--cst-ind); padding: 8px 15px; background: var(--cst-ind-bg); color: var(--cst-ind-d); }
.cav-chip[aria-pressed="true"]::before { content: "\2713"; margin-right: 6px; font-weight: 700; }
.cav-chip:disabled { opacity: .6; cursor: default; }
.cav-chip:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; }
.cav-fb-fld { display: flex; flex-direction: column; gap: 6px; }
.cav-fb-lbl { font: 600 14px/1.3 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); }
.cav-fb-money { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--cst-paper); border: 1px solid var(--cst-line-2); }
.cav-fb-money .cav-bal b { margin-left: auto; }
.cav-fb [aria-disabled="true"] { opacity: .55; }
.cav-fb-x { align-self: flex-start; }

/* ── The card under the parts ── */
.cav { display: flex; flex-direction: column; gap: 14px; }
.cav-card { background: #fff; border: 1px solid var(--cst-line-2); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cav-h { font: 700 17px/1.3 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); }
.cav-quiet { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cst-ink-2); }
/* "Remove my AI clone": a quiet text button under the card, still a full 44px to press. */
.cav-rm { text-align: center; }
.cav-link { min-height: 44px; padding: 0 8px; border: 0; background: none; font: inherit; color: var(--cst-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cav-link:hover { color: var(--cst-ink); }
.cav-link:disabled { opacity: .6; cursor: default; }
.cav-link:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; border-radius: 6px; }
.cav-quiet b { color: var(--cst-ink); font-weight: 600; }
.cav-hint { padding: 0 2px; }
.cav-note { margin: 0; font-size: 14px; line-height: 1.5; border-radius: 12px; padding: 12px 14px; }
.cav-note.is-warn { background: var(--cst-warn-bg); color: var(--cst-warn-ink); }

.cav-opts { display: flex; flex-direction: column; gap: 8px; }
.cav-opt, .cav-sw { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; text-align: left; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; padding: 11px 14px; font: 400 15px/1.35 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); cursor: pointer; }
.cav-opt[aria-pressed="true"] { border: 2px solid var(--cst-ind); padding: 10px 13px; background: var(--cst-ind-bg); }
.cav-opt:disabled, .cav-sw:disabled { opacity: .65; cursor: default; }
.cav-opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cav-opt-t b { font-weight: 700; }
.cav-opt-t span { font-size: 13.5px; color: var(--cst-ink-2); }
.cav-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cav-bal { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 15px; color: var(--cst-ink-2); padding: 2px; }
.cav-bal b { color: var(--cst-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.cav-cln-do { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── The way into the phone app, where the AI clone is recorded (30 Nov 2026) ──
   Android phone: two full-width buttons, the first the main one. Computer: the QR code beside three plain steps.
   iPhone and iPad: one calm line, nothing to press. The code is always dark on white, whatever the theme. */
.cav-app-do { display: flex; flex-direction: column; gap: 10px; }
.cav-app-b { display: block; width: 100%; min-height: 52px; padding: 15px 17px; border: 1.5px solid var(--cst-ind); border-radius: 999px; background: #fff; color: var(--cst-ind-d); font: 600 17px "Bricolage Grotesque", sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.cav-app-b:hover { background: var(--cst-ind-bg); color: var(--cst-ind-d); }
.cav-app-b:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; }
.cav-app-desk { display: flex; align-items: center; gap: 22px; }
.cav-qr { flex: none; width: 168px; height: 168px; border: 1px solid var(--cst-line-2); border-radius: 12px; background: #fff; }
.cav-steps { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--cst-ink); }
.cav-steps li { padding-left: 4px; }
.cav-steps li::marker { font-weight: 700; color: var(--cst-ind-d); }
.cav-app-re { margin-top: -6px; }
.cav-app-re .cav-link { padding-left: 0; }

/* ── What the coach wears: the row above the quality, and the sheet of outfits (30 Nov 2026) ──
   The row is the sketch's .opt: a bordered row, the words on the left, the one thing to press on the right.
   The sheet's tiles are rows too, so a long sentence (photos that could not be used) has room at any width. */
.cav-wear { display: flex; align-items: center; gap: 12px; min-height: 56px; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; padding: 10px 14px; }
.cav-wear-pic, .cav-look-pic { flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--cst-ground); color: var(--cst-ink-4); }
.cav-wear-pic { width: 42px; height: 56px; border-radius: 8px; }
.cav-wear-pic img, .cav-look-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cav-wear-t { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; line-height: 1.35; color: var(--cst-ink-2); }
.cav-wear-t b { font-size: 16px; font-weight: 700; color: var(--cst-ink); overflow-wrap: anywhere; }
.cav-wear-b { flex: none; min-height: 48px; padding: 10px 18px; border: 1.5px solid var(--cst-ind); border-radius: 999px; background: #fff; color: var(--cst-ind-d); font: 600 15px "Bricolage Grotesque", sans-serif; cursor: pointer; }
.cav-wear-b:hover { background: var(--cst-ind-bg); }
.cav-wear-b:disabled { opacity: .6; cursor: default; }
.cav-wear-b:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; }
/* "What will you wear?": the question, with the coach's outfits as tiles (the sheet's own .cav-look). Asked on Film's
   price card, the brief (Script) and "Your visuals" until it is answered for the Clip. */
.cav-ask { display: flex; flex-direction: column; gap: 10px; }
.cav-ask.is-open { border: 1.5px solid var(--cst-ind); border-radius: 14px; background: #fff; padding: 14px; }
.cav-ask.is-none { gap: 0; }
.cav-ask .cav-h { margin: 0; }
.cav-ask .cav-quiet { margin: 0; }
.cav-ask-add { align-self: flex-start; padding-left: 0; font-weight: 600; }

/* The house sheet's own title, buttons and cross are small (16px, 13.5px, 40px). On THIS sheet only they are
   brought to what a coach of 55 can read and press; no class of the sheet is named, only what it marks them with. */
#cb-sheet:has(.cav-looks) h3 { font-size: 19px; line-height: 1.3; }
#cb-sheet:has(.cav-looks) [data-cbs-action], #cb-sheet:has(.cav-looks) [data-cbs-cancel] { min-height: 48px; min-width: 48px; font-size: 15px; }
#cb-sheet:has(.cav-looks) [data-cbs-cancel][aria-label] { font-size: 26px; }
.cav-looks { display: flex; flex-direction: column; gap: 14px; padding: 2px 0 4px; }
.cav-look-list { display: flex; flex-direction: column; gap: 10px; }
.cav-look { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; text-align: left; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; padding: 10px 14px; font: 400 15px/1.4 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); cursor: pointer; }
.cav-look:hover { border-color: var(--cst-ind); }
.cav-look[aria-pressed="true"] { border: 2px solid var(--cst-ind); padding: 9px 13px; background: var(--cst-ind-bg); }
.cav-look[aria-pressed="true"] .cav-look-t span { color: var(--cst-ind-d); font-weight: 600; }
.cav-look[aria-pressed="true"] .cav-look-t span::before { content: "\2713"; margin-right: 6px; font-weight: 700; }
.cav-look[aria-disabled="true"] { cursor: default; background: var(--cst-paper); }
.cav-look[aria-disabled="true"]:hover { border-color: var(--cst-line); }
.cav-look.is-checking .cav-look-pic img { opacity: .55; }
.cav-look.is-failed { border-color: #e7c9a5; background: var(--cst-warn-bg); }
.cav-look.is-failed .cav-look-t span { color: var(--cst-warn-ink); }
.cav-look:disabled { opacity: .6; cursor: default; }
.cav-look:focus-visible, .cav-look-more:focus-visible, .cav-look-rm:focus-visible, .cav-look-do:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; }
.cav-look-pic { width: 54px; height: 72px; border-radius: 10px; }
.cav-look-t { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cav-look-t b { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.cav-look-t span { font-size: 15px; color: var(--cst-ink-2); }
/* Beside a tile: "Edit". Under it: "Rename" and "Remove" (an outfit whose photos could not be used: "Remove" alone).
   Small words, each still a full 48px to press. */
.cav-look-row { display: flex; align-items: stretch; gap: 8px; }
.cav-look-row .cav-look { flex: 1 1 0; min-width: 0; width: auto; }
.cav-look-do { flex: none; min-height: 48px; min-width: 48px; padding: 10px 14px; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; font: 600 15px "Bricolage Grotesque", sans-serif; color: var(--cst-ink-2); cursor: pointer; }
.cav-look-do:hover { border-color: var(--cst-ind); color: var(--cst-ink); }
.cav-look-do[aria-expanded="true"] { border-color: var(--cst-ind); background: var(--cst-ind-bg); color: var(--cst-ind-d); }
.cav-look-do:disabled { opacity: .6; cursor: default; }
.cav-look-menu { display: flex; justify-content: flex-end; gap: 8px; margin-top: -2px; }
.cav-look-err { margin: 0; font-size: 15px; line-height: 1.5; border-radius: 12px; padding: 12px 14px; background: var(--cst-warn-bg); color: var(--cst-warn-ink); }
.cav-look-say { margin: 0; font-size: 15px; line-height: 1.5; color: var(--cst-ink-2); }
/* A new outfit: its photos side by side, each with "Remove", then "Add another photo" as a tile of the same size. */
.cav-look-pics { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.cav-look-ph { width: 120px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.cav-look-ph img { width: 120px; height: 160px; object-fit: cover; border-radius: 12px; background: var(--cst-ground); display: block; }
.cav-look-rm { min-height: 48px; border: 0; background: none; font: 600 15px "Bricolage Grotesque", sans-serif; color: var(--cst-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cav-look-rm:hover { color: var(--cst-ink); }
.cav-look-more { width: 120px; height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1.5px dashed var(--cst-ind); border-radius: 12px; background: #fff; color: var(--cst-ind-d); font: 600 15px/1.3 "Bricolage Grotesque", sans-serif; text-align: center; cursor: pointer; }
.cav-look-more span { font-size: 30px; font-weight: 500; line-height: 1; }
.cav-look-more:hover { background: var(--cst-ind-bg); }
.cav-look-more:disabled, .cav-look-rm:disabled { opacity: .6; cursor: default; }

/* ── Good to know ── */
.cav-know { background: var(--cst-paper); }
.cav-know-t { margin: 0; font-size: 15px; line-height: 1.4; }
.cav-sw-k { flex: none; width: 46px; height: 28px; border-radius: 999px; background: #c9c5d2; position: relative; transition: background .15s; }
.cav-sw-k i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(30,27,46,.3); transition: transform .15s; }
.cav-sw[aria-checked="true"] .cav-sw-k { background: var(--cst-ind); }
.cav-sw[aria-checked="true"] .cav-sw-k i { transform: translateX(18px); }

/* ── The left panel when nothing is left for the camera ── */
.cav-frame { width: 340px; max-width: 100%; aspect-ratio: 340 / 604; border-radius: 26px; background: linear-gradient(170deg, #3a3550, #1b1828); flex: none; box-shadow: 0 18px 40px rgba(30,27,46,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; color: #fff; }
.cav-frame-mark { width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; font: 700 26px "Bricolage Grotesque", sans-serif; letter-spacing: .04em; }
.cav-frame-say { font: 600 16px "Bricolage Grotesque", sans-serif; opacity: .9; }
.cav-frame .cav-bar { flex: none; width: 60%; background: rgba(255,255,255,.2); }
.cav-frame .cav-bar i { background: #fff; }

@media (min-width: 761px) and (max-width: 1023px) {
  .cav-frame { width: 260px; }
}
/* Phone: the column is one stack (the studio puts the camera under the headline). The left panel is
   only a picture, so it steps aside and the work comes straight after the sentence. */
@media (max-width: 760px) {
  .cav-frame { display: none; }
  .cav-mk { margin-left: 0; max-width: none; }
  .cav-card { padding: 16px; }
  .cav-app-desk { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cav-pv { width: 112px; }
  /* The row: the words keep the line, and "Change outfit" takes the full width under them. */
  .cav-wear { flex-wrap: wrap; }
  .cav-wear-b { flex: 1 0 100%; }
  .cav-look-ph, .cav-look-ph img, .cav-look-more { width: 104px; }
  .cav-look-ph img, .cav-look-more { height: 138px; }
}

/* A made part that could not follow the picked video, or could not be trimmed: one quiet line under the row. */
.cav-part-note { display: block; margin-top: 4px; color: var(--cst-ink-2); }

/* 👕 Clothes in the coach's own words (js/clips/clips-ai-video.js describeClothes; 1 Dec 2026). */
.cav-words { width: 100%; box-sizing: border-box; margin-top: 10px; min-height: 96px; border: 1px solid var(--cst-line); border-radius: 12px; padding: 12px 14px; font: 500 16px "Bricolage Grotesque", sans-serif; color: var(--cst-ink); resize: vertical; }
.cav-looks .cav-look-err:empty { display: none; }

/* 🧾 The remake sheet (js/clips/clips-ai-remake.js, 2 Dec 2026): one block per part, one row per input, each choice a
   radio a thumb can press (48px), what is chosen marked by its dot and colour; the money before the button. Also the
   "Change it for" choice on the outfit sheet opened from a part, the outfit check and the parts remade one by one. */
.cav-rs { gap: 16px; }
#cb-sheet:has(.cav-rs) [data-cbs-action="0"] { white-space: nowrap; }
.cav-rs-part { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 4px; border-top: 1px solid var(--cst-line-2); }
.cav-rs-part:first-of-type { border-top: 0; padding-top: 0; }
.cav-rs-name { font-size: 17px; }
.cav-rs-made { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--cst-ink); background: var(--cst-paper); border: 1px solid var(--cst-line-2); border-radius: 10px; padding: 10px 12px; }
.cav-rs-made span { color: var(--cst-ink-2); }
.cav-rs-row { display: flex; flex-direction: column; gap: 8px; }
.cav-rs-lbl { font: 700 15px/1.3 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); }
.cav-rs-cs { display: flex; flex-direction: column; gap: 8px; }
.cav-rs-cs.is-two { flex-direction: row; }
.cav-rs-cs.is-two .cav-rs-c { flex: 1 1 0; min-width: 0; }
.cav-rs-c { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; text-align: left; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; padding: 9px 14px; font: 400 15px/1.35 "Bricolage Grotesque", sans-serif; color: var(--cst-ink); cursor: pointer; }
.cav-rs-c::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--cst-line); box-sizing: border-box; }
.cav-rs-c:hover { border-color: var(--cst-ind); }
.cav-rs-c[aria-checked="true"] { border: 2px solid var(--cst-ind); padding: 8px 13px; background: var(--cst-ind-bg); }
.cav-rs-c[aria-checked="true"]::before { border: 5px solid var(--cst-ind); }
.cav-rs-c:disabled { opacity: .6; cursor: default; }
.cav-rs-c:focus-visible { outline: 2px solid var(--cst-ind); outline-offset: 2px; }
.cav-rs-ct { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cav-rs-ct b { font-weight: 600; overflow-wrap: anywhere; }
.cav-rs-ct span { font-size: 13.5px; color: var(--cst-ink-2); overflow-wrap: anywhere; }
.cav-rs-words { margin: 0; padding: 10px 12px; border-left: 3px solid var(--cst-ind); background: var(--cst-paper); border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.45; color: var(--cst-ink); }
.cav-rs-money .cav-bal b { margin-left: auto; }
.cav-scope { margin-bottom: 2px; }
.cav-made { display: block; margin-top: 3px; color: var(--cst-ink-2); }
.cav-part-outfit { padding-left: 0; font-size: 14px; }
.cav-oc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cav-oc-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14.5px; color: var(--cst-ink-2); }
.cav-oc-list b { color: var(--cst-ink); }
.cav-oc-do { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cav-oc { border-color: var(--cst-ind); }
@media (max-width: 760px) {
  .cav-rs-cs.is-two { flex-direction: column; }
  .cav-oc-go { flex: 1 0 100%; }
}
