/* Custom fields - board-card chips + detail-panel controls.
   Vendored like subissues.css (no bundler); linked from the root
   layout. Palette variables come from palette.css.

   v2 (notes/makeover_design_language.md): chips ride --r-pill,
   controls --r-sm, motion --dur-fast/--ease, focus rings on every
   interactive piece. New §2 tokens carry working fallbacks until M1
   lands them in app.css. */

/* Board-card chip: compact pill for number/select/date values. */
.cf-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--sp-2, 8px);
  border-radius: var(--r-pill, 999px);
  font-size: var(--size-xs, 11px);
  font-weight: 500;
  color: var(--text-2);
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  border: 1px solid var(--border);
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail-panel props: align the label/editor rows like the other props. */
.cf-prop {
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-1, 4px);
}

.cf-control select,
.cf-input-row input {
  width: 100%;
  min-width: 0;
}

.cf-input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-1, 4px);
}

.cf-input-row input {
  flex: 1;
}

.cf-clear {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px var(--sp-1, 4px);
  font-size: var(--size-xs, 11px);
  line-height: 1;
  border-radius: var(--r-sm, 4px);
}

.cf-clear:hover {
  color: var(--accent);
}

.cf-clear:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent));
}

/* multi_select option buttons */
.cf-multi {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1, 4px);
}

.cf-option {
  font-size: var(--size-sm, 12px);
  padding: 2px var(--sp-2, 8px);
  border-radius: var(--r-pill, 999px);
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-2, transparent);
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease, ease),
    color var(--dur-fast, 120ms) var(--ease, ease),
    background var(--dur-fast, 120ms) var(--ease, ease);
}

.cf-option:hover {
  border-color: var(--accent-dim);
}

.cf-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent));
}

.cf-option.is-on {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-soft, transparent);
}

/* -- responsive (mobile pass, notes/mobile_pass.md): option pills are
   tappable toggles - 44px on phones ------------------------------------- */

@media (max-width: 767px) {
  .cf-option {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: var(--sp-1, 4px) var(--sp-4, 16px);
  }
}

/* Deactivated fields: read-only display, editors never render. */
.cf-readonly {
  font-size: var(--size-sm, 12px);
  color: var(--muted);
  font-style: italic;
  overflow-wrap: anywhere;
}
