/* CCC consent banner – compact layout, no external resources, theme tokens when present. */
.ccc-consent {
	--ccc-green: var(--green, #167247);
	--ccc-deep: var(--deep, #0b3d2e);
	--ccc-ink: var(--ink, #173b2b);
	--ccc-muted: var(--muted, #50675a);
	--ccc-line: var(--line, #d6e3d9);
	--ccc-paper: var(--paper, #f1f6f2);
	--ccc-focus: var(--focus, #00683d);
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	max-height: 80vh;
	overflow: auto;
	background: #fff;
	color: var(--ccc-ink);
	border-top: 3px solid var(--ccc-green);
	box-shadow: 0 -8px 28px rgba(7, 32, 23, 0.12);
	font-family: var(--body, Arial, Helvetica, sans-serif);
	font-size: 13px;
	line-height: 1.55;
	overscroll-behavior: contain;
	-webkit-text-size-adjust: 100%;
}

.ccc-consent:focus {
	outline: none;
}

.ccc-consent__inner {
	width: min(1240px, calc(100% - 40px));
	margin: 0 auto;
	padding: 12px 0 12px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 24px;
	align-items: center;
}

.ccc-consent__title {
	margin: 0;
	font-family: var(--display, 'Arial Narrow', Arial, sans-serif);
	font-size: clamp(18px, 1.7vw, 21px);
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0;
	color: var(--ccc-deep);
}

.ccc-consent__subtitle {
	margin: 1px 0 4px;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--ccc-green);
}

.ccc-consent__desc {
	margin: 0;
	max-width: 86ch;
	color: var(--ccc-muted);
	font-size: 13px;
	line-height: 1.55;
}

.ccc-consent__desc a {
	color: var(--ccc-green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ccc-consent__desc code {
	font-size: 12px;
	background: var(--ccc-paper);
	padding: 0 4px;
	border-radius: 4px;
	white-space: nowrap;
}

.ccc-consent__note {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ccc-muted);
}

.ccc-consent__note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ccc-consent__note a:hover {
	color: var(--ccc-green);
}

.ccc-consent__actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	justify-content: flex-end;
}

.ccc-consent__btn {
	flex: 0 0 auto;
	min-width: 148px;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--ccc-deep);
	background: #fff;
	color: var(--ccc-deep);
	font: 600 13px/1.2 var(--body, Arial, Helvetica, sans-serif);
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
}

.ccc-consent__btn--accept {
	background: var(--ccc-green);
	border-color: var(--ccc-green);
	color: #fff;
}

.ccc-consent__btn--close {
	border-color: var(--ccc-line);
	color: var(--ccc-muted);
}

.ccc-consent__btn:hover {
	background: var(--ccc-paper);
	color: var(--ccc-deep);
}

/* Equal-choice reject: white surface, visible green outline, dark text. */
.ccc-consent__btn--reject {
	background: #fff;
	border: 2px solid var(--ccc-green);
	color: var(--ccc-deep);
}

.ccc-consent__btn--reject:hover {
	background: var(--ccc-paper);
	border-color: var(--ccc-green);
	color: var(--ccc-deep);
}

.ccc-consent__btn--accept:hover {
	background: var(--ccc-deep);
	border-color: var(--ccc-deep);
	color: #fff;
}

.ccc-consent__btn:focus-visible,
.ccc-consent-reopen__btn:focus-visible {
	outline: 3px solid var(--ccc-focus);
	outline-offset: 3px;
}

/* Permanent reopen / revoke affordance after the footer. */
.ccc-consent-reopen {
	background: var(--paper, #f1f6f2);
	border-top: 1px solid var(--line, #d6e3d9);
	text-align: center;
	padding: 2px 20px calc(2px + env(safe-area-inset-bottom));
	font-family: var(--body, Arial, Helvetica, sans-serif);
}

.ccc-consent-reopen__btn {
	min-height: 40px;
	padding: 4px 12px;
	border: 0;
	background: none;
	color: var(--muted, #50675a);
	font: 600 12px/1.2 var(--body, Arial, Helvetica, sans-serif);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ccc-consent-reopen__btn:hover {
	color: var(--green, #167247);
}

body.ccc-consent-open {
	padding-bottom: var(--ccc-consent-h, 200px);
}

/* Medium / tablet: one column, but the two decisions stay side by side. */
@media (max-width: 959px) {
	.ccc-consent__inner {
		width: calc(100% - 32px);
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 11px 0 12px;
	}

	.ccc-consent__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		max-width: 560px;
	}

	.ccc-consent__btn {
		width: 100%;
		min-width: 0;
		min-height: 44px;
		padding: 10px 8px;
	}
}

/* Narrow phones: same side-by-side choice, tighter type, still 44 px targets. */
@media (max-width: 400px) {
	.ccc-consent__inner {
		width: calc(100% - 24px);
		padding: 10px 0 10px;
		gap: 8px;
	}

	.ccc-consent__title {
		font-size: 18px;
	}

	.ccc-consent__subtitle {
		font-size: 13.5px;
		margin-bottom: 3px;
	}

	.ccc-consent__desc,
	.ccc-consent__note {
		font-size: 12.5px;
	}

	.ccc-consent__actions {
		gap: 8px;
	}

	.ccc-consent__btn {
		font-size: 12.5px;
		padding: 10px 6px;
	}
}

/* Very short viewports (landscape phones): keep the decision reachable. */
@media (max-height: 420px) {
	.ccc-consent {
		max-height: 88vh;
	}
}

/* The theme's fixed mobile bar sits at the very bottom; keep the permanent
   settings link tappable above it instead of underneath the bar. */
@media (max-width: 900px) {
	.ccc-consent-reopen {
		padding-bottom: calc(72px + env(safe-area-inset-bottom));
	}
}

@media (prefers-reduced-motion: reduce) {
	.ccc-consent * {
		transition: none !important;
		animation: none !important;
	}
}

@media print {
	.ccc-consent,
	.ccc-consent-reopen {
		display: none !important;
	}
}
