/*
 * Shared page shell and sidebar widget layout.
 *
 * The sidebar supports both the classic widget_search markup and the core
 * wp-block-search structure. :has() scopes spacing to block widgets that
 * actually
 * contain a search control without adding presentation classes to WordPress
 * markup.
 */

/*
 * Maintain a useful content height on short templates without styling editor
 * content classes.
 */
.scouting-nederland-layout-shell {
	min-height: 300px;
}

.scouting-nederland-layout-motion-reveal {
	animation: scouting-nederland-layout-motion-reveal 1.2s ease-out;
}

.scouting-nederland-layout-motion-reveal:focus-within {
	animation: none;
}

@keyframes scouting-nederland-layout-motion-reveal {

	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/*
 * Cross-template showcase skyline.
 *
 * The empty layout-owned element reserves a positioning context; its
 * pseudo-element
 * carries the decorative bitmap above widget content without changing document
 * flow.
 */
.scouting-nederland-layout-showcase-skyline {
	position: relative;
	margin-top: 150px;
	transform: translateY(20px);
}

.scouting-nederland-layout-showcase-skyline::before {
	content: "";
	position: absolute;
	top: -89px;
	left: 0;
	display: block;
	width: 100%;
	height: 90px;
	background-color: #fff;
	background-image: url(../images/skyline-groen.png);
	background-position: 0 100%;
	background-repeat: repeat-x;
	background-size: auto 91px;
	animation: scouting-nederland-layout-showcase-skyline 140s linear infinite;
	will-change: background-position-x;
}

@keyframes scouting-nederland-layout-showcase-skyline {

	from {
		background-position-x: 0;
	}

	to {
		background-position-x: 2000px;
	}
}

body.scouting-nederland-utilities-main-blue .scouting-nederland-layout-showcase-skyline::before {
	background-image: url(../images/skyline-blauw.png);
}

body.scouting-nederland-utilities-main-yellow .scouting-nederland-layout-showcase-skyline::before {
	background-image: url(../images/skyline-geel.png);
}

body.scouting-nederland-utilities-main-red .scouting-nederland-layout-showcase-skyline::before {
	background-image: url(../images/skyline-rood.png);
}

body.scouting-nederland-utilities-main-orange .scouting-nederland-layout-showcase-skyline::before {
	background-image: url(../images/skyline-oranje.png);
}

body.scouting-nederland-utilities-main-purple .scouting-nederland-layout-showcase-skyline::before {
	background-image: url(../images/skyline-paars.png);
}

@media (max-width: 900px) {

	.scouting-nederland-layout-showcase-skyline::before {
		animation-duration: 85s;
	}
}

@media (prefers-reduced-motion: reduce) {

	.scouting-nederland-layout-motion-reveal,
	.scouting-nederland-layout-showcase-skyline::before {
		animation: none;
	}
}

@media (min-width: 1025px) {

	.container,
	.container-sm,
	.container-md,
	.container-lg,
	.container-xl,
	.container-xxl {
		max-width: var(--scouting-nederland-page-width) !important;
	}
}

.scouting-nederland-layout-sidebar .widget_search,
.scouting-nederland-layout-sidebar .widget_block:has(.wp-block-search) {
	margin-bottom: 1.75rem;
}

.scouting-nederland-layout-sidebar .widget_search,
.scouting-nederland-layout-sidebar .widget_search .wp-block-search,
.scouting-nederland-layout-sidebar .widget_block .wp-block-search {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.scouting-nederland-layout-sidebar .wp-block-search__label,
.scouting-nederland-layout-sidebar .widget_search h2,
.scouting-nederland-layout-sidebar .widget_search .widget-title {
	display: block;
	margin: 0 0 16px;
	color: var(--scouting-nederland-main-color, var(--wp--preset--color--scouting-groen)) !important;
	font-family: "Roboto Slab", Georgia, serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.scouting-nederland-layout-sidebar .wp-block-search__inside-wrapper,
.scouting-nederland-layout-sidebar .widget_search .search-form {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.scouting-nederland-layout-sidebar .widget_search label {
	display: block;
	margin: 0 0 12px;
}

.scouting-nederland-layout-sidebar .widget_search .screen-reader-text,
.scouting-nederland-layout-sidebar .wp-block-search__label .screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	overflow-wrap: normal !important;
}

.scouting-nederland-layout-sidebar .wp-block-search__input,
.scouting-nederland-layout-sidebar .widget_search .search-field {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0 0 14px;
	padding: 0 16px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 16px;
	background: #fff;
	color: #222;
	font-size: 1rem;
	line-height: 50px;
	outline: 0;
	box-shadow: none;
}

.scouting-nederland-layout-sidebar .wp-block-search__input::placeholder,
.scouting-nederland-layout-sidebar .widget_search .search-field::placeholder {
	color: #8e8e8e;
}

.scouting-nederland-layout-sidebar .wp-block-search__input:focus,
.scouting-nederland-layout-sidebar .widget_search .search-field:focus {
	border-color: var(--scouting-nederland-support-color, var(--wp--preset--color--scouting-blauw));
	box-shadow: 0 0 0 3px rgb(from var(--wp--preset--color--scouting-blauw) r g b / 0.12);
}

.scouting-nederland-layout-sidebar .wp-block-search__button,
.scouting-nederland-layout-sidebar .widget_search .search-submit {
	display: inline-flex;
	width: 100%;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 16px;
	background: var(--scouting-nederland-main-color, var(--wp--preset--color--scouting-groen));
	color: #fff !important;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 48px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: none;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.scouting-nederland-layout-sidebar .wp-block-search__button:hover,
.scouting-nederland-layout-sidebar .wp-block-search__button:focus,
.scouting-nederland-layout-sidebar .widget_search .search-submit:hover,
.scouting-nederland-layout-sidebar .widget_search .search-submit:focus {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/*
 * Gutenberg block alignment: a block can opt into wide or edge-to-edge
 * presentation through its standard Alignment control. Keep this scoped to
 * post/page content so widgets, navigation and hero components are unaffected.
 */
.scouting-nederland-homepage-content > .alignfull,
.scouting-nederland-fullwidth-content .entry-content > .alignfull {
	position: relative;
	left: 50%;
	width: 100vw;
	max-width: none;
	margin-left: -50vw;
	margin-right: 0;
}

.scouting-nederland-homepage-content > .alignwide,
.scouting-nederland-fullwidth-content .entry-content > .alignwide {
	position: relative;
	left: 50%;
	width: min(var(--wp--style--global--wide-size, 1320px), 100vw - 2rem);
	max-width: none;
	margin-left: 0;
	transform: translateX(-50%);
}

/* A sidebar occupies its own Bootstrap column, so don't cover that column. */
.scouting-nederland-sidebar-content .entry-content > .alignfull,
.scouting-nederland-sidebar-content .entry-content > .alignwide {
	width: 100%;
	max-width: 100%;
}

/* The image itself must fill an intentionally edge-to-edge image block. */
.scouting-nederland-homepage-content > .wp-block-image.alignfull img,
.scouting-nederland-fullwidth-content .entry-content > .wp-block-image.alignfull img {
	width: 100%;
}
