/* Shared by sprite processing, video frame extraction and bead art. */
body .ck-section.chromakey-compact {
  padding: .6rem .75rem;
  margin-bottom: .5rem;
}
body .chromakey-compact .ck-section-header { margin-bottom: .25rem; }
body .chromakey-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .25rem 1.25rem;
  align-items: center;
}
body .chromakey-compact .ck-param-item { min-width: 0; }
body .chromakey-param-heading { display: flex; align-items: center; gap: .25rem; min-width: 0; }
body .chromakey-compact .form-label {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.4;
  cursor: help;
}
body .chromakey-compact .form-label strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
body [data-chromakey-controls] .chromakey-help {
  flex: 0 1 auto;
  width: auto;
  min-height: 44px;
  padding: .2rem 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: .9375rem !important;
  text-align: left;
  line-height: 1.4 !important;
  text-decoration: underline dotted var(--border);
  text-underline-offset: .25em;
  cursor: help;
  box-shadow: none !important;
  transform: none !important;
}
body [data-chromakey-controls] .chromakey-help:hover,
body [data-chromakey-controls] .chromakey-help[aria-expanded="true"] { text-decoration-color: var(--text); }
body .chromakey-compact .ck-slider { height: 44px; margin: -.35rem 0 0; }
body .chromakey-checks { display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-content: center; }
body .chromakey-checks .ck-check-label { min-height: 44px; margin: 0; font-size: .9375rem; }
body .chromakey-setting-tip {
  position: fixed;
  z-index: 10000;
  width: max-content;
  max-width: min(22rem, calc(100% - 32px));
  padding: .65rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--ui-control-radius, .5rem);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
  font-size: .9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chromakey-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body .ck-color-pick-row { display: flex; flex-wrap: wrap; gap: .5rem; }
body .ck-color-pick-row > [id$="ColorInfoBar"] { flex-wrap: wrap; }
body .sprite-extraction-toggle {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  margin: .75rem 0 0;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}
.sprite-extraction-toggle input { position: absolute; opacity: 0; }
.sprite-extraction-switch { width: 38px; height: 22px; padding: 3px; border: 1px solid var(--border); background: var(--bg-input); border-radius: 12px; flex-shrink: 0; }
.sprite-extraction-switch::after { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--text); }
.sprite-extraction-toggle input:checked + .sprite-extraction-switch { background: var(--accent); }
.sprite-extraction-toggle input:checked + .sprite-extraction-switch::after { transform: translateX(16px); background: var(--on-accent, var(--text)); }
.sprite-extraction-toggle input:focus-visible + .sprite-extraction-switch { outline: 2px solid var(--accent-text); outline-offset: 3px; }
#spriteExtractionFields { border: 0; padding: 0; margin: .5rem 0 0; min-width: 0; }
@media (max-width: 960px) {
  body .chromakey-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body .ck-section.chromakey-compact { padding: .4rem .5rem; }
  body .chromakey-compact-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  body .chromakey-compact .ck-param-item { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(64px, 1fr); align-items: center; gap: .5rem; }
  body .chromakey-param-heading { gap: 0; }
  body [data-chromakey-controls] .chromakey-help, body .chromakey-checks .ck-check-label { font-size: 1rem !important; }
  body .chromakey-compact .ck-slider { margin: 0; }
}
