/************************************************************/
/*
/*      Site content CSS
/*
/************************************************************/
.wp-site-blocks > main {
	flex-grow: 2;
	position: relative;
	
    & > .wp-block-post-content {
        padding-inline: max(calc((var(--wp--custom--viewport-width) - min(var(--wp--custom--viewport-width), 120rem)) / 2), var(--wp--custom--outer-pad));

        & > * {
            box-sizing: border-box;
        }
    }
}

/************************************************************/
/* Templates
/************************************************************/
/******************************/
/* Singles
/******************************/
body[class*="single-cke_"] .wp-site-blocks > main > .wp-block-post-content > * + * {
	margin-block-start: 2em;
}

/******************************/
/* 404 error
/******************************/
body.error404 .wp-site-blocks > main {
	display: flex;
	justify-content: center;
	align-items: center;
}

/************************************************************/
/* Shortcode elements
/************************************************************/
/* Coordinates & Opening hours */
.coordinates,
.opening-hours {
	display: flex;
	flex-direction: column;
	
	/* Margins */
	div, p {
		margin-block: unset;
		
		& + div {
			margin-block-start: var(--wp--preset--spacing--2);
		}
	}
	
	/* Text style */
	p {
        /* Necessary since WP added CSS code that breaks <p> font-size. Thanks WP! */
        &:is(p):is(p) {
            /* Add theme-specific styles here */

            a {
                display: inline-block;
                font-family: inherit;
                font-size: inherit;
                line-height: inherit;
                font-weight: inherit;
                letter-spacing: inherit;
                text-decoration: none;
                
                &:not(:hover, :focus, :active) {
                    color: inherit !important;
                }
                
                &:is(:hover, :focus, :active) {
                    color: var(--wp--custom--color--default--focus);
                }
            }
        }
	}

    /* Opening hours specific style */
    &.opening-hours {
        & > p {
            display: flex;
            justify-content: space-between;
            gap: var(--wp--preset--spacing--1);
            margin-block: 0;
            
            & > span.days {
                font-weight: 700;
            }
        }
    }
}

/************************************************************/
/* Plugin style overrides
/************************************************************/
/* GDPR Cookie Consent banner/modal/button */
:is(#moove_gdpr_cookie_info_bar, #moove_gdpr_cookie_modal, #moove_gdpr_save_popup_settings_button) {
	z-index: 4 !important;
	
	.mgbutton,
	.moove_gdpr_text,
	.moove-gdpr-cookie-notice > p {
		color: var(--wp--preset--color--white) !important;
	}
	
	&:is(#moove_gdpr_cookie_info_bar, #moove_gdpr_cookie_modal) {
		* {
			-webkit-font-smoothing: auto !important;
			letter-spacing: 1px !important;
		}	
	}
	
	&#moove_gdpr_cookie_info_bar {	
		background-color: var(--wp--preset--color--off-black) !important;
		border: 1px solid var(--wp--preset--color--white) !important;
		
		:is(.moove-gdpr-infobar-allow-all, .moove-gdpr-infobar-reject-btn) {
			color: var(--wp--preset--color--off-black) !important;
			background-color: var(--wp--preset--color--white) !important;
			box-shadow: inset 0 0 0 1px currentColor !important;
			
			&:is(:hover, :focus, :active) {
				color: var(--wp--preset--color--white) !important;
				background-color: var(--wp--preset--color--off-black) !important;
			}
		}
		
		.moove-gdpr-infobar-settings-btn {
			color: var(--wp--preset--color--white) !important;
			background-color: transparent !important;
			
			&:is(:hover, :focus, :active) {
				color: var(--wp--preset--color--off-black) !important;
				background-color: var(--wp--preset--color--white) !important;
			}
		}
	}
	
	&#moove_gdpr_cookie_modal {
		.moove-gdpr-company-logo-holder img {
            min-width: 100px;
            min-height: 50px;
			object-fit: contain;
			filter: var(--wp--custom--color--off-black--filter);
		}
		
		#moove-gdpr-menu li,
		.cookie-switch {
			&::before,
			&::after {
				display: none;
			}
		}
		
		:is(.mgbutton, .moove-gdpr-modal-close):is(:hover, :focus, :active) {
			&, & > span {
				color: var(--wp--preset--color--off-black) !important;
				background-color: var(--wp--preset--color--white) !important;
				box-shadow: unset !important;
			}
		}
	}
	
	&#moove_gdpr_save_popup_settings_button {
		bottom: var(--wp--preset--spacing--1) !important;
		left: var(--wp--preset--spacing--1) !important;
		background-color: var(--wp--preset--color--off-black) !important;
		border: 1px solid  var(--wp--preset--color--white) !important;
		box-sizing: content-box;
		cursor: pointer;
		
		span.moove_gdpr_icon {
			position: relative;
			
			&::after {
				content: '';
				position: absolute;
				top: 50%;
				left: 50%;
				width: calc(100% *  (2/3));
				height: calc(100% *  (2/3));
				background: url(../images/privacy.svg) no-repeat center;
				background-size: contain;
				filter: var(--wp--custom--color--white--filter);
				translate: -50% -50%;
			}
			
			svg {
				display: none;
			}
		}
	}
	
	/******************************/
	/* Responsive
	/******************************/
	@media (width <= 600px) {
		&#moove_gdpr_save_popup_settings_button {
			bottom: var(--wp--preset--spacing--0-50) !important;
			left: var(--wp--preset--spacing--0-50) !important;
			
			&, & > .moove_gdpr_icon {
				min-width: 32px !important;
				height: 32px !important;
			}
		}
	}
}