/* CLAUDE 10-09: the clip tools panel (clipfx.js), in the clip inspector on the right (a sheet on a phone; CLAUDE 10-11,
   it was Media > Clip). Same quiet greys as the speed and volume panels; the green only marks what is on. */
.cf {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cf.cf-off .cf-group {
  opacity: 0.55;
}
.cf-at {
  margin: 0;
  font-size: var(--t-label);
  color: var(--c-fg-2);
}
.cf-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--c-raised);
  border: 0;
  font-size: var(--t-label);
  line-height: 1.4;
  color: var(--c-fg-2);
}
.cf-note[data-bad='1'] {
  background: rgba(255, 107, 107, 0.1);
  color: #f1c4c4;
}
.cf-note[hidden],
.cf-hint[hidden],
.cf-job[hidden] {
  display: none;
}
.cf-hint {
  margin: 6px 0 0;
  font-size: var(--t-meta);
  line-height: 1.4;
  color: var(--c-fg-3);
}
/* CLAUDE 10-12 Graphite: a group is a folding section (its title and a chevron), divided by a hairline, no box */
.cf {
  gap: 0;
}
.cf-group {
  border: 0;
  border-top: 1px solid var(--c-line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 var(--s-3);
}
.cf-group > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: var(--t-body);
  color: var(--c-fg);
}
.cf-group > summary::-webkit-details-marker {
  display: none;
}
/* the value a folded section is set to (Motion blur: 40%); nothing when it is off */
.cf-sum {
  margin-left: var(--s-2);
  font-weight: 400;
  font-size: var(--t-meta);
  color: var(--c-fg-3);
  font-variant-numeric: tabular-nums;
}
.cf-sum:empty {
  display: none;
}
.cf-group > summary::after {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: var(--c-fg-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: transform var(--d-ui) var(--ease-out);
}
.cf-group:not([open]) > summary::after {
  content: '';
  transform: rotate(-90deg);
}
.cf-group > summary:hover::after {
  background: var(--c-fg);
}
/* CLAUDE 10-18 (polish B3a, P5): a folding section opens and closes over 180 ms (the details' own content box, through
   interpolate-size, where the browser has it; elsewhere it opens at once, as before). Opens on a click: nothing here runs
   on the keyboard-driven shortcuts of the timeline. */
@supports (interpolate-size: allow-keywords) {
  .cf-group {
    interpolate-size: allow-keywords;
  }
  .cf-group::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size var(--d-ui) var(--ease-out),
      content-visibility var(--d-ui) allow-discrete;
  }
  .cf-group[open]::details-content {
    block-size: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf-group > summary::after {
    transition: none;
  }
}
.cf-tabs {
  display: flex;
  gap: var(--s-4);
  padding: 0;
  margin-bottom: 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.cf-tabs button {
  min-height: var(--h-md);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c-fg-3);
  font-size: var(--t-label);
  font-weight: 500;
}
.cf-tabs button[aria-selected='true'] {
  background: transparent;
  color: var(--c-fg);
}
/* CLAUDE 10-10: the Animations sheet: tabs + search + favourites, category chips, tiles that loop the animation */
.cf-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.cf-bar .cf-tabs {
  flex: 1;
  margin: 0;
}
.cf-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--h-md);
  height: var(--h-md);
  padding: 0;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  color: var(--c-fg-3);
  cursor: pointer;
}
.cf-ico:hover {
  color: var(--c-fg);
  background: var(--c-raised);
}
.cf-ico[aria-pressed='true'] {
  border-color: transparent;
  background: var(--c-raised);
  color: var(--c-fg);
}
/* favourites only: gold like a starred tile (the warn token), not the colour of an on switch */
.cf-ico[data-cf='favBtn'][aria-pressed='true'] {
  border-color: transparent;
  color: var(--c-warn);
}
.cf-ico[data-cf='favBtn'][aria-pressed='true'] svg {
  fill: currentColor;
}
.cf-search {
  margin-bottom: 8px;
}
.cf-search[hidden],
.cf-chips[hidden],
.cf-empty[hidden] {
  display: none;
}
.cf-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: var(--h-md);
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 0;
  /* CLAUDE 10-16: the hairline is a straight bottom strip, not an inset shadow (that curls up at rounded corners) */
  box-shadow: none;
  background: var(--field-line) no-repeat left bottom / 100% 1px;
  color: var(--c-fg);
  font-size: var(--t-body);
}
.cf-search input:is(:hover, :focus) {
  background: var(--c-raised);
  box-shadow: none;
}
.cf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s-4);
  margin-bottom: 8px;
}
.cf-chip {
  flex: 0 0 auto;
  min-height: var(--h-sm);
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--c-fg-3);
  font-size: var(--t-label);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.cf-chip[aria-pressed='true'] {
  background: transparent;
  border-color: transparent;
  color: var(--c-fg);
}
.cf-empty {
  margin: 6px 0 12px;
  font-size: var(--t-label);
  line-height: 1.4;
  color: var(--c-fg-3);
  text-align: center;
}
.cf-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.cf-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  color: var(--c-fg-2);
  font-size: var(--t-meta);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.cf-tile:hover {
  color: var(--c-fg);
  background: transparent;
}
/* the tile is its preview; the chosen one gets the light ring on the picture */
.cf-tile[aria-pressed='true'] {
  border-color: transparent;
  background: transparent;
  color: var(--c-fg);
}
.cf-tile[aria-pressed='true'] .cf-pv {
  box-shadow: 0 0 0 1.5px var(--c-fg);
}
/* CLAUDE 10-20 (owner: "how tf do you even get the animation onto the video"): the applied tile also carries a check on
   its picture, so it reads as "on" at a glance (None keeps the ring only) */
.cf-tile:not(.cf-none)[aria-pressed='true'] .cf-pv::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--c-fg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230e0e10' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
/* the pinned head of the Animations sheet (controls.css .pin-set): In / Out / Combo, the clip it acts on, Duration */
.cf-pin {
  display: grid;
  gap: var(--s-1);
}
.cf-pin .cf-bar {
  margin: 0;
}
.cf-for {
  margin: 0;
  font-size: var(--t-label);
  color: var(--c-fg-2);
}
.cf-for:empty {
  display: none;
}
.cf-pv {
  position: relative;
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--c-raised);
}
.cf-cv {
  display: block;
  width: 100%;
  height: 100%;
}
.cf-sk,
.cf-skel {
  background: var(--c-raised);
  animation: cf-pulse 1.4s ease-in-out infinite; /* CLAUDE 10-11: opacity (composited), not a repainted background-position */
}
.cf-skel {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
}
@keyframes cf-pulse {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf-sk,
  .cf-skel {
    animation: none;
  }
}
.cf-gem {
  position: absolute;
  top: 4px;
  right: 4px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.cf-nm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  padding: 0 2px;
}
.cf-tile .fav-star {
  top: 8px;
  left: 8px;
}
.cf-tile:disabled,
.cf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cf-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--h-md);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  color: var(--c-fg-2);
  font-weight: 500;
  font-size: var(--t-label);
}
.cf-btn:hover:not(:disabled) {
  background: var(--c-raised);
  color: var(--c-fg);
}
/* an on switch (Reverse, Stabilize): the raised fill and bright text, plus a small signal dot */
.cf-btn.cf-sw[aria-pressed='true'] {
  border-color: transparent;
  background: var(--c-raised);
  color: var(--c-fg);
}
.cf-btn.cf-sw[aria-pressed='true']::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-signal);
}
.cf-job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: #d4d4d8;
}
.cf-job progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
}
.cf [data-cf='maskBox'] > details > summary {
  display: none;
}
.cf [data-cf='maskBox'] .range-field,
.cf [data-cf='maskBox'] .field {
  margin-top: 8px;
}
.cf :focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

/* the Replace chooser (a dialog: a floating layer) */
.cf-pick {
  width: min(560px, 94vw);
  max-height: 86vh;
  padding: var(--s-4);
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-overlay);
  box-shadow: var(--e-float);
  color: var(--c-fg);
}
.cf-pick::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.cf-pick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cf-pick-top h2 {
  margin: 0;
  font-size: 16px;
}
.cf-x {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
}
.cf-pick-bar {
  margin: 8px 0;
}
.cf-status {
  min-height: 18px;
  margin: 4px 0 8px;
  font-size: 12px;
  color: #b0b0b3;
}
.cf-vids {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  overflow: auto;
  max-height: 52vh;
}
.cf-vid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  text-align: left;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: inherit;
  overflow: hidden;
}
.cf-vid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1b1b1d;
}
.cf-vid span {
  display: flex;
  flex-direction: column;
  padding: 0 8px 8px;
  font-size: 12px;
}
.cf-vid small {
  color: #9a9aa2;
}

/* a phone: bigger targets (which group shows is the clip inspector's sub-tab, clipinsp.css) */
@media (max-width: 767.98px) {
  .cf-tabs button,
  .cf-tile,
  .cf-btn,
  .cf-vid {
    min-height: 44px;
  }
  .cf input[type='range'] {
    height: 44px; /* a finger's width of grip around the thin track */
    margin-block: 0;
  }
  .cf-tile {
    min-height: 66px;
  }
  .cf-ico {
    width: 44px;
    height: 44px;
  }
  .cf-chip,
  .cf-search input {
    min-height: 44px;
  }
  .cf-chips {
    flex-wrap: nowrap; /* one row you swipe along */
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cf-chips::-webkit-scrollbar {
    display: none;
  }
  .cf-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .cf-pick {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  .cf-vids {
    max-height: none;
  }
}
