/*
Some base styles that I normally use in projects.
*/

/* ======================================== checkbox slider ====================================== */
input:not([type="checkbox"]),
textarea {
	padding: 0.25rem;
	font-family: inherit;
	font-size: inherit;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox */
input[type="number"] {
	appearance: textfield;
	-moz-appearance: textfield;
	text-align: end;
}

button,
summary {
	cursor: pointer;
}

input[type="checkbox"] {
	appearance: none;
	position: relative;
	display: inline-block;
	background: lightgrey;
	height: 1.65rem;
	width: 2.75rem;
	vertical-align: middle;
	border-radius: 2rem;
	box-shadow: 0px 1px 3px #0003 inset;
	transition: 0.25s linear background;
	border-color: var(--cw-success);
	box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
input[type="checkbox"]::before {
	content: "";
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	background: #fff;
	border-radius: 1.2rem;
	position: absolute;
	top: 0.2rem;
	left: 0.2rem;
	box-shadow: 0px 1px 3px #0003;
	transition: 0.25s linear transform;
	transform: translateX(0rem);
}
input[type="checkbox"]:checked {
	background: green;
}
input[type="checkbox"]:checked::before {
	transform: translateX(1rem);
}
input[type="checkbox"]:focus {
	outline: 0.1rem solid black;
	outline-offset: -0.1rem;
}
