/*
Theme Name: Kaleidex theme
Author: TLB
Description: WordPress theme for all Kaleidex sites
Version: 0.1
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 8.2.
Text Domain: kaleidex
*/

* {
	box-sizing: border-box;
}

:root {
	interpolate-size: allow-keywords;
	--kaleidex-purple: 62, 5, 81;
}

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

body {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
	overflow-x: clip;
	line-height: 1.75;
}

.wp-block-navigation {
	justify-content: flex-end;

	@media (min-width: 1024px) {
		.wp-block-navigation-item {
			color: var(--wp--preset--color--white);

			&:hover {
				color: var(--wp--preset--color--kaleidex-orange);
			}
		}
	}
}

.wp-block-spacer {
	display: none;
}

@media (min-width: 768px) {
	.wp-block-spacer {
		display: block;
	}
}

.wp-block-heading:has(+ .wp-block-heading) {
	margin-bottom: 0;

	+ .wp-block-heading {
		margin-top: 0;
	}
}

.wp-block-post-title {
	line-height: 1.1;
}

h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading {
	line-height: 1.1;
}

h3.wp-block-heading {
	&:has(+ .wp-block-heading) {
		font-size: 1.25rem;
		margin-bottom: 0.5rem;
	}
}

.has-branded-corner-tl {
	.image-link-card__content,
	> figure,
	> figure > img {
		border-top-left-radius: var(
			--wp--custom--border-radius--corner-small,
			40px
		);
	}
}

.has-branded-corner-tr {
	.image-link-card__content,
	> figure,
	> figure > img {
		border-top-right-radius: var(
			--wp--custom--border-radius--corner-small,
			40px
		);
	}
}
.has-branded-corner-bl {
	.image-link-card__content,
	> figure,
	> figure > img {
		border-bottom-left-radius: var(
			--wp--custom--border-radius--corner-small,
			40px
		);
	}
}

.has-branded-corner-br {
	.image-link-card__content,
	> figure,
	> figure > img {
		border-bottom-right-radius: var(
			--wp--custom--border-radius--corner-small,
			40px
		);
	}
}

.force-large-radius {
	&.has-branded-corner-tl {
		border-top-left-radius: var(
			--wp--custom--border-radius--corner-large,
			115px
		) !important;
	}

	&.has-branded-corner-tr {
		border-top-right-radius: var(
			--wp--custom--border-radius--corner-large,
			115px
		) !important;
	}

	&.has-branded-corner-bl {
		border-bottom-left-radius: var(
			--wp--custom--border-radius--corner-large,
			115px
		) !important;
	}

	&.has-branded-corner-br {
		border-bottom-right-radius: var(
			--wp--custom--border-radius--corner-large,
			115px
		) !important;
	}
}

.wp-block-buttons {
	> .wp-block-button {
		@media (max-width: 639px) {
			width: 100%;
		}
	}
}

.has-span-4-tablet {
	@media (max-width: 1023px) {
		grid-column: span 4;
	}
}
