/********************************************************/
/*
/*      Blocks CSS
/*
/********************************************************/
	.wp-block-post-content {
		/* Gutenberg style override */
		:root &:where(.is-layout-constrained) > * {
			margin-block-start: 0;
		}
		
		/* Full-width background support */
		& > .has-background:not(.alignfull) {
			position: relative;
			
			&::before {
				content: '';
				position: absolute;
				top: 0;
				left: calc((var(--wp--custom--viewport-width) - 100%) / 2 * -1);
				width: var(--wp--custom--viewport-width);
				height: 100%;
				background-color: inherit;
				z-index: -1;
			}
		}
		
		/* First block top margin adjustments (to compensate for sticky header) */
		& > :first-child {
			/* Move some blocks behind the header */
			&:is(.wp-block-cover) {
				margin-block-start: calc(var(--wp--custom--stickied-header-height) * -1) !important;
			}
			
			/* All other blocks are positioned after the header */
			& {
				margin-block-start: calc(var(--wp--custom--header-height) - var(--wp--custom--stickied-header-height)) !important;
			}
		}
		
		/* Block alignments */
		& > :not(.alignleft, .alignright, .alignwide, .alignfull):is(:not(.alignleft, .alignright, .alignwide, .alignfull)) {
			margin-left: 0 !important;
			margin-right: auto !important;
			
			body.wp-admin & {
				margin-left: var(--wp--custom--outer-pad) !important;
				
				&:has(> .components-placeholder) {
					margin-left: auto !important;
				}
			}
		}
	}
	
	/******************************/
	/* Accordions (Cake)
	/******************************/
	.wp-block-cke-accordions {
		/* Gutenberg style override */
		&:is(.wp-block-cke-accordions) {
			margin-block-start: 0;
		}
		
		/* Accordion item */
		& > .wp-block-cke-accordion-item {
			display: grid;
			grid-template-columns: 1fr 45px;
			grid-template-areas:
				'head btn'
				'body body';
			gap: unset;
			background-color: unset;
			padding: unset;
			border-block-end: 2px solid var(--wp--custom--color--default--accent);
			border-radius: unset;
			
			&:first-of-type {
				border-block-start: 2px solid var(--wp--custom--color--default--accent);
			}
			
			& ~ & {
				margin-block-start: unset;
			}
			
			/* Accordion head */
			& > .wp-block-cke-accordion-head {
				grid-area: head;
				display: flex;
				align-items: center;
				padding-block: var(--wp--preset--spacing--1);
			}
			
			/* Accordion body */
			& > .wp-block-cke-accordion-body {
				grid-area: body;
				
				& > .wp-block-cke-accordion-body__inner {
					max-width: 80%;
					
					& > * {
						margin-block: unset;
						
						& + * {
							margin-block-start: 1em;
						}
						
						&:last-child {
							margin-block-end: var(--wp--preset--spacing--2);
						}
					}
				}
			}
			
			/* Accordion button */
			& > .toggle-accordion-btn {
				grid-area: btn;
				display: flex;
				justify-content: center;
				align-items: start;
				width: 100%;
				height: auto;
				aspect-ratio: 1;
				color: var(--wp--custom--color--default--accent);
				padding: unset;
				margin-block: var(--wp--preset--spacing--0-75);
				border: 2px solid var(--wp--custom--color--default--accent);
				border-radius: 50%;
				box-sizing: border-box;
				
				&::before {
					display: block;
					max-height: 0;
					font-size: calc(var(--wp--preset--font-size--x-large) * .7);
					font-weight: 100;
					line-height: 40px;
					color: var(--wp--custom--color--default--accent);
					transition: color var(--wp--custom--speed--fast);
				}
				
				input:is([type="checkbox"], [type="radio"]):checked + .wp-block-cke-accordion-item > &::before {
					content: '---';
					letter-spacing: -1px;
					translate: -1px -3px;
				}
				
				&:is(:hover, :focus, :active)::before {
					color: var(--wp--custom--color--default--bg);	
				}
			}
		}
	}
	
	/******************************/
	/* Anchor (Cake)
	/******************************/
	.wp-block-cke-anchor {
		translate: 0 calc(var(--wp--custom--stickied-header-height) * -1);
	}
	
	/******************************/
	/* Cover
	/******************************/
	.wp-block-cover {
		padding: var(--wp--preset--spacing--4) var(--wp--custom--outer-pad);
		
		& > .wp-block-cover__inner-container {
			max-width: 42.5%;
		}
	}
	
	/******************************/
	/* Group
	/******************************/
	/* Group link hover color inheritance */
	.wp-block-group.is-linked[class*="focus-"] > :is(p, .wp-block-heading) {
		color: inherit !important;
		transition: color .3s !important;
	}
	
	/******************************/
	/* Heading
	/******************************/
	.wp-block-heading {
		/* USE ACCENT COLOR style variation */
		&.is-style-use-accent-color,
		&.is-style-use-accent-color mark {
			color: var(--wp--custom--color--default--accent) !important;
		}
	}
	
	/******************************/
	/* Image
	/******************************/
	.wp-block-image {
		border-radius: var(--wp--custom--border-radius--small);
		overflow: clip;
	}
	
	/* --- Fill style variations --- */
	:has(> .wp-block-image[class*="is-style-fill"]) {
		position: relative;
	}
	
	.wp-block-column:has(> .wp-block-image[class*="is-style-fill"]) {
		align-self: stretch;
	}
	
	.wp-block-image[class*="is-style-fill"]:not(.cover, .contain) * {
		object-fit: cover;
	}
	
	/* Fill width */
	.wp-block-image.is-style-fill-width,
	.wp-block-image.is-style-fill-width * {
		width: 100% !important;
	}
	
	/* Fill height */
	.wp-block-image.is-style-fill-height,
	.wp-block-image.is-style-fill-height * {
		height: 100% !important;
	}
	
	/* Fill both */	
	.wp-block-image.is-style-fill-both,
	.wp-block-image.is-style-fill-both * {
		width: 100% !important;
		height: 100% !important;
	}
	
	.wp-block-image.is-style-fill-both * {
		position: absolute;
		inset: 0;
	}
	
	/* Backend style */
	.wp-block-image[class*="is-style-fill"]:not(.is-resized) .components-resizable-box__container {
		display: contents !important;
	}
	
	/******************************/
	/* List
	/******************************/
	ul.wp-block-list {
		&:is(ul) {
			padding-inline-start: unset !important;
			
			& > li {
				display: flex;
				align-items: baseline;
				column-gap: var(--wp--preset--spacing--0-50);
				list-style: unset;
				
				&::before {
					--bullet: url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 125 101"><path transform="translate(-0.000640869 0)" d="M124.17332 0L84.105522 99.542603L0 99.542603L40.069077 0L124.17332 0Z" fill-rule="evenodd"/></svg>');
					
					content: '';
					width: 10px;
					height: auto;
					aspect-ratio: 31/25;
					background-repeat: no-repeat;
					background-position: center;
					background-color: currentcolor;
					
					-webkit-mask: var(--bullet);
					mask: var(--bullet);
				}
			}
		}
		
		&:is(ol) {
			padding-inline-start: 24px !important;
		}
	}
	
	/******************************/
	/* Media-text
	/******************************/
	.wp-block-media-text {
		gap: var(--wp--preset--spacing--10);
		
		& > .wp-block-media-text__media {
			border-radius: var(--wp--custom--border-radius--small);
			overflow: clip;
		}
		
		& > .wp-block-media-text__content {
			align-self: end;
			
			:not(.has-media-on-the-right) > & {
				padding-inline: 0 var(--wp--preset--spacing--11);
			}
			
			.has-media-on-the-right > & {
				padding-inline: var(--wp--preset--spacing--11) 0;
			}
		}
	}
	
	/******************************/
	/* Scrollspy-nav (Cake)
	/******************************/
	.wp-block-cke-scrollspy-nav:is(.wp-block-cke-scrollspy-nav) {
		margin-block: unset !important;
		
		& + :not(.wp-block-cke-anchor) {
			margin-block-start: var(--wp--preset--spacing--2-5) !important;
		}
		
		& .anchor-link {
			font-family: var(--wp--preset--font-family--publish-gothic);
			font-size: var(--wp--preset--font-size--medium-large);
			font-weight: 600;
			padding-block: unset;
			padding-inline: unset;
			border: unset;
			
			.wp-block-cke-scrollspy-nav[data-style="custom"] & {
				&:is(:hover,:focus, .active) {
					color: var(--wp--custom--color--default--accent);
					background-color: unset;
					border: unset;
				}
				
				&:active {
					scale: 1;
				}
			}
		}
	}
	
	/* Style columns containing the scrollspy-nav block */
	.wp-block-columns:has(.wp-block-cke-scrollspy-nav) {
		gap: 17.5%;
		
		& > .wp-block-column:has(> .wp-block-cke-scrollspy-nav) {
			--offset-h: 20px;
			--offset-v: 20px;
			
			flex-basis: max-content !important;
			position: sticky;
			top: calc(var(--wp--preset--spacing--2) + var(--wp--custom--stickied-header-height));
			width: max-content;
			height: max-content;
			max-width: 25%;
			max-height: calc(100svh - (var(--wp--preset--spacing--2) * 2) - var(--wp--custom--stickied-header-height));
			background-color: var(--wp--custom--color--default--bg);
			padding: var(--wp--preset--spacing--1-5) var(--wp--preset--spacing--3-5);
			border: 5px solid var(--wp--custom--color--default--accent);
			box-sizing: border-box;
			border-radius: var(--wp--custom--border-radius--small);
			filter: drop-shadow(-20px 20px var(--wp--custom--color--default--accent));
			
			& + .wp-block-column {
				flex-grow: 1;
				
				& > .wp-block-cke-accordions,
				& > .anchor-container > .wp-block-cke-accordions {
					max-width: 80%;
				}
				
				& > p,
				& > .anchor-container > p {
					max-width: 70%;
				}
				
				& > .wp-block-heading,
				& > .anchor-container > .wp-block-heading {
					max-width: 60%;
				}
			}
		}
	}