/*
Emenda CSS for Wordpress TwentyTwentyTwo
*/

/* Class to configure google icon fonts */
p.emenda-material-icons {
  width: 100%;
}

p.emenda-material-icons a {
  color: var(--wp--preset--color--background);
  text-decoration: none;
}

p.emenda-material-icons a:hover {
  color: var(--wp--preset--color--tertiary);
}

/* Configure class for adding padding and width limit to Wordpress groups */
div.emenda-group-style {
	padding-top: 50px;
	padding-bottom: 50px;
	/* Fix for WP 6.2 block gap */
	margin-block-start: 0rem !important;
}

div.emenda-group-style > * {
	max-width: 75%;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* As above but does not include top padding (for first group on page) */
div.emenda-group-style-first {
	padding-bottom: 50px;
}

div.emenda-group-style-first > * {
	max-width: 75%;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Home Page - Fix height of post widgets */
div.emenda-group-post-widget {
	height: 450px;
}

/* Post Feature Image - Resolve 100% width problem */
figure.emenda-feature-image-width-auto > img {
	width: auto !important;
}

figure.emenda-feature-image-width-auto > a > img {
	width: auto !important;
}

/* Sticky Header */
header.wp-block-template-part {
	position: -webkit-sticky; /* Safari */
	position: sticky;
	top: 0;
	z-index: 2;
}

/* Fix Wordpress 6.1 Row Not Working */
div.emenda-fix-row {
	flex-wrap: wrap;
	display: flex;
}

/* Fix Wordpress 6.1 image justification */
figure.wp-block-image {
	display: block !important;
}
/* Fix Wordpress 6.1 image caption (after above) */
.wp-block-image figcaption {
	display: block !important;
}

/* Fix footer not full width (WP 6.1) */
div.emenda-fix-full-width-footer {
	margin-left: calc(-1 * var(--wp--custom--spacing--outer)) !important;
	margin-right: calc(-1 * var(--wp--custom--spacing--outer)) !important;
}

/* Fix align items center (vertical) */
div.emenda-align-items-center {
	align-items: center !important;
}

/* Fix margin bottom zero (vertical) */
div.emenda-margin-bottom-zero {
	margin-bottom: 0px !important;
}
figure.emenda-margin-bottom-zero {
	margin-bottom: 0px;
}
figure.emenda-margin-zero {
	margin: 0px !important;
}

/* Fix for WP 6.2 cover gap */
div.wp-site-blocks > * + * {
    margin-block-start: 0rem !important;
}

/* Wordpress ~6.3.2 mobile menu changed to white text on white background */
/* Change text to foreground blue */
div[aria-modal="true"] > div > ul {
	color: var(--wp--preset--color--foreground) !important;
}
