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

@import 'vars';


input[type="text"],
input[type="date"],
textarea {
	position: relative;
	border-radius: 4px 4px 0 0;
	outline: none;
	height: 32px;
	display: inline-block;
	padding: 4px 16px;
	background: $warm-grey-200;
	border-bottom: 1px solid $c-neutral-dark;
	border-width: 0 0 1px 0;
	color: $c-black;
	&:focus {
		border-bottom: 2px solid $sky-blue-700;
	}
}
.search {
	display: flex;
	align-items: center;
	padding-left: $gap-default;
	border-radius: 4px 4px 0 0;
	outline: none;
	height: 32px;
	background: $warm-grey-200;
	border-bottom: 1px solid $c-neutral-dark;
	border-width: 0 0 1px 0;
	width: 100%;
	input[type="search"] {
		padding: 0 $gap-small;
		outline: none;
		height: 32px;
		display: inline-block;
		background: transparent;
		border: none;
		color: $c-black;
		&::-webkit-input-placeholder {
			color: $warm-grey-700;
		}
	}
	i {
		font-size: 16px;
		color: $warm-grey-500;
	}
	&:focus { // this does not work for outer div. See JS-file
		border-bottom-color: $sky-blue-700;
	}
}


.custom-select {
	position: relative;
	background-color: $warm-grey-200;
	border-bottom: 1px solid $c-neutral-dark;
	border-radius: 4px 4px 0 0;
	select {
		display: none;
	}
	.select-selected {
		&:after {
			position: absolute;
			top: 2px;
			right: 16px;
			display: inline-block;
			font-style: normal;
			font-variant: normal;
			text-rendering: auto;
			-webkit-font-smoothing: antialiased;
			font-family: "Font Awesome 5 Pro";
			font-weight: 600;
			font-size: 20px;
			content: "\f107";
		}
		&.select-arrow-active {
			color: $c-black;
		}
		&.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: $warm-grey-700;
		height: 32px;
		line-height: 32px;
		&:hover {
			color:  $c-black;
		}
	}
	.select-items {
		position: absolute;
		top: 4px;
		left: 0;
		right: 0;
		z-index: 99;
		border-width: 0 1px 1px;
		background-color: $white;
		border: 1px solid $warm-grey-400;
		border-radius: 3px;
		box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.07);
		div {
			color: $c-black;
			padding: $gap-small $gap-default;
			cursor: pointer;
			&:hover {
				color: $sky-blue-700;
				background: $sky-blue-100;
			}
		}
	}
	.select-hide {
		display: none;
	}
	.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);
}

.pin-teaser {
	.desc {
		float: left;
		width: 80%;
		color: $warm-grey-800;
		@include body-2;
	}
	.switch {
		float: right;
		width: 50px;
	}
}
.form-switch {
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.form-switch i {
  position: relative;
  display: inline-block;
  margin-right: $gap-small;
  width: 50px;
  height: 28px;
  background-color: $warm-grey-600;
  border-radius: 25px;
  vertical-align: text-bottom;
  transition: all 0.2s linear;
}

.form-switch i::before {
  content: "";
  position: absolute;
  left: 0;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  transform: translate3d(2px, 2px, 0) scale3d(1, 1, 1);
  transition: all 0.2s linear;
}

.form-switch i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 24px;
  background-color: #fff;
  border-radius: 12px;
  transform: translate3d(2px, 2px, 0);
  transition: all 0.2s ease-in-out;
}

.form-switch:active i::after {
  width: 28px;
  transform: translate3d(2px, 2px, 0);
}
.form-switch:active input:checked + i::after { transform: translate3d(16px, 2px, 0); }

.form-switch input { display: none; }
.form-switch input:checked + i { background-color: $sky-blue-700; }
.form-switch input:checked + i::before { transform: translate3d(18px, 2px, 0) scale3d(0, 0, 0); }
.form-switch input:checked + i::after { transform: translate3d(23px, 2px, 0); }






// https://www.w3schools.com/howto/howto_css_custom_checkbox.asp
.check {
	display: block;
	position: relative;
	padding-left: 24px;
	cursor: pointer;
	font-size: 15px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.check input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}
.checkmark {
	position: absolute;
	top: 0;
	left: 0;
	height: 19px;
	width: 19px;
	border: 1px solid $warm-grey-500;
	border-radius: 2px;
	transition: all .2s ease-in-out;
}
.check input:checked ~ .checkmark {
	background-color: $sky-blue-700;
	border: 1px solid $sky-blue-700;
}
.checkmark:after {
	content: "";
	position: absolute;
	display: none;
}
.check input:checked ~ .checkmark:after {
  	display: block;
}
.check .checkmark:after {
	left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}	
