/**
 * Subpage section: List rows (template-parts/sections/subpage/section-list_rows.php).
 *
 * Measured from design/subpages/company.png at 1920 (TODO: verify in Figma):
 * a centred two-line heading (.t-h2), ~40px above a peach panel (#ffefe6)
 * ~1158px wide, slightly wider than the ~1064px column (~47px each side);
 * ~52px inline padding; rows ~40px tall padding with #fbd6c2 hairlines
 * between them; the title (~24px Montserrat, .t-h4) in the start half and
 * the 17px text from the middle. Mobile (TODO, no frame): the title above
 * its text. Tokens are local to the section. Logical properties only.
 *
 * @package cartrack
 */

.list-rows {
	--list-rows-bg: #ffefe6;
	--list-rows-rule: #fbd6c2;
	--list-rows-pad-x: var(--space-md);
	--list-rows-row-pad: var(--space-lg);
	--list-rows-bleed: 0px;
	--list-rows-gap: var(--space-xs);

	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
}

@media (min-width: 48em) { /* --bp-md */
	.list-rows {
		--list-rows-pad-x: var(--space-xl);
		--list-rows-gap: var(--space-xl);
	}
}

@media (min-width: 80em) { /* --bp-xl */
	.list-rows {
		--list-rows-pad-x: 3.25rem;       /* ~52px. */
		--list-rows-row-pad: 2.5rem;      /* ~40px. */
		--list-rows-bleed: 2.9375rem;     /* ~47px past the column on each side. */
		--list-rows-gap: 3.25rem;
	}
}

.list-rows__heading {
	margin: 0;
	text-align: center;
	overflow-wrap: anywhere;
}

.list-rows__panel {
	margin: 0 calc(var(--list-rows-bleed) * -1);
	padding: 0 var(--list-rows-pad-x);
	background: var(--list-rows-bg);
	list-style: none;
}

.list-rows__row {
	display: grid;
	gap: var(--list-rows-gap);
	padding-block: var(--list-rows-row-pad);
}

.list-rows__row + .list-rows__row {
	border-block-start: 1px solid var(--list-rows-rule);
}

@media (min-width: 48em) { /* --bp-md */
	.list-rows__row {
		grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); /* ~45/55: the text starts ~500px after the title. */
		align-items: start;
	}
}

.list-rows__title {
	margin: 0;
	color: var(--color-text);
	font-family: var(--t-h4-family);
	font-size: var(--t-h4-size);
	font-weight: var(--t-h4-weight);
	line-height: var(--t-h4-line-height);
	letter-spacing: var(--t-h4-tracking);
	overflow-wrap: anywhere;
}

.list-rows__text {
	margin: 0;
	color: var(--color-text);
	font-family: var(--t-body-family);
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
	overflow-wrap: anywhere;
}
