/* Shared frontend/editor content styles. Typography presets are in theme.json. */
:where(h1, h2, h3, h4, h5, h6) {
	overflow-wrap: anywhere;
	hyphens: manual;
	text-wrap: pretty;
}

:where(p, ul, ol, blockquote, figure, pre, table) {
	margin-block: 0 var(--wp--preset--spacing--16);
}

:where(h1, h2, h3, h4, h5, h6) {
	margin-block: var(--wp--preset--spacing--24) var(--vr-heading-gap);
}

:where(a) {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

:where(a:hover) {
	text-decoration-thickness: 2px;
}

:where(pre) {
	max-inline-size: 100%;
	padding: var(--wp--preset--spacing--16);
	overflow-x: auto;
	background: var(--wp--preset--color--surface-subtle);
}

:where(blockquote) {
	margin-inline: 0;
	padding-inline-start: var(--wp--preset--spacing--24);
	border-inline-start: 3px solid var(--wp--preset--color--brand-medium);
}

:where(figcaption, .wp-caption-text) {
	margin-block-start: var(--wp--preset--spacing--8);
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.entry-content > :where(p, ul, ol, blockquote) {
	max-inline-size: min(var(--wp--custom--layout--prose), var(--wp--style--global--content-size));
}

.wp-block-image img,
.entry-image img {
	border-radius: var(--wp--custom--radius--card);
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: var(--wp--custom--control--height);
	text-align: center;
	white-space: normal;
	transition: background-color var(--vr-motion-duration) var(--wp--custom--motion--easing),
		color var(--vr-motion-duration) var(--wp--custom--motion--easing),
		border-color var(--vr-motion-duration) var(--wp--custom--motion--easing);
}

.wp-block-button.is-style-secondary .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--brand);
	background: transparent;
	color: var(--wp--preset--color--brand);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--brand);
}

.wp-block-button.is-style-secondary .wp-block-button__link:active {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--surface);
}

.alignleft {
	float: inline-start;
	margin-inline-end: var(--wp--preset--spacing--24);
}

.alignright {
	float: inline-end;
	margin-inline-start: var(--wp--preset--spacing--24);
}

.aligncenter {
	margin-inline: auto;
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}
