/*
 * TABS-4: tabs with a picture for each.
 * The plain row of the kit's tabs (tabs.css). Each panel is a picture beside a
 * heading, a few lines and a short list. On a narrow screen the picture
 * stands over the words. A panel left without its picture is words alone.
 */

.wprk-tabs-4 .wprk-tabs-4__tabs {
	margin-block: 0;
}

.wprk-tabs-4 .wp-block-tab-panel {
	--wprk-tabs-panel: grid;
	align-items: center;
	display: grid;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 782px) {
	.wprk-tabs-4 .wp-block-tab-panel:has(> .wp-block-image) {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	}
}

/* The grid spaces the two; the rule for parts that follow each other in a panel is not wanted here. */
.wprk-tabs-4 .wprk-tabs .wp-block-tab-panel > * + * {
	margin-block-start: 0;
}

/* What staff add to a tab beside its picture and its words takes the whole width, under the two. */
.wprk-tabs-4 .wprk-tabs .wp-block-tab-panel > :not(.wprk-tabs-4__picture, .wprk-tabs-4__text) {
	grid-column: 1 / -1;
}

.wprk-tabs-4 .wprk-tabs-4__picture {
	margin: 0;
}

.wprk-tabs-4 .wprk-tabs-4__picture img {
	display: block;
	width: 100%;
}

.wprk-tabs-4 .wprk-tabs-4__text > * {
	margin-block: 0;
	max-width: 34rem;
}

.wprk-tabs-4 .wprk-tabs-4__text > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}
