.tcm-consent-root {
	--tcm-primary: #1d4ed8;
	--tcm-background: #ffffff;
	--tcm-text: #111827;
	--tcm-muted-text: #4b5563;
	--tcm-border: #d1d5db;
	--tcm-surface: #f3f4f6;
	--tcm-track: #d1d5db;
	--tcm-notice-background: #eff6ff;
	--tcm-notice-border: #bfdbfe;
	--tcm-overlay: rgba(17, 24, 39, 0.48);
	--tcm-radius: 8px;
	--tcm-box-width: 585px;
	--tcm-button-radius: 8px;
	--tcm-button-font-size: 14px;
	--tcm-title-font-size: 1.5em;
	--tcm-spacing: 16px;
	--tcm-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--tcm-text);
	font-family: var(--tcm-font-family);
	font-size: .95em;
	line-height: 1.5;
}

.tcm-consent-root *,
.tcm-consent-root *::before,
.tcm-consent-root *::after {
	box-sizing: border-box;
}

.tcm-consent-root:not(.is-ready) .tcm-consent-banner,
.tcm-consent-root.is-hidden .tcm-consent-banner {
	display: none;
}

.tcm-consent-banner {
	position: fixed;
	z-index: 999999;
	right: 16px;
	bottom: 16px;
	left: 16px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	max-width: 1080px;
	margin: 0 auto;
	padding: 25px;
	background: var(--tcm-background);
	border: 1px solid var(--tcm-border);
	border-radius: var(--tcm-radius);
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.tcm-consent-root.is-box .tcm-consent-banner {
	right: auto;
	left: 16px;
	grid-template-columns: 1fr;
	align-items: stretch;
	width: min(var(--tcm-box-width), calc(100vw - 32px));
	max-width: none;
	margin: 0;
}

.tcm-consent-root.is-banner.is-bottom-left .tcm-consent-banner {
	margin-right: auto;
	margin-left: 0;
}

.tcm-consent-root.is-banner.is-bottom-right .tcm-consent-banner,
.tcm-consent-root.is-box.is-bottom-right .tcm-consent-banner {
	right: 16px;
	left: auto;
	margin-right: 0;
	margin-left: auto;
}

.tcm-consent-root.is-box.is-bottom-center .tcm-consent-banner {
	right: auto;
	left: 50%;
	transform: translateX(-50%);
}

.tcm-consent-root.is-banner.is-bottom-center .tcm-consent-banner {
	margin-right: auto;
	margin-left: auto;
}

.tcm-consent-root.is-box .tcm-consent-actions {
	justify-content: flex-start;
}

.cc-cookie-icon {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50px;
	padding: 0;
	font-size: 18px;
	line-height: 1; 
	background: transparent; 
	border: none;
	cursor: pointer;
}

.tcm-consent-copy h5,
.tcm-consent-modal h5 {
	display: flex;
    align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0;
}

#tcm-consent-title,
#tcm-preferences-title {
	font-size: var(--tcm-title-font-size);
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0;
}

.tcm-consent-copy p,
.tcm-category p {
	margin: 0;
	color: var(--tcm-muted-text);
}

.tcm-consent-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.tcm-consent-links a,
.tcm-button-link {
	color: var(--tcm-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tcm-consent-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.tcm-consent-root button.tcm-button,
.tcm-consent-root button.tcm-icon-button,
.tcm-consent-root button.tcm-consent-link {
	min-height: 48px;
	height: auto;
	padding: 8px 18px;
	color: var(--tcm-text);
	background: var(--tcm-background);
	font-size: var(--tcm-button-font-size);
	font-weight: 500;
	line-height: 1.2;
	border: 1px solid var(--tcm-border);
	border-radius: var(--tcm-button-radius);
	cursor: pointer;
}

.tcm-consent-root .tcm-consent-actions button.tcm-button {
	font-size: var(--tcm-button-font-size);
	border-radius: var(--tcm-button-radius);
}

.tcm-consent-actions .tcm-button {
	flex: 1 1 0;
	min-width: max-content;
}

.tcm-consent-root button.tcm-button-secondary {
	color: var(--tcm-text);
	background: var(--tcm-background);
	border-color: var(--tcm-border);
}

.tcm-consent-root button.tcm-button-secondary:hover {
	border-color: var(--tcm-text);
}

.tcm-consent-root button.tcm-button-link {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tcm-consent-root button.tcm-button-primary {
	color: #fff;
	background: var(--tcm-primary);
	border-color: var(--tcm-primary) ;
	font-weight: 600;
}

.tcm-consent-root button.tcm-button-primary:hover {
	filter: brightness(1.15);
}

.tcm-consent-root button.tcm-button:focus-visible,
.tcm-consent-root button.tcm-icon-button:focus-visible,
.tcm-consent-root button.tcm-consent-link:focus-visible,
.tcm-consent-banner .tcm-switch input:focus-visible + span {
	outline: 3px solid rgba(29, 78, 216, 0.35);
	outline-offset: 2px;
}

.tcm-consent-modal {
	position: fixed;
	z-index: 1000000;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: var(--tcm-overlay);
}

dialog.tcm-consent-modal {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	color: inherit;
	border: 0;
}

dialog.tcm-consent-modal::backdrop {
	background: transparent;
}

.tcm-consent-modal.is-open,
.tcm-consent-modal[open] {
	display: flex;
}

.tcm-consent-modal-panel {
	width: min(680px, 100%);
	max-height: min(760px, 90vh);
	overflow: auto;
	background: var(--tcm-background);
	border-radius: var(--tcm-radius);
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
}

.tcm-consent-modal-header,
.tcm-category {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	justify-content: space-between;
	border-bottom: 1px solid var(--tcm-border);
}

.tcm-consent-modal-header {
	position: sticky;
	top: 0;
	z-index: 1;
	align-items: center;
	padding: 14px 16px;
	background: var(--tcm-background);
}

.tcm-consent-modal-panel #tcm-preferences-title {
	margin: 0;
	font-size: var(--tcm-title-font-size);
	font-weight: 600;
}

.tcm-category {
	padding: 14px 16px;
}

.tcm-category strong {
	display: block;
	margin-bottom: 4px;
}

.tcm-category p {
	font-size: .85em;
	line-height: 1.42;
}

.tcm-category-count {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding: 2px 8px;
	color: var(--tcm-muted-text);
	background: var(--tcm-surface);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.tcm-category-details {
	margin-top: 8px;
	color: var(--tcm-muted-text);
	font-size: .84em;
}

.tcm-category-details summary {
	width: max-content;
	color: var(--tcm-primary);
	cursor: pointer;
	font-weight: 700;
}

.tcm-category-details ul {
	display: grid;
	gap: 8px;
	padding: 10px 0 0;
	margin: 0;
	list-style: none;
}

.tcm-category-details li {
	padding: 10px;
	background: var(--tcm-surface);
	border: 1px solid var(--tcm-border);
	border-radius: calc(var(--tcm-radius) - 2px);
}

.tcm-category-details li strong,
.tcm-category-details li span,
.tcm-category-details li small {
	display: block;
}

.tcm-category-details li strong {
	margin: 0 0 2px;
	color: var(--tcm-text);
}

.tcm-category-details li small {
	margin-top: 4px;
}

.tcm-consent-root button.tcm-icon-button {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	min-height: 40px;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	font-family: sans-serif;
}

.tcm-switch {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-top: 2px;
	white-space: nowrap;
	cursor: pointer;
}

.tcm-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.tcm-switch-control {
	position: relative;
	display: inline-block;
	width: 36px;
	height: 20px;
	background: var(--tcm-track);
	border-radius: 999px;
	transition: background .16s ease;
}

.tcm-switch-control::after {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 14px;
	height: 14px;
	content: "";
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
	transition: transform .16s ease;
}

.tcm-switch input:checked + .tcm-switch-control {
	background: var(--tcm-primary);
}

.tcm-switch input:checked + .tcm-switch-control::after {
	transform: translateX(16px);
}

.tcm-switch input:disabled + .tcm-switch-control {
	background: var(--tcm-track);
	opacity: .8;
}

.tcm-switch-label {
	color: var(--tcm-text);
	font-size: .9em;
}

.tcm-consent-copy .tcm-gpc-message {
	margin: 10px 0 0;
}

.tcm-gpc-message {
	margin: 16px 18px 0;
	padding: 12px;
	background: var(--tcm-notice-background);
	border: 1px solid var(--tcm-notice-border);
	border-radius: calc(var(--tcm-radius) - 2px);
}

.tcm-consent-actions-modal {
	position: sticky;
	bottom: 0;
	padding: 18px;
	background: var(--tcm-background);
	border-top: 1px solid var(--tcm-border);
}

@media (max-width: 720px) {
	.tcm-consent-banner {
		grid-template-columns: 1fr;
	}

	.tcm-consent-root.is-box .tcm-consent-banner {
		right: 16px;
		left: 16px;
		width: auto;
		transform: none;
	}

	.tcm-category {
		display: grid;
	}
}

/*
 * Phones: the primary button goes full width on top, the other two sit
 * smaller side by side underneath. Desktop keeps the primary on the right.
 */
@media (max-width: 640px) {
	.tcm-consent-banner,
	.tcm-consent-root.is-box .tcm-consent-banner {
		right: 8px;
		bottom: 8px;
		left: 8px;
		gap: 16px;
		padding: 18px;
	}

	.tcm-consent-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.tcm-consent-root .tcm-consent-actions button.tcm-button {
		min-width: 0;
		min-height: 44px;
		padding: 6px 10px;
		font-size: 13px;
	}

	.tcm-consent-root .tcm-consent-actions button.tcm-button-primary {
		grid-column: 1 / -1;
		order: -1;
		min-height: 52px;
		font-size: 15px;
	}
}

/* Floating "Your Privacy Choices" button, shown once the banner is dismissed. */
.tcm-consent-root button.tcm-privacy-float {
	position: fixed;
	z-index: 999998;
	bottom: 16px;
	display: inline-flex;
	gap: 6px;
	align-items: center;
	min-height: 40px;
	padding: 6px 14px 6px 8px;
	color: var(--tcm-text);
	background: var(--tcm-background);
	border: 1px solid var(--tcm-border);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.tcm-consent-root button.tcm-privacy-float:hover {
	border-color: var(--tcm-text);
}

.tcm-consent-root button.tcm-privacy-float:focus-visible {
	outline: 3px solid rgba(29, 78, 216, 0.35);
	outline-offset: 2px;
}

.tcm-privacy-float.is-left {
	left: 16px;
}

.tcm-privacy-float.is-right {
	right: 16px;
}

.tcm-privacy-float svg {
	width: 22px;
	height: 22px;
}

.tcm-consent-root:not(.is-hidden) .tcm-privacy-float {
	display: none;
}

/*
 * Dark scheme (Layout & Style). The admin's light colours are inline styles
 * on the root, so these need !important to win. The primary colour is kept.
 */
.tcm-consent-root.is-scheme-dark {
	--tcm-background: #111827 !important;
	--tcm-text: #f9fafb !important;
	--tcm-muted-text: #d1d5db !important;
	--tcm-border: #374151 !important;
	--tcm-surface: #1f2937;
	--tcm-track: #4b5563;
	--tcm-notice-background: #1e293b;
	--tcm-notice-border: #334155;
	--tcm-overlay: rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
	.tcm-consent-root.is-scheme-auto {
		--tcm-background: #111827 !important;
		--tcm-text: #f9fafb !important;
		--tcm-muted-text: #d1d5db !important;
		--tcm-border: #374151 !important;
		--tcm-surface: #1f2937;
		--tcm-track: #4b5563;
		--tcm-notice-background: #1e293b;
		--tcm-notice-border: #334155;
		--tcm-overlay: rgba(0, 0, 0, 0.6);
	}
}

.tcm-consent-root.is-scheme-dark .cc-banner-icon,
.tcm-consent-root.is-scheme-dark .tcm-privacy-float svg {
	fill: currentColor;
}

@media (prefers-color-scheme: dark) {
	.tcm-consent-root.is-scheme-auto .cc-banner-icon,
	.tcm-consent-root.is-scheme-auto .tcm-privacy-float svg {
		fill: currentColor;
	}
}

/* [tcm_cookie_table] on the cookie policy page */
.tcm-cookie-table table {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
	font-size: .95em;
}

.tcm-cookie-table th,
.tcm-cookie-table td {
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #d1d5db;
}

@media (max-width: 640px) {
	.tcm-cookie-table thead {
		display: none;
	}

	.tcm-cookie-table tr {
		display: grid;
		padding: 6px 0;
		border-bottom: 1px solid #d1d5db;
	}

	.tcm-cookie-table td {
		padding: 2px 0;
		border: 0;
	}

	.tcm-cookie-table td::before {
		content: attr(data-label) ": ";
		font-weight: 600;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tcm-consent-root * {
		scroll-behavior: auto;
	}
}
