/* Carpatian tracking (p06_tracking): cookie banner, preferences modal, preferences FAB (bottom-left, 44x44).
   Palette of carpatian-riders.ro (kept by the new design): brand red #df1f2c / #f8303d, dark surfaces
   #0e1114 / #1a2027; fonts Roboto Condensed (titles) + Titillium Web (text, inherited from the theme).
   Banner: dark card with a red edge; modal: white card with a red band; primary action and FAB: red with white ink.
   Contrast (WCAG AA): white on #df1f2c 4.8:1, white on hover #c41a26 6.0:1, text #c9ced6 on #1a2027 10:1,
   link #ff7a83 on #1a2027 6.6:1, link #b8141f on white 6.6:1, muted #5a626d on white 6.2:1. */
:root {
	--cr-cookie-ink: #1a2027;
	--cr-cookie-ink-deep: #0e1114;
	--cr-cookie-muted: #5a626d;
	--cr-cookie-surface: #ffffff;
	--cr-cookie-line: #e3e5e8;
	--cr-cookie-link: #b8141f;
	--cr-cookie-text-on-dark: #c9ced6;
	--cr-cookie-link-on-dark: #ff7a83;
	--cr-cookie-red: #df1f2c;
	--cr-cookie-red-hover: #c41a26;
	--cr-cookie-red-ink: #ffffff;
	--cr-cookie-focus: #df1f2c;
	--cr-cookie-title-font: "Roboto Condensed", "Titillium Web", Arial, sans-serif;
	--cr-cookie-shadow: 0 18px 48px rgba(14, 17, 20, .35), 0 2px 6px rgba(14, 17, 20, .12);
	--cr-cookie-radius: 6px;
	--cr-cookie-offset: 16px;
	/* Journal 3 mobile bottom menu (Bottom Menu module): banner and FAB sit above it, like J3 .scroll-top */
	--cr-cookie-bottom: 0px;
	--cr-cookie-z: 100000;
	--cr-cookie-ease: cubic-bezier(.16, 1, .3, 1);
}

.has-bottom-menu {
	--cr-cookie-bottom: calc(var(--bottom-menu-display, 55px) + var(--bottom-menu-margin, 0px));
}

.cr-cookie-banner[hidden],
.cr-cookie-modal[hidden],
.cr-cookie-fab[hidden] {
	display: none !important;
}

/* ---------- banner ---------- */
.cr-cookie-banner {
	position: fixed;
	left: var(--cr-cookie-offset);
	right: var(--cr-cookie-offset);
	bottom: calc(var(--cr-cookie-offset) + var(--cr-cookie-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: var(--cr-cookie-z);
	display: flex;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(24px);
	transition: opacity .35s var(--cr-cookie-ease), transform .45s var(--cr-cookie-ease), visibility 0s linear .45s;
}

.cr-cookie-banner.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity .35s var(--cr-cookie-ease), transform .45s var(--cr-cookie-ease), visibility 0s linear 0s;
}

/* An invisible banner never takes taps, clicks or keyboard focus (no consent from an unseen button) */
.cr-cookie-banner:not(.is-visible) .cr-cookie-banner__card {
	pointer-events: none;
}

.cr-cookie-banner__card {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
	max-width: 1040px;
	padding: 18px 22px;
	background: var(--cr-cookie-ink);
	color: #ffffff;
	border: 1px solid var(--cr-cookie-ink-deep);
	border-left: 4px solid var(--cr-cookie-red);
	--cr-cookie-focus: var(--cr-cookie-link-on-dark);
	border-radius: var(--cr-cookie-radius);
	box-shadow: var(--cr-cookie-shadow);
	font-size: 14px;
	line-height: 1.5;
}

.cr-cookie-banner__body {
	flex: 1 1 auto;
	min-width: 0;
}

.cr-cookie-banner__title {
	margin: 0 0 4px;
	font-family: var(--cr-cookie-title-font);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.cr-cookie-banner__text {
	margin: 0;
	color: var(--cr-cookie-text-on-dark);
}

.cr-cookie-banner a,
.cr-cookie-modal a {
	color: var(--cr-cookie-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cr-cookie-banner a {
	color: var(--cr-cookie-link-on-dark);
}

.cr-cookie-banner a:hover,
.cr-cookie-modal a:hover {
	text-decoration-thickness: 2px;
}

.cr-cookie-banner__actions {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

/* ---------- buttons ---------- */
.cr-cookie-btn {
	appearance: none;
	min-height: 42px;
	padding: 10px 16px;
	border-radius: 4px;
	border: 1px solid var(--cr-cookie-line);
	background: transparent;
	color: var(--cr-cookie-ink);
	font: inherit;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.cr-cookie-btn:hover {
	border-color: var(--cr-cookie-ink);
	background: rgba(26, 32, 39, .06);
}

/* Secondary buttons on the dark banner */
.cr-cookie-banner .cr-cookie-btn--ghost {
	border-color: rgba(255, 255, 255, .45);
	color: #ffffff;
}

.cr-cookie-banner .cr-cookie-btn--ghost:hover {
	border-color: var(--cr-cookie-link-on-dark);
	background: rgba(223, 31, 44, .18);
}

.cr-cookie-btn:active {
	transform: translateY(1px);
}

.cr-cookie-btn:focus-visible,
.cr-cookie-fab:focus-visible,
.cr-cookie-modal__close:focus-visible,
.cr-cookie-toggle input:focus-visible + .cr-cookie-toggle__track {
	outline: 3px solid var(--cr-cookie-focus);
	outline-offset: 2px;
}

.cr-cookie-btn--primary {
	background: var(--cr-cookie-red);
	border-color: var(--cr-cookie-red);
	color: var(--cr-cookie-red-ink);
	font-weight: 700;
}

.cr-cookie-btn--primary:hover {
	background: var(--cr-cookie-red-hover);
	border-color: var(--cr-cookie-red-hover);
	color: var(--cr-cookie-red-ink);
}

/* ---------- FAB ---------- */
.cr-cookie-fab {
	position: fixed;
	left: var(--cr-cookie-offset);
	bottom: calc(var(--cr-cookie-offset) + var(--cr-cookie-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: calc(var(--cr-cookie-z) - 1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: var(--cr-cookie-red);
	color: var(--cr-cookie-red-ink);
	box-shadow: 0 6px 18px rgba(14, 17, 20, .35);
	cursor: pointer;
	transition: transform .2s var(--cr-cookie-ease), background-color .15s ease;
}

.cr-cookie-fab:hover {
	background: var(--cr-cookie-ink-deep);
	color: var(--cr-cookie-link-on-dark);
	transform: scale(1.06);
}

/* ---------- modal ---------- */
.cr-cookie-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--cr-cookie-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity .3s ease;
}

.cr-cookie-modal.is-open {
	opacity: 1;
}

.cr-cookie-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(14, 17, 20, .65);
}

.cr-cookie-modal__card {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	background: var(--cr-cookie-surface);
	color: var(--cr-cookie-ink);
	border-top: 4px solid var(--cr-cookie-red);
	border-radius: var(--cr-cookie-radius);
	box-shadow: var(--cr-cookie-shadow);
	font-size: 14px;
	line-height: 1.5;
	transform: translateY(12px) scale(.98);
	transition: transform .35s var(--cr-cookie-ease);
}

.cr-cookie-modal.is-open .cr-cookie-modal__card {
	transform: none;
}

.cr-cookie-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.cr-cookie-modal__title {
	margin: 0;
	font-family: var(--cr-cookie-title-font);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.cr-cookie-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cr-cookie-muted);
	cursor: pointer;
}

.cr-cookie-modal__close:hover {
	background: rgba(26, 32, 39, .08);
	color: var(--cr-cookie-ink);
}

.cr-cookie-modal__intro {
	margin: 0 0 16px;
	color: var(--cr-cookie-muted);
}

.cr-cookie-modal__list {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--cr-cookie-line);
}

.cr-cookie-modal__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--cr-cookie-line);
}

.cr-cookie-modal__cat-title {
	margin: 0 0 2px;
	font-weight: 700;
}

.cr-cookie-modal__cat-title label {
	margin: 0;
	font-weight: inherit;
	cursor: pointer;
}

.cr-cookie-modal__cat-text {
	margin: 0;
	color: var(--cr-cookie-muted);
	font-size: 13px;
}

.cr-cookie-modal__locked {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(26, 32, 39, .08);
	color: var(--cr-cookie-ink);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.cr-cookie-modal__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

/* ---------- toggle ---------- */
.cr-cookie-toggle {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
}

.cr-cookie-toggle input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.cr-cookie-toggle__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #8a919c;
	transition: background-color .2s ease;
}

.cr-cookie-toggle__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s var(--cr-cookie-ease);
}

.cr-cookie-toggle input:checked + .cr-cookie-toggle__track {
	background: var(--cr-cookie-red);
}

.cr-cookie-toggle input:checked + .cr-cookie-toggle__track::after {
	transform: translateX(20px);
}

/* ---------- small screens ---------- */
@media (max-width: 767px) {
	.cr-cookie-banner {
		left: 8px;
		right: 8px;
		bottom: calc(8px + var(--cr-cookie-bottom) + env(safe-area-inset-bottom, 0px));
	}

	.cr-cookie-banner__card {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}

	.cr-cookie-banner__actions {
		flex-wrap: wrap;
	}

	.cr-cookie-banner__actions .cr-cookie-btn {
		flex: 1 1 30%;
		padding-left: 10px;
		padding-right: 10px;
	}

	.cr-cookie-modal__foot {
		flex-direction: column-reverse;
	}

	.cr-cookie-modal__foot .cr-cookie-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cr-cookie-banner,
	.cr-cookie-modal,
	.cr-cookie-modal__card,
	.cr-cookie-fab,
	.cr-cookie-toggle__track,
	.cr-cookie-toggle__track::after {
		transition: none;
	}
}

/* ---------- consent-gated embeds (Google Maps iframe with data-cr-consent-src; none on the site today) ---------- */
.cr-embed-load {
	display: block;
	margin: 12px auto;
}
