/* Legacy - not used by current components */
.checkbox_field_container { margin: 0.5rem; min-height: 0; }
.checkbox_field { width: 100%; height: 2rem; padding: 0.5rem; border-radius: 0.5rem; border: 1px solid grey; }

/* Checkbox Component Styles */
.checkbox-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.checkbox-input:disabled { cursor: not-allowed; }

.checkbox-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: var(--bg-card, #fff);
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius-sm, 0.25rem);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.checkbox-input:checked + .checkbox-custom {
  background-color: var(--primary, #3b82f6);
  border-color: var(--primary, #3b82f6);
}

.checkbox-custom svg {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s, transform 0.15s;
}

.checkbox-input:checked + .checkbox-custom svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-input:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #3b82f6) 30%, transparent);
}

.checkbox-input.error + .checkbox-custom {
  border-color: var(--text-error, #dc2626);
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--text-primary, #374151);
}

.checkbox-required {
  color: var(--text-error, #dc2626);
  margin-left: 0.25rem;
}

.checkbox-error {
  font-size: 0.75rem;
  color: var(--text-error, #dc2626);
  margin-top: 0.25rem;
}

.checkbox-error-placeholder { min-height: 1rem; }

/* Size variants */
.checkbox-sm .checkbox-custom { width: 16px; height: 16px; }
.checkbox-sm .checkbox-custom svg { width: 12px; height: 12px; }
.checkbox-sm .checkbox-text { font-size: 0.75rem; }

.checkbox-lg .checkbox-custom { width: 24px; height: 24px; }
.checkbox-lg .checkbox-custom svg { width: 16px; height: 16px; }
.checkbox-lg .checkbox-text { font-size: 1rem; }

/* Indeterminate state */
.checkbox-input:indeterminate + .checkbox-custom {
  background-color: var(--primary, #3b82f6);
  border-color: var(--primary, #3b82f6);
  position: relative;
}

.checkbox-input:indeterminate + .checkbox-custom::after {
  content: "";
  position: absolute;
  background-color: #fff;
  border-radius: 1px;
  width: 10px;
  height: 2px;
}

.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-group-items { margin-left: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }