/* KEYFRAME CARDS -- the card on its stalk that a keyframe is drawn as, on
   the timeline (js/nleedit.js) and on Create's Keyframe edit tile
   (js/create-keyframes.js). Both draw it through js/keyframe-edit.js
   (cardEl), so its look lives here once rather than under the timeline's
   html.desktop.nle-on, which After Effects never has: Simon, 20 Oct 2026,
   "lets also add the keyframe edit as a standalone video mode", and the
   Create tile is in the panel there too.

   The strip a card stands in sets --kf-h (how tall the strip is); --kfe is
   the teal that tells a keyframe apart from the playhead and selection (the
   accent) and the grabbed-frame marks (amber). */
.nle-kfe { --kfe: #4fd1c5; }
.nle-kfe {
  position: absolute; top: 0; width: 0; height: calc(var(--kf-h, 46px) + 10px); z-index: 5;
}
.nle-kfe-card {
  position: absolute; left: -31px; top: 4px; width: 62px; height: 35px; box-sizing: border-box;
  border-radius: 4px; overflow: hidden; background: #16161a; border: 1px solid #4a4a56;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .65); cursor: pointer;
}
.nle-kfe-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.nle-kfe-stalk {
  position: absolute; left: -0.5px; top: 39px; width: 1px; height: calc(var(--kf-h, 46px) - 31px);
  background: var(--kfe); box-shadow: 0 0 2px rgba(0, 0, 0, .9); pointer-events: none;
}
.nle-kfe-stalk::after {
  content: ''; position: absolute; left: -2.5px; bottom: -3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--kfe); box-shadow: 0 0 2px rgba(0, 0, 0, .9);
}
.nle-kfe:hover { z-index: 7; }
.nle-kfe:hover .nle-kfe-card { border-color: #8a8a96; }
.nle-kfe.edited .nle-kfe-card { border-color: var(--kfe); }
.nle-kfe.sel .nle-kfe-card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 2px 6px rgba(0, 0, 0, .65); }
.nle-kfe.sel .nle-kfe-stalk, .nle-kfe.sel .nle-kfe-stalk::after { background: var(--accent); }
.nle-kfe.dragging { z-index: 8; opacity: .9; }
.nle-kfe.dragging .nle-kfe-card { cursor: grabbing; }
.nle-kfe.dropover .nle-kfe-card { outline: 2px dashed var(--kfe); outline-offset: 1px; }
.nle-kfe-badge {
  position: absolute; left: 2px; bottom: 2px; padding: 0 3px; border-radius: 2px;
  font-size: 7px; font-weight: 800; line-height: 11px; letter-spacing: .03em; text-transform: uppercase;
  color: #062420; background: var(--kfe); pointer-events: none;
}
.nle-kfe.showorig .nle-kfe-badge { color: #e8e8ee; background: rgba(20, 20, 24, .85); }
.nle-kfe-x, .nle-kfe-sw {
  position: absolute; top: 2px; width: 14px; height: 14px; padding: 0; display: none;
  align-items: center; justify-content: center; border: 0; border-radius: 50%;
  font-size: 10px; line-height: 1; color: #fff; background: rgba(10, 10, 12, .82); cursor: pointer;
}
.nle-kfe-x { right: 2px; }
.nle-kfe-sw { left: 2px; }
.nle-kfe:hover .nle-kfe-x, .nle-kfe:hover .nle-kfe-sw { display: inline-flex; }
.nle-kfe-x:hover { background: var(--red, var(--danger)); }
.nle-kfe-sw:hover { background: var(--kfe); color: #062420; }
.nle-kfe-wait, .nle-kfe.busy .nle-kfe-card::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -7px 0 0 -7px;
  border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--kfe); border-radius: 50%;
  animation: nle-kfe-spin .8s linear infinite;
}
@keyframes nle-kfe-spin { to { transform: rotate(360deg); } }
