/*
Theme Name:		muellerprocessing
Theme URI:		https://www.wcd.ch
Author:			weiss communication+design ag
Author URI:		https://www.wcd.ch/agentur/
Version:		5.2
Description:	Custom theme developed for muellerprocessing
License:		GNU General Public License v2.0 & Apache License 2.0
License URI:	http://www.gnu.org/licenses/gpl-2.0.html http://www.apache.org/licenses/LICENSE-2.0
Text Domain:	muellerprocessing
*/

html:not(:has(body.page-template-wp-custom-template-modal-no-header-no-footer)),
body:not(.page-template-wp-custom-template-modal-no-header-no-footer){
	overscroll-behavior: none;
}
body{
	overflow-y: scroll;
}
p:empty{
	display: none;
}

.wp-site-blocks{
	overflow-x: clip;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

#content{
	flex-grow: 1;
}

body{
	padding-top: 104px;

	@media (max-width: 991px){
		padding-top: 96px;
	}

	@media (max-width: 767px){
		padding-top: 67px;
	}
}

header.wp-block-template-part{
	position: fixed;
	z-index: 1020;
	top: 0;
	left: 0;
	width: calc( 100% - var( --modalScrollbar, var( --f-scrollbar-compensate, 0px ) ) );
	background: #fff;
	transition: transform .3s ease, background-color .3s ease .35s, box-shadow .3s ease .35s;
	will-change: transform;

	&::before{
		content: '';
		position: absolute;
		z-index: -1;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: linear-gradient(180deg,rgba(0,0,0,.3) 0,rgba(0,0,0,.2) 37%,transparent 100%);
		opacity: 0;
		transition: opacity .3s ease;
	}

	.custom-logo,
	.mobile-logo{
		transition: all .3s ease;
		transition-property: width, height;
	}
}

.scrolled header.wp-block-template-part{
	box-shadow: 0 4px 7.3px 0 rgba(0,0,0,.25);
}
.scrolled:not(.scrolling-up):not(.menu-open) header.wp-block-template-part{
	transform: translateY(-101%);
}

body:has( .entry-content > .wp-block-cover:first-child ){
	padding-top: 0;

	&:not(.scrolled) header.wp-block-template-part{
		background-color: transparent;
		transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease;

		&::before{
			opacity: 1;
		}

		.custom-logo-link{
			filter: brightness(0) invert(1);

			.custom-logo{
				width: 246px;
			}
			.mobile-logo{
				width: 76px;
			}
		}

		button.navbar-toggler{
			--navbar-toggler-button-line-color: #fff;
		}

		.searchcollapse:not(.opened) button:not(:hover){
			color: #fff;
		}

		&:has(.searchcollapse.opened){
			@media (max-width: 767px){
				background-color: var(--wp--preset--color--braun);
			}
		}
	}
}

/* .modal{
	--bs-modal-width: 600px;
	--bs-modal-margin: 60px;
	--bs-modal-padding: 32px;
	--bs-modal-border-width: 0;
	--bs-modal-border-radius: 0;
	--bs-modal-box-shadow: none;
	--bs-modal-inner-border-radius: 0;
}
.modal-backdrop{
	--bs-backdrop-opacity: .8;
}
button.btn-close{
	position: absolute;
	z-index: 10;
	top: 20px;
	right: 20px;
	opacity: 1;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font-size: 0;

	&::before{
		content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28"><path stroke="black" stroke-linecap="round" stroke-width="2" d="m1 1 25.4558 25.4558M1 26.4561 26.4558 1.00021"/></svg>');
	}
} */