/*
Theme Name:  Marco Houtschild
Description: Child theme of Twenty Twenty-One for marcohoutschild.nl
Template:    twentytwentyone
Version:     1.1.1
Text Domain: marcohoutschild
*/

/* ~~ GLOBAL ~~ */

@media only screen and (min-width: 480px) {
	:root {
		--responsive--aligndefault-width: min(80vw, 1920px);
	}
}

/* Page titles: hidden visually, but kept for screen readers and search engines */
.entry-header {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Empty block groups (e.g. the unused "mobile-reader" group on the front page) */
.wp-block-group:has(> .wp-block-group__inner-container:empty) {
	display: none;
}

/* Hidden badge requires the notice that functions.php adds below contact forms */
.grecaptcha-badge {
	visibility: hidden;
}

.recaptcha-notice {
	font-size: var(--global--font-size-xs);
}


/* ~~ FRONT PAGE ~~ */
/* Header + flipbook stage fill exactly the first screen; the footer follows below it.
   .mh-screen is opened in header.php and closed in footer.php; the stage is in front-page.php. */

.mh-screen {
	display: flex;
	flex-direction: column;
	height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.home .site-content,
.home .content-area,
.home .site-main {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	padding: 0;
	margin: 0;
}

.home .site-header {
	justify-content: center;
	text-align: center;
	padding-bottom: var(--global--spacing-unit);
}

@media only screen and (min-width: 480px) {
	.home .site-title {
		font-size: 38px;
	}

	.home .site-description {
		font-size: 30px;
	}
}

.mh-stage {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	width: var(--responsive--aligndefault-width);
	margin: 0 auto;
}

.mh-stage > *,
.mh-stage .wp-block-group__inner-container {
	flex: 1;
	min-height: 0;
	height: 100%;
	max-width: none;
	margin: 0;
}

/* Real3D sets a fixed pixel height on its container at load; make it follow the stage instead */
.mh-stage [class^="real3dflipbook-"] {
	height: 100% !important;
}


/* ~~ FOOTER ~~ */

.site-footer {
	margin-top: 0 !important;
}

.home .footer-navigation {
	margin-top: 0;
}

.footer-navigation-wrapper {
	font-size: 20px !important;
	text-transform: uppercase;
	font-family: var(--branding--title--font-family) !important;
	border-top: 3px solid var(--branding--color-link);
	padding-top: 10px;
}


/* ~~ FLIPBOOK (Real3D Flipbook 5.x) ~~ */
/* !important is needed throughout: the plugin sets most of these as inline styles. */

.flipbook-main-wrapper {
	background-color: transparent !important;
}

/* Page number and search fields */
.flipbook-currentPageHolder,
.toolbarField {
	color: var(--button--color-background-active);
	border: 2px solid var(--button--color-text-active);
	background-color: transparent !important;
	border-radius: 0;
	overflow: hidden;
}

.flipbook-currentPageInput,
.flipbook-currentPageNumber,
.toolbarField,
.toolbarField::placeholder {
	font-family: var(--branding--description--font-family) !important;
	color: var(--branding--color-link) !important;
	opacity: 1;
}

.flipbook-currentPageNumber,
.toolbarField,
.toolbarField::placeholder,
.flipbook-currentPageInput:focus {
	font-size: var(--branding--description--font-size) !important;
}

.flipbook-currentPageInput:focus,
.toolbarField:focus {
	outline: none !important;
}

/* Table of contents / thumbnails panel */
.flipbook-side-menu {
	left: 0;
	bottom: 41.6667px;
	background-color: transparent !important;
	backdrop-filter: blur(20px);
	border-radius: 12px;
	overflow: hidden;
}

@media only screen and (min-width: 480px) {
	.flipbook-fullscreen [class^="real3dflipbook-"] {
		background-color: var(--global--color-background) !important;
	}

	.flipbook-side-menu {
		margin-left: -5px;
	}

	/* Menu bar and page arrows only appear while hovering the book */
	.flipbook-main-wrapper .flipbook-menu-fixed,
	.flipbook-main-wrapper .flipbook-nav > span {
		opacity: 0;
		transition: opacity 0.5s;
	}

	.flipbook-main-wrapper:hover .flipbook-menu-fixed,
	.flipbook-main-wrapper:hover .flipbook-nav > span {
		opacity: 1;
	}

	/* Buttons are a span wrapper around svg.flipbook-icon (in 3.x the svg itself was the button) */
	.flipbook-nav > span,
	.flipbook-menu-btn-wrapper {
		color: var(--branding--color-link) !important;
		border: 2px solid var(--button--color-text-active);
		background: transparent !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	/* Page arrows: square, flush to the edge of the book */
	.flipbook-nav > span {
		width: 30px !important;
		height: 30px !important;
		padding: 5px !important;
		font-size: 30px !important;
		margin: -15px 0 0 !important;
		filter: none !important;
	}

	.flipbook-menu-btn-wrapper {
		padding: 12px !important;
	}

	.flipbook-icon {
		fill: var(--branding--color-link) !important;
	}
}


/* ~~ BUNDELS GRID ~~ */

.wp-block-image a:hover img {
	opacity: 0.7;
}

.bundels-grid .wp-element-caption {
	display: none;
}
