/* Reusable Checkbox Input Component Styles */

.tb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color-table, #333);
  user-select: none;
  width: fit-content;
  margin: 0;
}

.tb-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tb-checkbox-custom {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid var(--label-background-color);
  border-radius: var(--border-radius-3);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
  background-color: var(--label-background-color);
}

.tb-checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.tb-checkbox-label input[type="checkbox"]:checked + .tb-checkbox-custom {
  background-color: var(--primary-color, #007bff);
  border-color: var(--primary-color, #007bff);
}

.tb-checkbox-label input[type="checkbox"]:checked + .tb-checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.tb-checkbox-label:hover .tb-checkbox-custom {
  border-color: var(--primary-color, #007bff);
}

.tb-checkbox-label input[type="checkbox"]:disabled + .tb-checkbox-custom {
  background-color: #f5f5f5;
  border-color: #ddd;
  cursor: not-allowed;
}

.tb-checkbox-label input[type="checkbox"]:disabled ~ .tb-checkbox-text {
  color: #999;
  cursor: not-allowed;
}

/* .tb-checkbox-label input[type="checkbox"]:focus + .tb-checkbox-custom {
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
} */

.tb-checkbox-text {
  flex: 1;
}
