/*
 * `nomon/business-location` — full-width contact facts, map, and accordions.
 *
 * Only what Tailwind utilities can't express cleanly: the escape from the
 * article column, the spec hairlines (nth-child, which moves per breakpoint),
 * and the map's aspect ratio.
 */

/* `has-global-padding is-layout-constrained` by hand — algebraically identical,
   so the block escapes the 1020px article column to the page H1's own edges.
   Same trick, same reason as `.nomon-imagecard`. */
.nomon-business-location {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(
		var(--wp--style--global--content-size) +
		var(--wp--style--root--padding-left) +
		var(--wp--style--root--padding-right)
	);
	margin-inline: auto;
	padding-inline: var(--wp--style--root--padding-left)
		var(--wp--style--root--padding-right);
}

/* The rule leads every cell but the first in its row, so the exception moves
   with the column count. Stacked, it goes back on top to separate rows. */
.nomon-business-location__cell {
	border-top: 1px solid var(--wp--preset--color--border);
}

@media (min-width: 40rem) {
	.nomon-business-location__cell {
		border-top: 0;
		border-left: 1px solid var(--wp--preset--color--border);
		padding-left: 22px;
	}
	.nomon-business-location__cell:nth-child(2n + 1) {
		border-left: 0;
		padding-left: 0;
	}
}

@media (min-width: 64rem) {
	.nomon-business-location__cell:nth-child(2n + 1) {
		border-left: 1px solid var(--wp--preset--color--border);
		padding-left: 22px;
	}
	.nomon-business-location__cell:nth-child(4n + 1) {
		border-left: 0;
		padding-left: 0;
	}
}

.nomon-business-location__map {
	aspect-ratio: 24 / 9;
}

@media (max-width: 45rem) {
	.nomon-business-location__map {
		aspect-ratio: 4 / 3;
	}
}

/* 25px, not the 6px `.stripe-divider` default — the wide banner stripe. */
.nomon-business-location__stripe {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 25px;
}

.nomon-business-location__map--empty {
	aspect-ratio: auto;
	min-height: 220px;
}
