/* Clip keyframes on a Video edit / Reference-to-video card's scrub strip, their pop-over, and the keyframe chip on
   the card's pictures (js/panel/48k-clip-keyframes.js). Teal, the colour the app already uses for "this comes back
   to where it was lent from" (the image-lend strip, 22-prompt-ai.js), so a keyframe never reads as the trim (crimson)
   or the playhead (white).
   KF NUMBER BRAND (Simon, 11 Nov 2026 17:53: "the thing that says the frame number is still in the brand color, not the
   teal"): the markers, their F numbers, the pop-over's number and the picture chip are the brand colour now. */
.vtrim-bar.ckf-on { cursor: pointer; }
.ckf-ms { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 4; }
.ckf-m {
  position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px;
  background: var(--accent, #E50A4E); pointer-events: auto; cursor: ew-resize; touch-action: none;   /* KF NUMBER BRAND */
  box-shadow: 0 0 4px rgba(229, 10, 78, .55);   /* KF NUMBER BRAND */
}
/* a hit area wider than the line */
.ckf-m::before { content: ''; position: absolute; left: -6px; right: -6px; top: 0; bottom: 0; }
.ckf-m span {
  position: absolute; top: 2px; left: 4px; padding: 0 3px; border-radius: 3px;
  font: 700 9px/12px var(--font, system-ui, sans-serif); letter-spacing: .2px; white-space: nowrap;
  color: var(--accent, #E50A4E); background: rgba(8, 8, 10, .86); border: 1px solid rgba(229, 10, 78, .75);   /* KF NUMBER BRAND */
  pointer-events: none;
}
.ckf-m.flip span { left: auto; right: 4px; }
.ckf-m:hover span { color: #fff; border-color: var(--accent, #E50A4E); }   /* KF NUMBER BRAND */
.ckf-m.sel { background: #fff; box-shadow: 0 0 6px rgba(229, 10, 78, .9); }   /* KF NUMBER BRAND */
.ckf-m.sel span { background: var(--accent, #E50A4E); color: #fff; border-color: var(--accent, #E50A4E); }   /* KF NUMBER BRAND */
/* outside the trim: there, but not sent */
/* KF NUMBER BRAND (next line: dashes in the brand colour) */
.ckf-m.out { opacity: .38; background: repeating-linear-gradient(to bottom, var(--accent, #E50A4E) 0 3px, transparent 3px 6px); box-shadow: none; }
.ckf-m.out span { text-decoration: line-through; }
/* (KF ON THE TIMELINE) a keyframe's picture: a thumbnail under its marker, not a card in the reference slot */
.slot-card.ckf-ontl { display: none !important; }
.ckf-pics-gap { margin-bottom: 46px !important; }
.ckf-m.has-pic span { display: none; }
.ckf-th {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  width: 58px; height: 34px; border-radius: 4px; overflow: hidden; pointer-events: auto; cursor: grab;
  background: #0b0b0d; border: 1.5px solid var(--accent, #E50A4E); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.ckf-m.sel .ckf-th { border-color: #fff; box-shadow: 0 0 0 1px var(--accent, #E50A4E), 0 2px 8px rgba(0, 0, 0, .5); }
.ckf-th.out { opacity: .45; }
.ckf-th img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ckf-th-f {
  position: absolute; left: 2px; bottom: 2px; padding: 0 3px; border-radius: 3px;
  font: 700 9px/12px var(--font, system-ui, sans-serif); color: #fff; background: var(--accent, #E50A4E); pointer-events: none;
}
.ckf-th button {
  position: absolute; top: 2px; width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #fff; background: rgba(8, 8, 10, .82); font: 700 11px/1 var(--font, system-ui, sans-serif);
}
.ckf-th button svg { width: 9px; height: 9px; }
.ckf-th .ckf-th-x { right: 2px; }
.ckf-th .ckf-th-x:hover { background: var(--accent, #E50A4E); }
.ckf-th .ckf-th-edit, .ckf-th .ckf-th-gal { opacity: 0; transition: opacity .12s; }
.ckf-th .ckf-th-edit { right: 19px; }
.ckf-th .ckf-th-gal { right: 36px; }
.ckf-th:hover .ckf-th-edit, .ckf-th:hover .ckf-th-gal { opacity: 1; }
.ckf-th .ckf-th-edit:hover, .ckf-th .ckf-th-gal:hover { background: var(--accent, #E50A4E); }

.ckf-pop {
  position: absolute; z-index: 30; transform: translateX(-50%);
  min-width: 236px; max-width: 340px; padding: 8px 9px 7px;
  background: var(--panel, #111114); border: 1px solid rgba(79, 209, 197, .55); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55); font-size: 11.5px; color: var(--text, #e9e9ec);
}
.ckf-pop::before {
  content: ''; position: absolute; top: -5px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  background: inherit; border-left: 1px solid rgba(79, 209, 197, .55); border-top: 1px solid rgba(79, 209, 197, .55);
  transform: rotate(45deg);
}
.ckf-pop-h { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.ckf-pop-t { flex: 1; min-width: 0; color: var(--text-dim, #9a9aa2); }
.ckf-pop-t b { color: var(--accent, #E50A4E); font-weight: 700; }   /* KF NUMBER BRAND */
.ckf-pop-t i { font-style: normal; color: var(--warn, #e0a33a); }
.ckf-pop-x {
  flex: none; width: 18px; height: 18px; padding: 0; border: none; border-radius: 4px; cursor: pointer;
  background: transparent; color: var(--text-dim, #9a9aa2); font-size: 14px; line-height: 18px;
}
.ckf-pop-x:hover { color: var(--text, #fff); background: rgba(255, 255, 255, .08); }
.ckf-pop-acts { display: flex; flex-wrap: wrap; gap: 5px; }
.ckf-pop-acts button {
  font: inherit; font-size: 11px; padding: 4px 9px; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--border, #2a2a2e); background: var(--card, #17171a); color: var(--text, #e9e9ec);
}
.ckf-pop-acts button:hover:not(:disabled) { border-color: #4fd1c5; color: #4fd1c5; }
.ckf-pop-acts button.ckf-use { border-color: rgba(79, 209, 197, .6); }
.ckf-pop-acts button.ckf-rm:hover:not(:disabled) { border-color: var(--red, #e5484d); color: var(--red, #e5484d); }
.ckf-pop-acts button:disabled { opacity: .5; cursor: default; }
.ckf-pop-msg { margin-top: 6px; color: var(--text-dim, #9a9aa2); font-size: 10.5px; }
.ckf-pop-msg:empty { display: none; }
.ckf-pop-msg.bad { color: var(--red, #e5484d); }
.ckf-pop.ctx { min-width: 0; }

/* The keyframe chip on a picture, top left (the corner nothing else on the card uses). */
.slot-card .ckf-chip {
  position: absolute; top: 4px; left: 4px; z-index: 3; max-width: calc(100% - 50px);
  -webkit-appearance: none; appearance: none; cursor: pointer;
  font: 700 9.5px/1.2 var(--font, system-ui, sans-serif); padding: 2px 5px; border-radius: 4px;
  color: #fff; background: rgba(8, 8, 10, .8); border: 1px solid rgba(229, 10, 78, .6);   /* KF NUMBER BRAND */
}
.slot-card .ckf-chip:hover, .slot-card .ckf-chip:focus { border-color: var(--accent, #E50A4E); outline: none; }   /* KF NUMBER BRAND */
.slot-card .ckf-chip.on { color: #fff; background: var(--accent, #E50A4E); border-color: var(--accent, #E50A4E); }   /* KF NUMBER BRAND */
.slot-card .ckf-chip.out { opacity: .6; text-decoration: line-through; }
.slot-card .ckf-chip option { color: var(--text, #e9e9ec); background: var(--panel, #111114); }

/* (KEYFRAME REF CARDS) The keyframe's own reference card: its number top left in the brand colour, then Send to gallery
   and Edit keyframe (js/panel/48k-clip-keyframes.js tag). */
.slot-card .ckf-tag {
  position: absolute; top: 4px; left: 4px; z-index: 3; display: flex; align-items: center; gap: 3px;
  max-width: calc(100% - 40px);
}
.slot-card .ckf-tag-f {
  font: 800 10px/1 var(--font, system-ui, sans-serif); letter-spacing: .2px; padding: 4px 5px; border-radius: 4px;
  color: #fff; background: var(--accent, #E50A4E); box-shadow: 0 1px 3px rgba(0, 0, 0, .45); white-space: nowrap; cursor: default;
}
.slot-card .ckf-tag button {
  flex: none; width: 20px; height: 20px; padding: 0; border: none; border-radius: 4px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--scrim-mid, rgba(0, 0, 0, .62)); color: #fff;
}
.slot-card .ckf-tag button svg { width: 12px; height: 12px; display: block; }
.slot-card .ckf-tag button:hover:not(:disabled) { background: var(--accent, #E50A4E); }
.slot-card .ckf-tag button:disabled { opacity: .5; cursor: default; }
.slot-card .ckf-tag.out .ckf-tag-f { opacity: .55; text-decoration: line-through; }
.slot-card .ckf-tag.edited .ckf-tag-f { box-shadow: 0 0 0 1px #fff inset, 0 1px 3px rgba(0, 0, 0, .45); }
/* (KEYFRAME REF CARDS) Generate Keyframe, and its failure on the image-lend strip (22-prompt-ai.js) */
#btn-generate.ckf-genkf { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55) inset; }
#img-lend-bar .ckf-ked-err { flex: 0 1 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--red, #e5484d); font-size: 11px; }
/* KF GEN RETURN NOW: a keyframe whose edit is generating (js/panel/48k-clip-keyframes.js busyOn) -- its reference card on
   a clip strip card, and its thumbnail on Luma Ray 3.2 Modify's timeline: the picture dimmed under the app's ring. */
.ckf-busy {   /* KF GEN RETURN NOW */
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5); border-radius: inherit;
}
.ckf-busy .ckf-ring {   /* KF GEN RETURN NOW */
  width: 20px; height: 20px; border-radius: 50%; box-sizing: border-box;
  border: 3px solid rgba(255, 255, 255, .22); border-top-color: var(--accent, #E50A4E); animation: spin .9s linear infinite;
}
.kf-chip > .ckf-busy { bottom: 15px; z-index: auto; }   /* KF GEN RETURN NOW: over the thumbnail, under its label and hover actions */
.kf-chip > .ckf-busy .ckf-ring { width: 16px; height: 16px; border-width: 2px; }   /* KF GEN RETURN NOW */
