/*
Theme Name: Memira
Author: Johan Hermansson @ Sumway AB
Author URI: https://sumway.se
Version: 6.9.46
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 > *) {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* 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;
}

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

.wp-block-button__link::after,
.wp-element-button::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 1em;
	width: 0.4em;
	height: 0.4em;
	margin-left: 0.2em;
	border-top: clamp(0.2rem, 0.1em, 0.4rem) solid var(--mem-btn-arr-color);
	border-right: clamp(0.2rem, 0.1em, 0.4rem) solid var(--mem-btn-arr-color);
	border-top-width: 0.15em;
	border-right-width: 0.15em;
	vertical-align: middle;
	transform: translateX(0%) translateY(-45%) rotate(45deg);
	transition: transform 0.2s;
}

.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:hover::after,
.wp-element-button:hover::after {
	transform: translateX(50%) translateY(-45%) rotate(45deg);
}

.wp-block-button__link:disabled,
.wp-element-button:disabled,
.wp-block-button__link.is-disabled,
.wp-element-button.is-disabled {
	background-color: var(--wp--preset--color--grey-400) !important;
	cursor: not-allowed;

	--mem-btn-arr-color: var(--wp--preset--color--white);
}

.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);
}

.is-style-outline > .wp-block-button__link,
.wp-element-button.is-style-outline {
	padding-right: 1em;
	background-color: var(--wp--preset--color--white) !important;
	border-color: var(--mem-primary-600) !important;
	color: var(--mem-primary-600) !important;
	box-shadow: none;
}

.is-style-outline > .wp-block-button__link:disabled,
.wp-element-button.is-style-outline:disabled,
.is-style-outline > .wp-block-button__link.is-disabled,
.wp-element-button.is-style-outline.is-disabled {
	border-color: var(--wp--preset--color--grey-400) !important;
	color: var(--wp--preset--color--grey-400) !important;
}

/* Black button */
.is-style-black > .wp-block-button__link,
.wp-element-button.is-style-black {
	padding-right: 1em;
	background-color: var(--wp--preset--color--black) !important;
	border-color: var(--wp--preset--color--black) !important;
	color: var(--wp--preset--color--white) !important;

	--mem-btn-arr-color: currentColor;
}

.is-style-black > .wp-block-button__link:disabled,
.wp-element-button.is-style-black:disabled,
.is-style-black > .wp-block-button__link.is-disabled,
.wp-element-button.is-style-black.is-disabled {
	border-color: var(--wp--preset--color--grey-400) !important;
	background-color: var(--wp--preset--color--grey-400) !important;
	color: var(--wp--preset--color--grey-200) !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;
}

.wp-block-buttons > .wp-block-button.has-custom-font-size .wp-block-button__link {
	font-size: inherit !important;
}

.wp-element-button.is-style-text,
.is-style-text .wp-element-button,
.wp-element-button.is-style-text:hover,
.is-style-text .wp-element-button:hover,
.wp-element-button.is-style-text:active,
.is-style-text .wp-element-button:active {
	background-color: transparent;
	padding: 0;
	border: 0;
	color: var(--mem-primary-600);
	box-shadow: none;
	border-radius: 0;
	font-weight: normal;
	text-decoration: underline;
	font-size: inherit;
}

.wp-element-button.is-style-outline::after,
.is-style-outline .wp-element-button::after,
.wp-element-button.is-style-text::after,
.is-style-text .wp-element-button::after {
	content: none;
}

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

.font-size-normal {
	font-size: var(--wp--preset--font-size--small);
}

.font-size-normal h1,
.font-size-normal h2 {
	font-size: var(--wp--preset--font-size--large);
}

.font-size-normal h3,
.font-size-normal h4,
.font-size-normal h5,
.font-size-normal h6 {
	font-size: var(--wp--preset--font-size--medium);
}

.h-0 {
	height: 0;
}
