/* Always-visible search field in the masthead */

.site-search {
	font-family: inherit;
	display: flex;
	align-items: center;
	flex: 0 1 auto;

	border-radius: 300px;
	overflow: hidden;
	border: 2px solid var(--erasmus_blue);
	line-height: 1;
	box-sizing: border-box;height: calc(2em + 4px);font-size: 18px;
}

.site-search__field {
	font-size: inherit; font-weight: 600;
	font-family: inherit;
	color: var(--erasmus_blue);
	width: 12rem;
	min-width: 0;
	padding: 0.5em 0.5em 0.5em 1em;
	line-height: 1;
 	outline: none; border: none;
	 box-sizing: border-box;
}

.site-search__field:focus {

}

.site-search__submit {
	display: flex;
	align-items: center;
	justify-content: center;
 	height: 36px; width: 36px; padding-right: 2px;
	background: var(--erasmus_blue);
	color: white;

	cursor: pointer;
	line-height: 1;
}

.site-search:has(.site-search__field:focus-visible) {
	outline: 2px solid var(--erasmus_blue);
	outline-offset: 2px;
}

.site-search__field::placeholder {
	color: var(--erasmus_blue);

}


.showsearch::before ,
.site-search__submit::before {
	font-size: 18px;
	font-family: 'icons';
	line-height: 1;
	text-align: center;
	text-indent: 0;
	content: "\e91a";
}
.site-search__submit:focus-visible {
	background: var(--erasmus_red)
}



.site-search:has(.site-search__field:focus-visible),
.site-search:has(.site-search__submit:focus-visible) {
	outline: 2px solid var(--erasmus_blue);
	outline-offset: 2px;
}

@media screen and (max-width: 700px) {
	.site-search {
		margin: 0 0.5rem;
	}

	.site-search__field {
		width: 7rem;
	}
}

#showsearch { display: none}
#closesearch { display: none}
@media screen and (max-width: 850px) {
	div#search {
		position: fixed;        box-sizing: border-box;
		z-index: 2000;
		padding: var(--masthead-padding);
		bottom: 100%;
		left: 0;
		width: 100%;
		background: color-mix(in srgb, var(--erasmus_blue) 80%, black);
		display: flex;
		align-items: center;
		transition: transform 0.2s ease;
		opacity: 0;
		pointer-events: none;
	}
	div#search::before {
		content: '';
		position: fixed;
		background: color-mix(in srgb, var(--erasmus_blue) 60%, black);
		opacity: 0.4;
		width: 100%; height: 100vh; top: 0; left: 0;
	}
	div#search form {
		position: relative;
		background: white;
		flex: 1; border-color: white;
	}

	form#searchform input.site-search__field {
		width: auto;
		flex: 1;
		max-width: 100%;
	}

	/*    div#search form input {
            font-size: 12px;
        }*/
	div#search { /*transform: translateY(-100%);*/
	}

	#closesearch,
	#showsearch {
		display: block;
		cursor: pointer;
		position: relative;
	}


	div#search {
		visibility: hidden;

	}
	body.search-open div#search {
		transform: translateY(100%);
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}

	#closesearch {
		border: none;
		outline:none; background: none;
		height: 30px;
		margin-left: 18px;
		width: 30px;
		text-indent: -900px;
		overflow: hidden;
		position: relative;
	}

	#closesearch::after,
	#closesearch::before {
		content: "";
		display: block;
		width: 100%;
		height: 1px;
		position: absolute;
		top: 50%;
		left: 50%;
		background: white;
	}

	#closesearch::after {
		transform: translate(-50%, -50%) rotate(-45deg);
	}

	#closesearch::before {
		transform: translate(-50%, -50%) rotate(45deg);
	}

	#closesearch:focus {

	}
	#closesearch:focus::before ,
	#closesearch:focus::after {
		background: #FFFFFF; height: 2px;
	}
}