/* css/clips-extras.css — the small AI-video-in-Clips modules on the Clips Studio. .cxt-* ONLY.
 *
 *   js/clips/clips-music.js           Music at Edit
 *   js/clips/clips-manage.js          Manage this Clip, Recently deleted, and their sheets
 *   js/clips/clips-search-style.js    the kind of videos, at Research
 *   js/clips/clips-scene-settings.js  where each part happens, at Script
 *
 * Every module mounts inside the Studio root, and their sheets put the Studio's root class on the sheet
 * body, so the Studio's own buttons, chips and type and its colours (--cst-*) are used as they are.
 * Nothing here names a Studio class, not even as an ancestor (tests/clips-studio-css-namespace.test.js):
 * every rule hangs off this file's own two roots, the card (.cxt) and the sheet body (.cxt-sheet), and
 * each colour falls back to the Studio's value so a module is never unstyled.
 */
.cxt {
  display: flex; flex-direction: column; gap: 14px; background: #fff; border-radius: 18px; padding: 20px;
  box-shadow: var(--cst-shadow, 0 1px 2px rgba(30,27,46,.04), 0 8px 28px rgba(30,27,46,.06));
  text-align: left; min-width: 0;
}
:is(.cxt, .cxt-sheet) .cxt-head { display: flex; flex-direction: column; gap: 4px; }
:is(.cxt, .cxt-sheet) .cxt-h { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0; }
:is(.cxt, .cxt-sheet) .cxt-k { font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); display: block; }
:is(.cxt, .cxt-sheet) .cxt-len { font-size: 15px; color: var(--cst-ink-2, #5d5566); margin: 0; }
:is(.cxt, .cxt-sheet) .cxt-warn { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--cst-warn-bg, #FFF6E8); color: var(--cst-warn-ink, #5c3a0a); font-size: 15px; line-height: 1.5; }
:is(.cxt, .cxt-sheet) .cxt-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--cst-ind-bg, #F7F6FF); border: 1px solid var(--cst-ind-ring, #E4E3FB); font-size: 15px; line-height: 1.5; }
/* A paid track being made (clips-music.js): calm, the same tint as a note, with a slow pulse on its dot. */
:is(.cxt, .cxt-sheet) .cxt-making { margin: 0; padding: 12px 14px 12px 38px; position: relative; border-radius: 12px; background: var(--cst-ind-bg, #F7F6FF); border: 1px solid var(--cst-ind-ring, #E4E3FB); font-size: 15px; line-height: 1.5; }
:is(.cxt, .cxt-sheet) .cxt-making::before { content: ""; position: absolute; left: 14px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--cst-ind, #4338CA); animation: cxt-pulse 1.4s ease-in-out infinite; }
@keyframes cxt-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { :is(.cxt, .cxt-sheet) .cxt-making::before { animation: none; } }
/* TikTok's own questions in "Send to another network": the post sheet's box (.psh-tt), given room here. */
.cxt-sheet .cxt-tt { margin-top: 4px; }
.cxt-sheet .cxt-tt select { width: 100%; min-height: 44px; font-size: 16px; }
/* TikTok's declaration, in the sheet's foot beside the button that posts (the foot is outside the sheet body). */
.cxt-tt-foot:not(:empty) { flex: 1 1 100%; min-width: 0; }
@media (min-width: 481px) { .cxt-foot-tt { flex-wrap: wrap; } .cxt-foot-tt > :last-child { margin-left: auto; } }
.cxt-tt-foot .cxt-tt-agree { margin: 0; text-align: left; }
@media (max-width: 480px) { .cxt-tt-foot:not(:empty) { order: 1; flex: none; } }   /* the foot stacks bottom-up on a phone: keep the declaration ABOVE the button */
:is(.cxt, .cxt-sheet) .cxt-short { margin: 0; font-size: 15px; font-weight: 600; color: var(--cst-warn-ink, #5c3a0a); }
:is(.cxt, .cxt-sheet) .cxt-picked { font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--cst-good, #1c6b43); white-space: nowrap; }
:is(.cxt, .cxt-sheet) .cxt-chev { flex: none; font-size: 22px; line-height: 1; color: var(--cst-ink-4, #a39eab); }

/* ── A choice: a row with a dot, a title and a line (radio) ───────────────── */
:is(.cxt, .cxt-sheet) .cxt-opts { display: flex; flex-direction: column; gap: 10px; }
:is(.cxt, .cxt-sheet) .cxt-opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 56px; text-align: left;
  border: 1px solid var(--cst-line, #e3ded4); background: #fff; border-radius: 14px; padding: 14px 16px;
  font: 400 15px/1.45 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e);
}
:is(.cxt, .cxt-sheet) .cxt-opt:hover:not(:disabled) { border-color: var(--cst-ind, #4338CA); }
:is(.cxt, .cxt-sheet) .cxt-opt[aria-checked="true"] { border-color: var(--cst-ind, #4338CA); background: var(--cst-ind-bg, #F7F6FF); box-shadow: inset 0 0 0 1px var(--cst-ind, #4338CA); }
:is(.cxt, .cxt-sheet) .cxt-opt:disabled { opacity: .6; }
:is(.cxt, .cxt-sheet) .cxt-dot { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid #b9b3c4; background: #fff; }
:is(.cxt, .cxt-sheet) .cxt-opt[aria-checked="true"] .cxt-dot { border-color: var(--cst-ind, #4338CA); background: radial-gradient(circle, var(--cst-ind, #4338CA) 0 5px, #fff 6px); }
:is(.cxt, .cxt-sheet) .cxt-opt-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
:is(.cxt, .cxt-sheet) .cxt-opt-tx b { font-weight: 600; font-size: 16px; }
:is(.cxt, .cxt-sheet) .cxt-opt-tx > span { color: var(--cst-ink-2, #5d5566); }
:is(.cxt, .cxt-sheet) .cxt-opt-tx .cxt-where { color: var(--cst-ink, #1e1b2e); font-size: 16px; }
:is(.cxt, .cxt-sheet) .cxt-opt-tx .cxt-opt-now {
  align-self: flex-start; margin-top: 6px; background: var(--cst-ind-ring, #E4E3FB); color: var(--cst-ind-d, #3127a8);
  border-radius: 999px; padding: 2px 10px; font: 600 12px "Bricolage Grotesque", sans-serif;
}

/* ── Music ────────────────────────────────────────────────────────────────── */
:is(.cxt, .cxt-sheet) .cxt-pane { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--cst-paper, #FCFBF8); border: 1px solid var(--cst-line-2, #ece7dd); }
:is(.cxt, .cxt-sheet) .cxt-tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
:is(.cxt, .cxt-sheet) .cxt-track { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--cst-line-2, #ece7dd); }
:is(.cxt, .cxt-sheet) .cxt-track.is-on { border-color: var(--cst-good, #1c6b43); background: var(--cst-good-bg, #EEF7F1); }
:is(.cxt, .cxt-sheet) .cxt-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cst-ind, #4338CA); color: #fff; display: grid; place-items: center; padding: 0; }
:is(.cxt, .cxt-sheet) .cxt-play svg { width: 22px; height: 22px; fill: currentColor; }
:is(.cxt, .cxt-sheet) .cxt-play[aria-pressed="true"] { background: var(--cst-ink, #1e1b2e); }
:is(.cxt, .cxt-sheet) .cxt-play.is-none { background: var(--cst-line-3, #f0ece4); }
:is(.cxt, .cxt-sheet) .cxt-track-tx { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
:is(.cxt, .cxt-sheet) .cxt-track-tx b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
:is(.cxt, .cxt-sheet) .cxt-track-tx span { font-size: 13.5px; color: var(--cst-ink-3, #6b6475); }
:is(.cxt, .cxt-sheet) .cxt-price { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
:is(.cxt, .cxt-sheet) .cxt-go { align-self: flex-start; }
:is(.cxt, .cxt-sheet) .cxt-another { align-self: flex-start; min-height: 44px; }
:is(.cxt, .cxt-sheet) .cxt-vol { display: flex; flex-direction: column; gap: 8px; }
:is(.cxt, .cxt-sheet) .cxt-vol-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--cst-ink-3, #6b6475); }
:is(.cxt, .cxt-sheet) .cxt-vol-row input[type="range"] { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; accent-color: var(--cst-ind, #4338CA); }

/* ── Manage this Clip, and the lists in its sheets ────────────────────────── */
:is(.cxt, .cxt-sheet) .cxt-acts, :is(.cxt, .cxt-sheet) .cxt-dels, :is(.cxt, .cxt-sheet) .cxt-nets, :is(.cxt, .cxt-sheet) .cxt-setlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
:is(.cxt, .cxt-sheet) .cxt-act {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; text-align: left;
  border: 1px solid var(--cst-line, #e3ded4); background: #fff; border-radius: 14px; padding: 12px 16px;
  font: 400 15px/1.45 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e);
}
:is(.cxt, .cxt-sheet) .cxt-act:hover:not(:disabled) { border-color: var(--cst-ind, #4338CA); }
/* The arrow at the end of a row. It was the character "›" in pale grey, which at a phone's width read as a
   sliver of a bracket (dev7 at 390, 30 Nov 2026). Now it is drawn: two strokes of a 9px square, turned, in a grey
   that is seen. The character stays in the markup for a screen with no CSS; here it takes no room. */
:is(.cxt, .cxt-sheet) .cxt-act > .cxt-chev {
  font-size: 0; line-height: 0; box-sizing: border-box; width: 9px; height: 9px; margin: 0 4px 0 2px;
  border-top: 2px solid var(--cst-ink-3, #6b6475); border-right: 2px solid var(--cst-ink-3, #6b6475);
  transform: rotate(45deg);
}
:is(.cxt, .cxt-sheet) .cxt-act:disabled { opacity: .6; }
:is(.cxt, .cxt-sheet) .cxt-act-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
:is(.cxt, .cxt-sheet) .cxt-act-tx b { font-weight: 600; font-size: 16px; }
:is(.cxt, .cxt-sheet) .cxt-act-tx span { color: var(--cst-ink-2, #5d5566); font-size: 14px; }
:is(.cxt, .cxt-sheet) .cxt-act.is-danger b { color: #b42318; }
:is(.cxt, .cxt-sheet) .cxt-act.is-danger:hover:not(:disabled) { border-color: #b42318; }
:is(.cxt, .cxt-sheet) .cxt-fold { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; border: 0; background: none; padding: 0; text-align: left; font: 600 16px "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); }
:is(.cxt, .cxt-sheet) .cxt-dels li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--cst-line-2, #ece7dd); border-radius: 12px; }

/* ── Sheets (CBSheet.panel body) ──────────────────────────────────────────── */
.cxt-sheet { display: flex; flex-direction: column; gap: 14px; }
:is(.cxt, .cxt-sheet) .cxt-net { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--cst-line-2, #ece7dd); border-radius: 12px; }
:is(.cxt, .cxt-sheet) .cxt-net > label:first-child { display: flex; align-items: flex-start; gap: 12px; min-height: 28px; cursor: pointer; }
:is(.cxt, .cxt-sheet) .cxt-net > label:first-child > span { display: flex; flex-direction: column; font-size: 16px; }
:is(.cxt, .cxt-sheet) .cxt-net > label:first-child > span > span { font-size: 14px; color: var(--cst-ink-2, #5d5566); }
:is(.cxt, .cxt-sheet) .cxt-net input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--cst-ind, #4338CA); }
:is(.cxt, .cxt-sheet) .cxt-net.is-off { background: var(--cst-paper, #FCFBF8); }
:is(.cxt, .cxt-sheet) .cxt-net.is-off > label:first-child { cursor: default; }
:is(.cxt, .cxt-sheet) .cxt-net.is-off b { color: var(--cst-ink-3, #6b6475); font-weight: 600; }
:is(.cxt, .cxt-sheet) .cxt-net textarea, :is(.cxt, .cxt-sheet) .cxt-net input[type="text"], :is(.cxt, .cxt-sheet) .cxt-when input[type="datetime-local"], :is(.cxt, .cxt-sheet) .cxt-own {
  width: 100%; border: 1px solid var(--cst-line, #e3ded4); border-radius: 12px; padding: 12px 14px; background: #fff;
  font: 400 16px/1.5 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); resize: vertical;
}
:is(.cxt, .cxt-sheet) .cxt-net textarea:focus, :is(.cxt, .cxt-sheet) .cxt-net input[type="text"]:focus, :is(.cxt, .cxt-sheet) .cxt-own:focus { border-color: var(--cst-ind, #4338CA); outline: none; }
:is(.cxt, .cxt-sheet) .cxt-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
:is(.cxt, .cxt-sheet) .cxt-when .cxt-k { flex: 1 0 100%; }
:is(.cxt, .cxt-sheet) .cxt-when label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; }
:is(.cxt, .cxt-sheet) .cxt-when input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--cst-ind, #4338CA); }

/* ── The kind of videos (Research) ────────────────────────────────────────── */
:is(.cxt, .cxt-sheet) .cxt-opts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
:is(.cxt, .cxt-sheet) .cxt-opt-pic { flex-direction: column; gap: 12px; position: relative; padding: 14px; }
:is(.cxt, .cxt-sheet) .cxt-opt-pic .cxt-dot { position: absolute; top: 22px; right: 22px; }
:is(.cxt, .cxt-sheet) .cxt-pic { display: flex; gap: 6px; width: 100%; height: 96px; border-radius: 10px; overflow: hidden; }
:is(.cxt, .cxt-sheet) .cxt-pic-face { flex: 1; background: linear-gradient(160deg, #cfd6ee, #e9dcee); display: grid; place-items: end center; }
:is(.cxt, .cxt-sheet) .cxt-pic-face i { width: 44px; height: 62px; border-radius: 22px 22px 6px 6px; background: #8f86b5; position: relative; }
:is(.cxt, .cxt-sheet) .cxt-pic-face i::before { content: ""; position: absolute; left: 8px; top: -22px; width: 28px; height: 28px; border-radius: 50%; background: #8f86b5; }
:is(.cxt, .cxt-sheet) .cxt-pic-scene { flex: 1; background: linear-gradient(160deg, #bfe0d0, #dcefe0); }
:is(.cxt, .cxt-sheet) .cxt-pic-scene.is-b { background: linear-gradient(160deg, #f1dcc0, #f6ead6); }
:is(.cxt, .cxt-sheet) .cxt-pic-scene.is-c { background: linear-gradient(160deg, #c6dcef, #e2ecf6); }
/* Three choices, with Maya's suggestion (29 Nov 2026: "Questions people are asking"). */
:is(.cxt, .cxt-sheet) .cxt-opts-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
:is(.cxt, .cxt-sheet) .cxt-pic-ask { flex: 1; background: linear-gradient(160deg, #f4e3c8, #f7efd9); display: grid; place-items: center; }
:is(.cxt, .cxt-sheet) .cxt-pic-ask i { width: 56px; height: 56px; border-radius: 18px 18px 18px 4px; background: #fff; display: grid; place-items: center; font: 600 32px/1 Fraunces, Georgia, serif; font-style: normal; color: #a2610c; box-shadow: 0 2px 6px rgba(120, 80, 20, .16); }
:is(.cxt, .cxt-sheet) .cxt-rec { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--cst-ind-soft, #eeedfb); color: #2a2470; font-size: 16px; line-height: 1.5; }
:is(.cxt, .cxt-sheet) .cxt-rec-tag { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: var(--cst-ind, #4338CA); color: #fff !important; font-size: 12.5px !important; font-weight: 600; line-height: 1.5; }

/* ── Where each part happens (Script) ─────────────────────────────────────── */
:is(.cxt, .cxt-sheet) .cxt-setlist { gap: 12px; }
:is(.cxt, .cxt-sheet) .cxt-set { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--cst-line-2, #ece7dd); border-radius: 14px; background: var(--cst-paper, #FCFBF8); }
:is(.cxt, .cxt-sheet) .cxt-set.is-done { background: var(--cst-good-bg, #EEF7F1); border-color: #cfe6d8; }
:is(.cxt, .cxt-sheet) .cxt-set-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
:is(.cxt, .cxt-sheet) .cxt-set-h .cxt-k { color: var(--cst-ink-3, #6b6475); }
:is(.cxt, .cxt-sheet) .cxt-set-h b { font-size: 16px; font-weight: 600; }
:is(.cxt, .cxt-sheet) .cxt-from { margin: 0; font-size: 14.5px; color: var(--cst-ink-2, #5d5566); line-height: 1.5; }
:is(.cxt, .cxt-sheet) .cxt-from span { font-weight: 600; }
:is(.cxt, .cxt-sheet) .cxt-where { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
:is(.cxt, .cxt-sheet) .cxt-set-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
:is(.cxt, .cxt-sheet) .cxt-count { margin: 0; font-size: 15px; color: var(--cst-ink-2, #5d5566); }
:is(.cxt, .cxt-sheet) .cxt-count.is-done { color: var(--cst-good, #1c6b43); font-weight: 600; }

/* ── Phones: one column, every target 44px or more ────────────────────────── */
@media (max-width: 640px) {
  .cxt { padding: 16px; border-radius: 16px; }
  :is(.cxt, .cxt-sheet) .cxt-h { font-size: 20px; }
  :is(.cxt, .cxt-sheet) .cxt-opts-2 { grid-template-columns: 1fr; }
  /* Three on a phone: each a row, its picture small at the left, so all three fit without a long scroll. */
  :is(.cxt, .cxt-sheet) .cxt-opts-3 { grid-template-columns: minmax(0, 1fr); }
  :is(.cxt, .cxt-sheet) .cxt-opts-3 .cxt-opt-pic { flex-direction: row; align-items: center; padding: 12px 44px 12px 12px; }
  :is(.cxt, .cxt-sheet) .cxt-opts-3 .cxt-pic { flex: none; width: 72px; height: 72px; }
  :is(.cxt, .cxt-sheet) .cxt-opts-3 .cxt-pic-scene.is-b, :is(.cxt, .cxt-sheet) .cxt-opts-3 .cxt-pic-scene.is-c { display: none; }
  :is(.cxt, .cxt-sheet) .cxt-opts-3 .cxt-opt-pic .cxt-dot { top: 50%; right: 14px; transform: translateY(-50%); }
  :is(.cxt, .cxt-sheet) .cxt-pic-ask i { width: 44px; height: 44px; font-size: 26px; }
  :is(.cxt, .cxt-sheet) .cxt-pic { height: 76px; }
  :is(.cxt, .cxt-sheet) .cxt-go { align-self: stretch; }
  :is(.cxt, .cxt-sheet) .cxt-track { gap: 10px; padding: 10px; }
  .cxt .cxt-track > button:last-child { flex: none; }
  :is(.cxt, .cxt-sheet) .cxt-picked { white-space: normal; text-align: right; max-width: 96px; }
  :is(.cxt, .cxt-sheet) .cxt-dels li { flex-direction: column; align-items: stretch; }
}
