/**
 * Legal documents.
 *
 * Long-form legal text is read by someone looking for one specific answer, not
 * read straight through. Generous headings, a narrow measure and a real
 * description list are what make that possible.
 */

.ae-legal {
	max-width: 70ch;
}

.ae-legal h2 {
	margin: 2.5rem 0 0.75rem;
	font-size: var(--wp--preset--font-size--medium, 1.25rem);
	line-height: 1.3;
}

.ae-legal h2:first-child {
	margin-top: 0;
}

.ae-legal h3 {
	margin: 1.75rem 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.ae-legal p,
.ae-legal li {
	line-height: 1.65;
	text-wrap: pretty;
}

.ae-legal ul {
	margin: 0 0 1rem;
	padding-left: 1.25em;
	display: grid;
	gap: 0.5rem;
}

.ae-legal__list {
	display: grid;
	gap: 0;
	margin: 0 0 1.5rem;
}

.ae-legal__row {
	display: grid;
	grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr);
	gap: 0.25rem 1.5rem;
	padding-block: 0.6rem;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

@media (max-width: 600px) {
	.ae-legal__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.ae-legal__row dt {
	margin: 0;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.6;
}

.ae-legal__row dd {
	margin: 0;
}

.ae-legal__table {
	width: 100%;
	margin: 0 0 1.5rem;
	border-collapse: collapse;
	font-size: 0.875rem;
	/* Long cookie tables must scroll inside themselves, never widen the page. */
	display: block;
	overflow-x: auto;
}

.ae-legal__table th,
.ae-legal__table td {
	padding: 0.6rem 0.75rem;
	text-align: start;
	vertical-align: top;
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.ae-legal__table th {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.7;
	white-space: nowrap;
}

.ae-legal__table code {
	font-size: 0.8125em;
	overflow-wrap: anywhere;
}

/* A gap in a legal document has to be impossible to miss. */
.ae-legal__missing {
	padding: 0.1em 0.4em;
	color: #7a2b12;
	background-color: #ffe8a3;
	font-size: 0.9em;
	font-style: normal;
}

.ae-legal__updated {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	font-size: 0.8125rem;
	opacity: 0.6;
}

.ae-legal__button,
.ae-consent-trigger {
	appearance: none;
	padding: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.ae-legal__button {
	min-height: 44px;
	padding: 0.6em 1.3em;
	color: var(--wp--preset--color--base, #fff);
	background-color: var(--wp--preset--color--contrast, #171513);
	border-radius: 2px;
	text-decoration: none;
}

.ae-consent-trigger--button {
	min-height: 44px;
	padding: 0.6em 1.3em;
	border: 1px solid currentColor;
	border-radius: 2px;
	text-decoration: none;
}

.ae-legal__button:focus-visible,
.ae-consent-trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ae-legal-links {
	display: grid;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ae-legal-links__item {
	margin: 0;
}

.ae-legal-links__item a,
.ae-legal-links__item .ae-consent-trigger {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.ae-legal-links__item a:hover,
.ae-legal-links__item a:focus-visible,
.ae-legal-links__item .ae-consent-trigger:hover,
.ae-legal-links__item .ae-consent-trigger:focus-visible {
	border-bottom-color: currentColor;
}
