/*
Theme Name: Memira
Author: Johan Hermansson @ Sumway AB
Author URI: https://sumway.se
Version: 5ec24d2
Text Domain: memira
*/

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child,
p:first-child {
	margin-block-start: 0;
}

h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child,
p:last-child {
	margin-block-end: 0;
}

/* Remove block spacing of root blocks */
:root :where(.wp-site-blocks > *),
:root :where(.wp-site-blocks .wp-block-post-content.is-layout-flow > *),
:root :where(.wp-site-blocks .wp-block-post-content-is-layout-flow > *),
:root :where(.wp-site-blocks .wp-block-post-content.is-layout-constrained > *),
:root :where(.wp-site-blocks .wp-block-post-content-is-layout-constrained > *) {
	margin-block-start: 0;
	margin-block-end: 0;
}

:root :where(.is-layout-flow > h1.wp-block-heading),
:root :where(.is-layout-flow > h2.wp-block-heading),
:root :where(.is-layout-constrained > h1.wp-block-heading),
:root :where(.is-layout-constrained > h2.wp-block-heading) {
	margin-top: calc(var(--wp--preset--spacing--small) * 2);
}

:root :where(.is-layout-flow > h3.wp-block-heading),
:root :where(.is-layout-flow > h4.wp-block-heading),
:root :where(.is-layout-flow > h5.wp-block-heading),
:root :where(.is-layout-flow > h6.wp-block-heading),
:root :where(.is-layout-constrained > h3.wp-block-heading),
:root :where(.is-layout-constrained > h4.wp-block-heading),
:root :where(.is-layout-constrained > h5.wp-block-heading),
:root :where(.is-layout-constrained > h6.wp-block-heading) {
	margin-top: calc(var(--wp--preset--spacing--small) * 1.25);
}

:root :where(.is-layout-flow > .wp-block-heading + p),
:root :where(.is-layout-flow > .wp-block-heading + .wp-block-list),
:root :where(.is-layout-constrained > .wp-block-heading + p),
:root :where(.is-layout-constrained > .wp-block-heading + .wp-block-list) {
	margin-top: calc(var(--wp--preset--spacing--small) * 0.5);
}

/* Force spacing on root groups to support old content */
:root :where(.is-root-container > .wp-block-group.is-layout-constrained),
:root :where(.wp-site-blocks > .wp-block-group.is-layout-constrained),
:root :where(.wp-site-blocks .wp-block-post-content > .wp-block-group.is-layout-constrained) {
	margin: 0;
	padding: var(--wp--preset--spacing--large) var(--wp--preset--spacing--small);
}

ul.wp-block-list {
	list-style: disc;
}

ol.wp-block-list {
	list-style: decimal;
}

.wp-block-buttons .wp-block-button {
	flex: 0 0 auto;
}

:root :where(.wp-block-button__link),
:root :where(.wp-element-button) {
	position: relative;
	display: inline-block;
}

:root :where(.is-style-arrow > .wp-element-button) {
	display: inline-flex;
}

:root :where(:not([class*="is-style-section"]) .is-style-section-blue .is-style-outline > .wp-element-button),
:root :where(:not([class*="is-style-section"]) .is-style-section-blue .is-style-outline.wp-element-button),
:root :where(:not([class*="is-style-section"]) .is-style-section-green .is-style-outline > .wp-element-button),
:root :where(:not([class*="is-style-section"]) .is-style-section-green .is-style-outline.wp-element-button) {
	border-color: currentColor;
	background-color: transparent;
	color: var(--wp--preset--color-white);
}

:root :where(.is-style-section-beige .is-style-outline > .wp-element-button),
:root :where(.is-style-section-beige .is-style-outline.wp-element-button),
:root :where(.is-style-section-white .is-style-outline > .wp-element-button),
:root :where(.is-style-section-white .is-style-outline.wp-element-button),
:root :where(.is-style-section-grey .is-style-outline > .wp-element-button),
:root :where(.is-style-section-grey .is-style-outline.wp-element-button) {
	border-color: var(--wp--custom--color--primary-700);
	color: var(--wp--custom--color--primary-700);
	background-color: transparent;
}


.wp-block-button__link.btn-without-arrow,
.wp-element-button.btn-without-arrow {
	padding-right: 1em;
}

.wp-block-button__link.btn-without-arrow::after,
.wp-element-button.btn-without-arrow::after {
	content: none !important;
}

.wp-block-button__link:disabled,
.wp-element-button:disabled,
.wp-block-button__link.is-disabled,
.wp-element-button.is-disabled {
	--wp--custom--mem--btn-arr-color: var(--wp--preset--color--white);

	background-color: var(--wp--preset--color--grey-400) !important;
	cursor: not-allowed;
}

.wp-block-button__link:disabled:hover::after,
.wp-element-button:disabled:hover::after,
.wp-block-button__link.is-disabled:hover::after,
.wp-element-button.is-disabled:hover::after {
	transform: translateX(0%) translateY(-45%) rotate(45deg);
}

/* Outline button */
:root :where(.wp-element-button.is-style-outline) {
	padding: 0.5em 1em;
	border-color: var(--wp--custom--color--primary-700);
	background-color: transparent;
	color: var(--wp--custom--color--primary-700);
}

:root :where(.wp-element-button.is-style-outline::after) {
	content: none;
}

/* Text button */
:root :where(.wp-element-button.is-style-text) {
	padding: 0;
	border: 0;
	background-color: transparent;
	border-radius: 0;
	color: inherit;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 0.1em;
	text-decoration-thickness: 1px;
}

:root :where(.wp-element-button.is-style-text:hover) {
	text-decoration-thickness: 2px;
}

/* Arrow button */
:root :where(.wp-element-button.is-style-arrow) {
	position: relative;
	display: inline-flex;
	gap: 0.5em;
	background-color: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	color: var(--mem-button-text-color, var(--wp--preset--color--black));
	-webkit-transition: color 0.2s ease-in-out;
	transition: color 0.2s ease-in-out;
	font-weight: 400;
	text-decoration: none;
	overflow: visible;
}

:root :where(.wp-element-button.is-style-arrow)::after {
	content: none;
}

:root :where(.wp-element-button.is-style-arrow .wp-element-button-text) {
	padding-top: 0.075em;
	padding-bottom: 0.075em;
	text-decoration: underline;
	text-underline-offset: 0.1em;
	text-decoration-thickness: 1px;
}

:root :where(.wp-element-button.is-style-arrow:hover .wp-element-button-text) {
	text-decoration-thickness: 2px;
}

:root :where(.wp-element-button.is-style-arrow .wp-element-button-icon) {
	flex-shrink: 0;
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	margin-left: auto;
	overflow: visible;

	--mem-icon-bg: var(--mem-button-bg-color, var(--wp--preset--color--black));
	--mem-icon-accent: var(--mem-button-text-color, var(--wp--preset--color--white));

	-webkit-transition: -webkit-transform 0.2s;
	transition: transform 0.2s;
}

:root :where(.wp-element-button.is-style-arrow:hover .wp-element-button-icon) {
	-webkit-transform: scale(1.1);
	transform: scale(1.1);
}

:root :where(:not([class*="is-style-section"]) .is-style-section-blue .is-style-arrow .wp-element-button-icon),
:root :where(:not([class*="is-style-section"]) .is-style-section-blue .is-style-arrow .wp-element-button-icon),
:root :where(:not([class*="is-style-section"]) .is-style-section-green .is-style-arrow > .wp-element-button-icon),
:root :where(:not([class*="is-style-section"]) .is-style-section-green .is-style-arrow .wp-element-button-icon) {
	--mem-button-bg-color: var(--wp--preset--color--white);
	--mem-button-text-color: var(--wp--preset--color--black);
}

:root :where(.is-style-section-grey .is-style-arrow .wp-element-button-icon),
:root :where(.is-style-section-grey .is-style-arrow .wp-element-button-icon),
:root :where(.is-style-section-white .is-style-arrow > .wp-element-button-icon),
:root :where(.is-style-section-white .is-style-arrow .wp-element-button-icon),
:root :where(.is-style-section-beige .is-style-arrow > .wp-element-button-icon),
:root :where(.is-style-section-beige .is-style-arrow .wp-element-button-icon) {
	--mem-button-bg-color: var(--wp--preset--color--black);
	--mem-button-text-color: var(--wp--preset--color--white);
}

.wp-element-button.is-style-outline::after,
.wp-element-button.is-style-text::after,
.wp-element-button.is-style-arrow::after,
.theme-invert .wp-element-button:not(.is-style-arrow):not(.is-style-text):not(.is-style-outline)::after {
	content: none;
}

.theme-invert .wp-element-button:not(.is-style-arrow):not(.is-style-text):not(.is-style-outline) {
	padding-right: 1em;
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--white);
}

.theme-invert .wp-element-button.is-disabled:not(.is-style-arrow):not(.is-style-text):not(.is-style-outline) {
	border-color: var(--wp--preset--color--grey-400) !important;
	background-color: var(--wp--preset--color--grey-400) !important;
	color: var(--wp--preset--color--grey-100) !important;
}

.wp-element-button .button__icon {
	fill: currentColor;
	width: 1em;
	height: 1em;
	transform: translateY(-10%);
}

.wp-element-button .button__icon:first-child {
	margin-right: 0.25em;
}

.wp-element-button .button__icon:last-child {
	margin-left: 0.25em;
}

.mega-menu__cta {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mega-menu__cta-bar .mega-menu__cta {
	font-size: 18px;
}

.mega-menu__cta .mega-menu__cta-icon {
	width: 16px;
	height: 16px;
}

.has-inherit-font-size {
	font-size: inherit !important;
}

:where(.wp-block-post-featured-image[style*='aspect-ratio'] > a),
:where(.wp-block-post-featured-image[style*='aspect-ratio'] > a > img),
:where(.wp-block-post-featured-image[style*='aspect-ratio'] > img) {
	aspect-ratio: inherit;
}

:root :where(.wp-embed-responsive .wp-has-aspect-ratio .video-placeholder-youtube),
:root :where(.wp-embed-responsive .wp-has-aspect-ratio .video-placeholder-vimeo) {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
}

.yoast-breadcrumbs a:link,
.yoast-breadcrumbs a:visited {
	color: inherit;
}

.yoast-breadcrumbs {
	line-height: var(--wp--custom--typography--line-height--headings, 1.1);
}

.yoast-breadcrumbs > span {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em;
}

.yoast-breadcrumbs span span {
	text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-block;
}

#wpadminbar li#wp-admin-bar-comments { display: none !important; }
