/*
 * GoConsent policy pages: even spacing on any theme.
 *
 * Each GoConsent section is a Group block (or a div in classic and builder pages). Themes often
 * pad every Group block (Astra: 48px on all sides), which stacks into large gaps between
 * sections. These rules own the section spacing and inherit the theme's fonts and colors.
 */
body .gc-policy-section.gc-policy-section {
	box-sizing: border-box;
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

body .gc-policy-section.gc-policy-section + .gc-policy-section {
	margin-top: 2.25em;
}

body .gc-policy-section > * {
	margin-top: 0;
	margin-bottom: 1em;
}

body .gc-policy-section > :last-child {
	margin-bottom: 0;
}

body .gc-policy-section h2 {
	margin-bottom: .6em;
}

body .gc-policy-section h3 {
	margin-top: 1.5em;
	margin-bottom: .5em;
}

body .gc-policy-section h2 + h3 {
	margin-top: 0;
}

body .gc-policy-section ul,
body .gc-policy-section ol {
	padding-left: 1.4em;
}

body .gc-policy-section li {
	margin: 0 0 .4em;
}

body .gc-policy-section li:last-child {
	margin-bottom: 0;
}

body .gc-policy-section figure.wp-block-table {
	margin-left: 0;
	margin-right: 0;
	overflow-x: auto;
}

body .gc-policy-section table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

body .gc-policy-section th,
body .gc-policy-section td {
	padding: .55em .75em;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	text-align: left;
	vertical-align: top;
}

body .gc-policy-section th {
	font-weight: 700;
}

/* Linkable headings (e.g. #notice-at-collection) stay clear of sticky theme headers. */
body .gc-policy-section [id] {
	scroll-margin-top: 6rem;
}

/* Archived policy versions (GoConsent Pro). */
.gc-policy-archived {
	margin: 0 0 1.5em;
	padding: .9em 1.1em;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	background: rgba(0, 0, 0, .04);
}

/* 1.0.125: compact and theme-proof. Its edges line up with the page's text column (History::align_script). */
body .gc-policy-history.gc-policy-history {
	box-sizing: border-box;
	max-width: 100%;
	margin-top: 2.5em;
	margin-bottom: 2.5em;
	padding: 1.25em 0 0;
	border-top: 1px solid rgba(0, 0, 0, .12);
	font-size: 15px;
	line-height: 1.5;
}

body .gc-policy-history.gc-policy-history h2 {
	margin: 0 0 .5em;
	padding: 0;
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: 0;
}

body .gc-policy-history.gc-policy-history ul {
	margin: 0;
	padding: 0 0 0 1.25em;
}

body .gc-policy-history.gc-policy-history li {
	margin: 0 0 .35em;
	font-size: inherit;
	line-height: inherit;
}

body .gc-policy-history.gc-policy-history a {
	font-size: inherit;
	font-weight: inherit;
}

/*
 * GoConsent's own page header (1.1.13): used only when the site has no page whose title
 * banner can be copied. Theme fonts and colors; clear space below the site header.
 */
body .gc-policy-header.gc-policy-header {
	box-sizing: border-box;
	margin: 0 0 2.25em;
	padding: 2.5em 0 0;
	border: 0;
	background: none;
}

body .gc-policy-header .gc-policy-title {
	margin: 0 0 .35em;
	line-height: 1.2;
}

body .gc-policy-header .gc-policy-updated {
	margin: 0;
	font-size: .9em;
	opacity: .75;
}

/*
 * Tables (1.1.17), RoxxiStudios table standard: policy tables are reading tables. When the
 * table's own box is too narrow for its columns (container query, not screen size), each row
 * becomes a card: first cell as the card title, every other cell with its column heading.
 * Labels come from a few lines of script; without it the table scrolls inside its own box,
 * never widening the page. 4 columns switch at 640px, 5 or more at 760px.
 */
body .gc-policy-section,
body .gc-cookie-declaration {
	container-type: inline-size;
}

@container (max-width: 760px) {
	body .gc-policy-section table:not(.gc-stack),
	body .gc-cookie-table table:not(.gc-stack) {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}

	body table.gc-stack.gc-cols-5 {
		display: block;
		width: 100%;
		border: 0;
	}

	body table.gc-stack.gc-cols-5 thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	body table.gc-stack.gc-cols-5 tbody,
	body table.gc-stack.gc-cols-5 tr,
	body table.gc-stack.gc-cols-5 td {
		display: block;
		width: auto;
	}

	body table.gc-stack.gc-cols-5 tr {
		margin: 0 0 .9em;
		border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
		border-radius: 10px;
		overflow: hidden;
	}

	body .gc-policy-section table.gc-stack.gc-cols-5 td,
	body .gc-cookie-table table.gc-stack.gc-cols-5 td {
		border: 0;
		padding: .55em .9em;
	}

	body table.gc-stack.gc-cols-5 td + td {
		border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
	}

	body table.gc-stack.gc-cols-5 td[data-label]::before {
		content: attr(data-label);
		display: block;
		margin: 0 0 .15em;
		font-size: .82em;
		font-weight: 700;
		opacity: .75;
	}

	body table.gc-stack.gc-cols-5 td:first-child {
		background: color-mix(in srgb, currentColor 5%, transparent);
		font-weight: 700;
	}

	body table.gc-stack.gc-cols-5 td:first-child::before {
		display: none;
	}

	body .gc-cookie-table {
		overflow: visible;
	}
}

@container (max-width: 640px) {
	body table.gc-stack {
		display: block;
		width: 100%;
		border: 0;
	}

	body table.gc-stack thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	body table.gc-stack tbody,
	body table.gc-stack tr,
	body table.gc-stack td {
		display: block;
		width: auto;
	}

	body table.gc-stack tr {
		margin: 0 0 .9em;
		border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
		border-radius: 10px;
		overflow: hidden;
	}

	body table.gc-stack tr:last-child {
		margin-bottom: 0;
	}

	body .gc-policy-section table.gc-stack td,
	body .gc-cookie-table table.gc-stack td {
		border: 0;
		padding: .55em .9em;
	}

	body table.gc-stack td + td {
		border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
	}

	body table.gc-stack td[data-label]::before {
		content: attr(data-label);
		display: block;
		margin: 0 0 .15em;
		font-size: .82em;
		font-weight: 700;
		opacity: .75;
	}

	body table.gc-stack td:first-child {
		background: color-mix(in srgb, currentColor 5%, transparent);
		font-weight: 700;
	}

	body table.gc-stack td:first-child::before {
		display: none;
	}

	body .gc-cookie-table {
		overflow: visible;
	}
}
