:root {
	--uiColor: #208080;
	--uiRed: darkred;
}


/* --- Popup --- */
.UIPopup {
	position: fixed;
	inset: 0;
	border: 1px solid gray;
	background-color: white;
	box-shadow: 0 0 8px 0 #0004;
	overflow: hidden;
	border-radius: 10px;
}

.UIPopupDim {
	position: fixed;
	inset: 0;
}


/* --- Toggle ---*/
/* The switch - the box around the slider */
.UISwitch {
	position: relative;
	display: inline-block;
	width: 30px;
	height: 17px;
	border-radius: 100px;
	overflow: hidden;
}

/* Hide default HTML checkbox */
.UISwitch input {
	opacity: 0;
	width: 0;
	height: 0;
}

/* The slider */
.UISwitch+.UISlider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	-webkit-transition: .4s;
	transition: .4s;
	border-radius: 34px;
}

.UISwitch+.UISlider:before {
	position: absolute;
	content: "";
	height: 13px;
	width: 13px;
	left: 2px;
	top: 2px;
	background-color: white;
	-webkit-transition: .4s;
	transition: .4s;
	border-radius: 50%;
}

input:checked+.UISlider {
	background-color: var(--uiColor);
}

input:focus+.UISlider {
	box-shadow: 0 0 1px var(--uiColor);
}

input:checked+.UISlider:before {
	-webkit-transform: translateX(13px);
	-ms-transform: translateX(13px);
	transform: translateX(13px);
}


.UISlider {
	position: relative;
	width: 100px;
	height: 16px;
}

.UISlider .UILine {
	position: absolute;
	left: 0px;
	top: calc(50% - 3px);
	width: 100%;
	height: 5px;
	border-radius: 100px;
	background-color: rgb(0, 0, 136);
}

.UISlider .UIDot {
	position: absolute;
	left: 0;
	top: 0;
	width: 16px;
	height: 16px;
	border: 2px solid white;
	border-radius: 100px;
	background-color: rgb(0, 0, 136);
	cursor: pointer
}



/* --- Dialog Modal --- */
dialog.UIDialog {
	position: fixed;
	top: 100px;
	left: 50%;
	transform: translateX(-50%);
	border: 1px solid gray;
	background-color: white;
	box-shadow: 0 0 8px 0 #0004;
	border-radius: 10px;
	padding: 0;
	margin: 0;
}

dialog.UIDialog::backdrop {
	background-color: rgba(0, 0, 0, 0.5);
}