/* This will replace all the checkboxes in scalars with a "switch" */

/* Hide the checkbox*/

.tag-scalar .boolean-value-editor input {
  height: 0;
	width: 0;
	visibility: hidden;
  position:absolute;
}

.tag-scalar .boolean-value-editor label {
	height:100%;
	min-height:39px;
	line-height:39px;
	display:block;
}

/* Add the Slider area (outer rounded rectangle)*/

.tag-scalar .boolean-value-editor input + span {
	float:right;
	left: -41.3%;
	text-align: left;
    margin:9px 0 0;
	cursor: pointer;
	text-indent: -9999px;
	width: 40px;
	height: 20px;
	background: grey;
	display: block;
	border-radius: 20px;
	position: relative;
  font-size:0;
}

/* Add the Switch (inner circle)*/

.tag-scalar .boolean-value-editor input + span:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 16px;
	transition: 0.3s;
}

/* Change the background color when the switch is turned on.*/

.tag-scalar .boolean-value-editor input:checked + span {
	background: #004bff !important;
}

/* Change the opacity and mouse cursor when the switch is read-only.*/

.tag-scalar .boolean-value-editor input:disabled + span {
  opacity:0.3;
	cursor:not-allowed;

}

/* Move the switch circle to the right when turned on.*/

.tag-scalar .boolean-value-editor input:checked + span:after {
	left: calc(100% - 2px);
	transform: translateX(-100%);
}

/* Stretch the switch (increase the length of the inner circle) at the moment
   that you click on it (holding your mouse down) to create animation effect.*/

.tag-scalar .boolean-value-editor input + span:active:after {
	width: 26px;
}

/* Hide A_____________A identifier as it is only used to make sure that the
scalar widget is displayed as multiple scalars widget i.o. kpi.*/

.tag-scalar[data-widget\.uri*="Switch"] [title*="_____"]+td,
.tag-scalar[data-widget\.uri*="Switch"] [title*="_____"] {
    visibility: hidden !important;
}

/* A compact scalar widget needs to be 250px wide, the standard button size */

.widgetdiv.widgetdiv-tag-scalar-compact {
	width: 250px;
}

.widgetdiv.widgetdiv-tag-scalar-compact .tag-scalar[data-widget\.uri*="Switch"] .key {
	width: 100%;
	overflow: visible;
}
