/* Tifco Cookie Consent. Colours and spacing follow the site's Automatic.css variables when present. */
.tcc {
	--tcc-bg: var(--primary, #1d2534);
	--tcc-fg: var(--white, #ffffff);
	--tcc-panel-bg: var(--white, #ffffff);
	--tcc-panel-fg: var(--base, #363636);
	--tcc-heading: var(--primary, #1d2534);
	--tcc-btn-bg: var(--white, #ffffff);
	--tcc-btn-fg: var(--primary, #1d2534);
	--tcc-btn-alt-bg: var(--primary, #1d2534);
	--tcc-btn-alt-fg: var(--white, #ffffff);
	--tcc-focus: var(--accent, #96c7d2);
	--tcc-border: var(--neutral-semi-dark, #b5b5b2);
	--tcc-gap: var(--space-s, 1em);
	--tcc-pad: var(--space-m, 1.5em);
	--tcc-radius: 0;
	--tcc-z: 2147483000;
	font-size: max(var(--text-s, 16px), 15px);
	line-height: 1.5;
}
.tcc [hidden], .tcc[hidden] { display: none !important; }
.tcc *, .tcc *::before, .tcc *::after { box-sizing: border-box; }

/* Buttons: all three choices look the same (equal prominence). */
.tcc .tcc-btn, .tcc-ph .tcc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: max(44px, 2.75em);
	padding: 0.6em 1.25em;
	border: 2px solid currentColor;
	border-radius: var(--tcc-radius);
	background: var(--tcc-btn-bg);
	color: var(--tcc-btn-fg);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	text-align: center;
}
.tcc .tcc-btn:hover { filter: brightness(0.92); }
.tcc .tcc-btn:focus-visible, .tcc a:focus-visible, .tcc .tcc-close:focus-visible, .tcc .tcc-switch:focus-visible, .tcc .tcc-float:focus-visible, .tcc-ph .tcc-btn:focus-visible, .tcc-ph a:focus-visible {
	outline: 3px solid var(--tcc-focus);
	outline-offset: 2px;
}

/* ---------- Banner ----------
   Every rule is scoped under .tcc and resets layout explicitly, because site themes
   (Automatic.css, Bricks) style generic elements such as section, div and h2. */
.tcc .tcc-banner {
	position: fixed;
	inset: auto 0 0 0;
	z-index: var(--tcc-z);
	display: block;
	width: auto;
	min-height: 0;
	max-height: 60vh;
	max-height: 60dvh;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	background: var(--tcc-bg);
	color: var(--tcc-fg);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}
.tcc .tcc-banner__inner {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-m, 1.5em);
	width: 100%;
	max-width: var(--content-width, 1280px);
	min-height: 0;
	margin: 0 auto;
	padding: var(--space-s, 1em) var(--gutter, 1.5em);
}
.tcc .tcc-banner__logo {
	display: block;
	flex: 0 0 auto;
	margin: 0;
	padding: 0 var(--space-m, 1.5em) 0 0;
	border-right: 1px solid rgba(255, 255, 255, 0.3);
}
.tcc .tcc-banner__logo img { display: block; width: auto; height: 3.5em; max-width: 11em; margin: 0; }
.tcc .tcc-banner__content { display: block; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; }
.tcc .tcc-banner__title {
	margin: 0 0 0.25em;
	padding: 0;
	color: inherit;
	font-size: 1.25em;
	line-height: 1.2;
}
.tcc .tcc-banner__text { margin: 0; padding: 0; color: inherit; font-size: 1em; line-height: 1.5; max-width: 80ch; }
.tcc .tcc-links { margin: 0.35em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25em 1.25em; font-size: 1em; }
.tcc .tcc-links a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.tcc .tcc-banner .tcc-actions { flex: 0 0 auto; margin: 0; padding: 0; }
.tcc .tcc-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.75em; }
.tcc .tcc-banner .tcc-btn { min-height: max(44px, 2.9em); padding: 0.5em 1.2em; font-size: 0.9375em; white-space: nowrap; }

/* Tablet: logo + text on top, buttons underneath. */
@media (max-width: 1100px) {
	.tcc .tcc-banner__inner { flex-wrap: wrap; }
	.tcc .tcc-banner__content { flex-basis: 0; flex-grow: 1; }
	.tcc .tcc-banner .tcc-actions { flex-basis: 100%; justify-content: flex-end; }
}

/* ---------- Dialog ---------- */
.tcc-dialog {
	position: fixed;
	inset: 0;
	z-index: calc(var(--tcc-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--tcc-gap);
}
.tcc-dialog__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.tcc-dialog__panel {
	position: relative;
	width: min(40em, 100%);
	max-height: calc(100vh - 2em);
	max-height: calc(100dvh - 2em);
	overflow-y: auto;
	padding: var(--tcc-pad);
	background: var(--tcc-panel-bg);
	color: var(--tcc-panel-fg);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.tcc-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.tcc .tcc-dialog__title { margin: 0; color: var(--tcc-heading); font-size: var(--text-l, 1.25em); line-height: 1.2; }
.tcc .tcc-dialog__title:focus { outline: none; }
.tcc .tcc-close {
	appearance: none;
	flex: 0 0 auto;
	width: 2.75em;
	height: 2.75em;
	margin: -0.5em -0.5em 0 0;
	border: 0;
	background: transparent;
	color: var(--tcc-heading);
	font-size: 2em;
	line-height: 1;
	cursor: pointer;
}
.tcc .tcc-dialog__intro { margin: 0.75em 0 1em; }
.tcc .tcc-cats { list-style: none; margin: 0 0 var(--tcc-pad); padding: 0; }
.tcc .tcc-cat { padding: 0.9em 0; border-top: 1px solid var(--tcc-border); margin: 0; }
.tcc .tcc-cat:last-child { border-bottom: 1px solid var(--tcc-border); }
.tcc-cat__row { display: flex; align-items: center; gap: 0.75em; }
.tcc .tcc-cat__label { flex: 1 1 auto; margin: 0; font-weight: 700; color: var(--tcc-heading); cursor: pointer; }
.tcc .tcc-cat__always { font-size: 0.875em; opacity: 0.8; }
.tcc .tcc-cat__desc { margin: 0.35em 0 0; font-size: 0.9375em; }
.tcc-dialog .tcc-btn { background: var(--tcc-btn-alt-bg); color: var(--tcc-btn-alt-fg); border-color: var(--tcc-btn-alt-bg); }

/* Switch */
.tcc .tcc-switch {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 3em;
	height: 1.75em;
	margin: 0;
	border: 2px solid var(--tcc-heading);
	border-radius: 999px;
	background: var(--tcc-panel-bg);
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.tcc .tcc-switch::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0.2em;
	width: 1.1em;
	height: 1.1em;
	border-radius: 50%;
	background: var(--tcc-heading);
	transform: translateY(-50%);
	transition: left 0.15s ease, background-color 0.15s ease;
}
.tcc .tcc-switch:checked { background: var(--tcc-heading); }
.tcc .tcc-switch:checked::after { left: calc(100% - 1.3em); background: var(--tcc-panel-bg); }
.tcc .tcc-switch:disabled { opacity: 0.55; cursor: not-allowed; }

html.tcc-dialog-open { overflow: hidden; }

/* ---------- Floating settings button (optional) ---------- */
.tcc .tcc-float {
	position: fixed;
	left: var(--tcc-gap);
	bottom: var(--tcc-gap);
	z-index: calc(var(--tcc-z) - 1);
	padding: 0.5em 0.9em;
	border: 2px solid var(--tcc-fg);
	background: var(--tcc-bg);
	color: var(--tcc-fg);
	font: inherit;
	font-size: 0.8125em;
	cursor: pointer;
}

/* ---------- Placeholders for blocked embeds ---------- */
iframe[data-tcc-hidden] { display: none !important; }
.tcc-ph-host { position: relative; }
.tcc-ph, .tcc-ph *, .tcc-ph *::before, .tcc-ph *::after { box-sizing: border-box; }
.tcc-ph {
	--tcc-btn-bg: var(--primary, #1d2534);
	--tcc-btn-fg: var(--white, #ffffff);
	--tcc-focus: var(--accent, #96c7d2);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	width: 100%;
	min-height: 15em;
	padding: var(--space-m, 1.5em);
	background: var(--neutral-light, #f2f2f1);
	color: var(--base, #363636);
	text-align: center;
	font-size: max(var(--text-s, 16px), 15px);
	line-height: 1.5;
}
.tcc-ph-host > .tcc-ph { position: absolute; inset: 0; z-index: 2; min-height: 0; }
.tcc-ph .tcc-ph__text { margin: 0; max-width: 34em; }
.tcc-ph .tcc-ph__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75em 1.25em; }
.tcc-ph .tcc-btn { border-color: var(--tcc-btn-bg); }
.tcc-ph .tcc-ph__link { color: inherit; text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
	.tcc .tcc-banner__inner { flex-direction: column; align-items: stretch; gap: 0.6em; padding: 0.75em 1em 0.9em; }
	.tcc .tcc-banner__logo { padding: 0; border: 0; }
	.tcc .tcc-banner__logo img { height: 2.1em; }
	.tcc .tcc-banner__title { font-size: 1em; margin-bottom: 0.2em; }
	.tcc .tcc-banner__text { max-height: 20vh; overflow-y: auto; font-size: 0.875em; line-height: 1.45; }
	.tcc .tcc-links { font-size: 0.875em; margin-top: 0.25em; }
	/* Reject and Accept side by side (same size), Settings full width below. */
	.tcc .tcc-actions, .tcc .tcc-banner .tcc-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 0.45em; }
	.tcc .tcc-actions .tcc-btn, .tcc .tcc-banner .tcc-btn { width: 100%; min-height: max(44px, 2.75em); padding: 0.4em 0.5em; white-space: normal; }
	.tcc .tcc-actions [data-tcc-action="reject"] { order: 1; }
	.tcc .tcc-actions [data-tcc-action="accept"] { order: 2; }
	.tcc .tcc-actions [data-tcc-action="settings"], .tcc .tcc-actions [data-tcc-action="save"] { order: 3; grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.tcc *, .tcc *::before, .tcc *::after { transition: none !important; }
}
