/*
 * Dreimorgen global footer: editorial asymmetry preview.
 * Loaded only while body.dm-editorial-layout is present.
 * Uses the active #ftr2 markup, existing component classes, tokens and links.
 */

body.dm-editorial-layout #ftr2 {
	padding-block: var(--dm-space-section-compact, 64px) var(--dm-space-block, 32px);
}

body.dm-editorial-layout #ftr2 > .inner {
	border: 0;
	padding-top: 0;
}

body.dm-editorial-layout #ftr2 .ftr2-cols {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	row-gap: var(--dm-space-block, 32px);
	margin-bottom: var(--dm-space-section-compact, 64px);
}

/* Three deliberately unequal groups aligned to the shared 12-column grid. */
body.dm-editorial-layout #ftr2 .ftr2-cols > .ftr2-disclosure:nth-of-type(1) {
	grid-column: 1 / 5;
	grid-row: 1;
}

body.dm-editorial-layout #ftr2 .ftr2-cols > .ftr2-disclosure:nth-of-type(2) {
	grid-column: 5 / 8;
	grid-row: 1;
}

body.dm-editorial-layout #ftr2 .ftr2-contact {
	grid-column: 9 / 13;
	grid-row: 1;
}

body.dm-editorial-layout #ftr2 .ftr2-col-head {
	margin: 0 0 var(--dm-space-row, 16px);
	font-family: var(--f);
	font-size: var(--sz-b);
	line-height: var(--lh-b);
	font-weight: 400;
	color: var(--ink);
}

body.dm-editorial-layout #ftr2 .ftr2-newsletter-heading {
	display: block;
	margin-bottom: var(--dm-space-title-text, 24px);
}

body.dm-editorial-layout #ftr2 .ftr2-nav-link {
	max-width: 100%;
	white-space: normal;
	margin-bottom: var(--dm-space-row, 16px);
}

body.dm-editorial-layout #ftr2 .ftr2-bottom {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	row-gap: var(--dm-space-block, 32px);
	align-items: end;
	border: 0;
	padding-top: 0;
}

body.dm-editorial-layout #ftr2 .ftr2-nl {
	grid-column: 1 / 9;
	min-width: 0;
}

body.dm-editorial-layout #ftr2 .ftr2-nl-sub {
	margin-bottom: var(--dm-space-row, 16px);
}

body.dm-editorial-layout #ftr2 .ftr2-nl-form {
	max-width: 100%;
}

body.dm-editorial-layout #ftr2 .ftr2-bottom-legal {
	grid-column: 10 / 13;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--dm-space-row, 16px);
}

/* Promote the existing inquiry path to the shared footer's opening action. */
body.dm-editorial-layout #ftr2 .ftr2-project-row {
	margin-block-end: var(--dm-space-section-compact);
}

body.dm-editorial-layout #ftr2 .ftr2-project-action {
	grid-column: 1 / 9;
	display: flex;
	justify-self: stretch;
	justify-content: space-between;
	min-height: var(--dm-space-tap);
	white-space: normal;
	padding: var(--dm-space-text) var(--dm-space-block);
	font: 500 var(--sz-d) / var(--lh-d) var(--f);
	letter-spacing: var(--ls-d, normal);
	color: white;
}

body.dm-editorial-layout #ftr2 .ftr2-project-action > [aria-hidden] {
	flex: none;
}

body.dm-editorial-layout #ftr2 .ftr2-project-action:focus-visible {
	outline-color: var(--ink);
}

body.dm-editorial-layout #ftr2 :is(a, summary, button, input):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 5px;
}

@media (min-width: 769px) {
	body.dm-editorial-layout #ftr2 .ftr2-bottom-legal {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		gap: var(--dm-space-row) var(--dm-space-block);
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	body.dm-editorial-layout #ftr2 {
		padding-block: var(--dm-space-section-compact, 64px) var(--dm-space-block, 32px);
	}

	body.dm-editorial-layout #ftr2 .ftr2-cols {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		row-gap: var(--dm-space-section-compact, 64px);
		margin-bottom: var(--dm-space-section-compact, 64px);
	}

	body.dm-editorial-layout #ftr2 .ftr2-cols > .ftr2-disclosure:nth-of-type(1) {
		grid-column: 1 / 7;
	}

	body.dm-editorial-layout #ftr2 .ftr2-cols > .ftr2-disclosure:nth-of-type(2) {
		grid-column: 7 / -1;
	}

	body.dm-editorial-layout #ftr2 .ftr2-contact {
		grid-column: 1 / 7;
		grid-row: 2;
	}

}

@media (max-width: 768px) {
	body.dm-editorial-layout #ftr2 {
		padding-block: var(--dm-space-section-compact, 64px) var(--dm-space-block, 32px);
	}

	body.dm-editorial-layout #ftr2 .ftr2-cols {
		display: flex;
		flex-direction: column;
		gap: 0;
		margin-bottom: 0;
	}

	body.dm-editorial-layout #ftr2 .ftr2-col-head {
		font-size: var(--sz-u);
		line-height: var(--lh-u);
	}

	body.dm-editorial-layout #ftr2 .ftr2-contact > .ftr2-col-head {
		margin-bottom: var(--dm-space-row, 16px);
	}

	body.dm-editorial-layout #ftr2 .ftr2-contact .ftr2-nav-link {
		margin: 0;
	}

	body.dm-editorial-layout #ftr2 .ftr2-project-action {
		grid-column: 1 / -1;
		padding: var(--dm-space-row) var(--dm-space-text);
	}

	body.dm-editorial-layout #ftr2 .ftr2-bottom {
		display: block;
	}

	body.dm-editorial-layout #ftr2 .ftr2-bottom-legal {
		margin-top: 0;
	}

	body.dm-editorial-layout #ftr2 .ftr2-disclosure-content {
		padding-top: var(--dm-space-row, 16px);
	}

	body.dm-editorial-layout #ftr2 .ftr2-nl > .ftr2-disclosure-content {
		padding-bottom: 0;
	}

	body.dm-editorial-layout #ftr2 .ftr2-newsletter-heading {
		display: flex;
		gap: var(--dm-space-row);
		margin-bottom: 0;
	}

	body.dm-editorial-layout #ftr2 .ftr2-nl-form {
		width: 100%;
	}
}
