@charset "UTF-8";
// Morten Mitchell Larød 2019

@import 'vars';

input[type="search"],
input[type="text"],
textarea {
	border-radius: 4px 4px 0 0;
	outline: none;
	height: 32px;
	display: inline-block;
	padding: 4px 16px;
	background: $c-neutral-lighter;
	border-bottom: 1px solid $c-neutral-dark;
	border-width: 0 0 1px 0;
	color: $c-neutral-darkest;
}
.search {
	button[type="submit"] {
		border-radius: 0 3px 3px 0;
		color: $fc-dark;
		outline: none;
		height: 40px;
		width: 40px;
		display: inline-block;
	    background-size: 16px;
		background-repeat: no-repeat;
		background-position: center;
	}
}

.custom-select {
	position: relative;
	background-color: $c-neutral-lighter;
	border-bottom: 1px solid $c-neutral-dark;
	border-radius: 4px 4px 0 0;
	select {
		display: none;
	}
	.select-selected {
		&:after {
			position: absolute;
			content: "";
			top: 12px;
			right: 10px;
			width: 0;
			height: 0;
			border: 6px solid transparent;
			border-color: $c-neutral-darker transparent transparent transparent;
		}
	
		&.select-arrow-active:after {
			border-color: transparent transparent $c-neutral-darker transparent;
			top: 7px;
		}
	}
	.select-selected {
		padding: 0 $gap-default;
		border-radius: 3px;
		cursor: pointer;
		color: $fc-dark;
		height: 32px;
		line-height: 32px;
		&:hover {
			color: $fc-darkest;
		}
	}
	.select-items div {
		color: $fc-dark-medium;
		padding: $gap-tiny $gap-default;
		cursor: pointer;
		&:hover {
			color: $fc-light;
		    background: $c-neutral-darker;
	    }
	}
	.select-items {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 99;
		border-width: 0 1px 1px;
		background-color: $c-neutral-lighter;
		border-bottom: 1px solid $c-neutral-dark;
	}
	.select-hide {
		display: none;
	}
	.select-items div:hover,
	.same-as-selected {
		color: $fc-lightest;
	}
}



/* switch */
input[type="checkbox"].switch { 
	position: absolute;
	opacity: 0;
}
input[type="checkbox"].switch + div {
	vertical-align: sub;
	width: 24px;
	height: 16px;
	border: 1px solid $c-secondary-light;
	border-radius: 999px;
}
input[type="checkbox"].switch:checked + div {
	background-color: #59973A;
	box-shadow: inset 0 0 0 10px rgba(89,151,58,1);
}
input[type="checkbox"].switch + div > div {
	float: left;
	width: 16px;
	height: 16px;
	border-radius: inherit;
	background: #ffffff;
	
	pointer-events: none;
	-webkit-transition-timing-function: cubic-bezier(.54,1.85,.5,1);
	-webkit-transition-duration: 0.4s;
	-webkit-transition-property: transform, background-color, box-shadow;
	-moz-transition-timing-function: cubic-bezier(.54,1.85,.5,1);
	transition-timing-function: cubic-bezier(.54,1.85,.5,1);
	-moz-transition-duration: 0.4s;
	transition-duration: 0.4s;
	-moz-transition-property: transform, background-color;
	transition-property: transform, background-color;
	pointer-events: none;
}
input[type="checkbox"].switch + div > div {
	width: 12px;
    height: 12px;
    margin-top: 1px;
    margin-left: 1px;
}
input[type="checkbox"].switch:checked + div > div {
	-webkit-transform: translate3d(8px, 0, 0);
	-moz-transform: translate3d(8px, 0, 0);
	transform: translate3d(8px, 0, 0);
}








.checkbox label {
	cursor: pointer;
}
.checkbox label:after, 
.radio label:after {
    content: '';
    display: table;
    clear: both;
}
.checkbox .cr,
.radio .cr {
    position: relative;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    float: left;
	margin: 1px 6px 0 0;
	background: $c-neutral-lighter;
	border-bottom: 1px solid $c-neutral-dark;
	border-radius: 4px 4px 0 0;
	cursor: pointer;
}

.radio .cr {
    border-radius: 50%;
}

.checkbox .cr .cr-icon {
	position: absolute;
	font-size: 13px;
	font-weight: 400;
    line-height: 0;
    top: 54%;
    left: 18%;
}
.radio .cr .cr-icon {
	position: absolute;
	font-size: 10px;
	font-weight: 900;
    line-height: 0;
	top: 57%;
    left: 14%;
}

.radio .cr .cr-icon {
    margin-left: 0.04em;
}

.checkbox label input[type="checkbox"],
.radio label input[type="radio"] {
    display: none;
}

.checkbox label input[type="checkbox"] + .cr > .cr-icon,
.radio label input[type="radio"] + .cr > .cr-icon {
    transform: scale(2) rotateZ(-20deg);
    opacity: 0;
    transition: all .2s ease-in;
}

.checkbox label input[type="checkbox"]:checked + .cr > .cr-icon,
.radio label input[type="radio"]:checked + .cr > .cr-icon {
    transform: scale(1) rotateZ(0deg);
	opacity: 1;
	color: $c-neutral-darker;
}

.checkbox label input[type="checkbox"]:disabled + .cr,
.radio label input[type="radio"]:disabled + .cr {
    opacity: .5;
}	
