/*
 * Event page (the "Single item: Event" template)
 *
 * Built from core blocks; these rules cover what the block settings cannot:
 *
 *   kindling-event-meta          an icon and a bound Paragraph (when, location)
 *                                in a row; hidden when the value is empty
 *   kindling-event-content       the event's content (Post Content) beside the photo
 *   kindling-event-photos        the Event Photos section; hidden when the event
 *                                has no photos (the Core Features Event Photos
 *                                block renders nothing then)
 *   kindling-related-events      the Related Events Query Loop: three cards,
 *                                two on tablets, one on phones
 *
 * @package Kindling
 * @since Kindling 4.1.0
 */

.kindling-event-meta {
	.wp-block-outermost-icon-block {
		flex: none;
		/* Center the 20px icon on the first line of text. */
		margin-block-start: calc((1.3em - 20px) / 2);
	}

	&:has(> p:empty) {
		display: none;
	}
}

.kindling-event-content {
	color: var(--wp--custom--color--text--body);

	> :first-child {
		margin-block-start: 0;
	}
}

.kindling-event-photos:not(:has(.wp-block-matchbox-event-gallery)) {
	display: none;
}

.kindling-related-events > .wp-block-post-template {
	@media (min-width: 600px) and (max-width: 1023px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
