/* Cookie Consent Popup – front end */
#ccp-root {
	--ccp-bg: #fff;
	--ccp-heading: #0c122d;
	--ccp-text: #575c74;
	--ccp-btn-bg: #1b5fc1;
	--ccp-btn-text: #fff;
	--ccp-accent: #28bd86;
	--ccp-font-heading: inherit;
	--ccp-font-body: inherit;
	--ccp-font-button: inherit;
	--ccp-radius: 6px;
	--ccp-btn-shadow: none;
	--ccp-border: rgba(12, 18, 45, 0.14);
	--ccp-z: 2147483000;
	font-family: var(--ccp-font-body);
	font-size: 15px;
	line-height: 1.65;
	color: var(--ccp-text);
}

#ccp-root [hidden] { display: none !important; }
#ccp-root *, #ccp-root *::before, #ccp-root *::after { box-sizing: border-box; }
html.ccp-lock { overflow: hidden; }

/* ---------------------------------------------------------------- */
/* Buttons                                                           */
/* ---------------------------------------------------------------- */

#ccp-root .ccp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 20px;
	border: 1px solid var(--ccp-btn-bg);
	border-radius: var(--ccp-radius);
	background: var(--ccp-btn-bg);
	color: var(--ccp-btn-text);
	font-family: var(--ccp-font-button);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	box-shadow: var(--ccp-btn-shadow);
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}
#ccp-root .ccp-btn:hover { filter: brightness(0.9); transform: translateY(-1px); }
#ccp-root .ccp-btn:focus-visible,
#ccp-root .ccp-modal__close:focus-visible,
#ccp-root .ccp-revisit:focus-visible,
#ccp-root a:focus-visible {
	outline: 2px solid var(--ccp-btn-bg);
	outline-offset: 2px;
}
#ccp-root .ccp-btn--outline {
	background: var(--ccp-bg);
	color: var(--ccp-btn-bg);
	border-color: var(--ccp-btn-bg);
	box-shadow: none;
}
#ccp-root .ccp-btn--outline:hover { filter: none; background: var(--ccp-btn-bg); color: var(--ccp-btn-text); }

/* ---------------------------------------------------------------- */
/* Banner (first layer)                                              */
/* ---------------------------------------------------------------- */

#ccp-root .ccp-banner {
	position: fixed;
	z-index: var(--ccp-z);
	background: var(--ccp-bg);
	color: var(--ccp-text);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
#ccp-root.ccp-is-visible .ccp-banner { opacity: 1; transform: none; }

#ccp-root .ccp-banner__title {
	margin: 0 0 10px;
	padding: 0;
	color: var(--ccp-heading);
	font-family: var(--ccp-font-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}
#ccp-root .ccp-banner__text p { margin: 0 0 8px; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; }
#ccp-root .ccp-banner__text p:last-child { margin-bottom: 0; }
#ccp-root .ccp-banner__text a,
#ccp-root .ccp-modal a {
	color: var(--ccp-btn-bg);
	text-decoration: underline;
	text-underline-offset: 2px;
}
#ccp-root .ccp-banner__actions {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Layout: full-width bottom bar (default) */
#ccp-root.ccp--bar .ccp-banner {
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 90vh;
	overflow-y: auto;
	border-top: 4px solid var(--ccp-btn-bg);
	box-shadow: 0 -8px 30px rgba(12, 18, 45, 0.12);
}
#ccp-root.ccp--bar .ccp-banner__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 24px 64px;
	align-items: center;
	max-width: 1240px;
	margin: 0 auto;
	padding: 24px 20px;
}
#ccp-root.ccp--bar .ccp-banner__actions { gap: 12px; }

/* Layout: floating box */
#ccp-root.ccp--box .ccp-banner {
	left: 20px;
	bottom: 20px;
	width: 440px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	border-radius: 8px;
	box-shadow: 0 6px 32px rgba(0, 0, 0, 0.22);
}
#ccp-root.ccp--box .ccp-banner__inner { padding: 24px; }
#ccp-root.ccp--box .ccp-banner__actions { margin-top: 20px; gap: 12px; }

/* Layout: centered modal */
#ccp-root.ccp--modal .ccp-banner {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.5);
	transform: none;
}
#ccp-root.ccp--modal .ccp-banner__inner {
	width: 600px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px;
	border-radius: 8px;
	background: var(--ccp-bg);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
#ccp-root.ccp--modal .ccp-banner__actions { margin-top: 24px; gap: 12px; }

/* ---------------------------------------------------------------- */
/* Preferences modal (second layer)                                  */
/* ---------------------------------------------------------------- */

#ccp-root .ccp-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--ccp-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
#ccp-root .ccp-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(12, 18, 45, 0.55);
}
#ccp-root .ccp-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 640px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	border-radius: 8px;
	background: var(--ccp-bg);
	color: var(--ccp-text);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: ccp-pop 0.2s ease;
}
@keyframes ccp-pop { from { opacity: 0; transform: scale(0.97); } }

#ccp-root .ccp-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--ccp-border);
}
#ccp-root .ccp-modal__title {
	margin: 0;
	padding: 0;
	color: var(--ccp-heading);
	font-family: var(--ccp-font-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}
#ccp-root .ccp-modal__close {
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
#ccp-root .ccp-modal__close:hover { background: rgba(12, 18, 45, 0.06); }

#ccp-root .ccp-modal__body { padding: 16px 24px; overflow-y: auto; }
#ccp-root .ccp-modal__intro { margin: 0 0 8px; }

#ccp-root .ccp-cats { list-style: none; margin: 0; padding: 0; }
#ccp-root .ccp-cat { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--ccp-border); }
#ccp-root .ccp-cat:last-child { border-bottom: 0; }
#ccp-root .ccp-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#ccp-root .ccp-cat__label { margin: 0; color: var(--ccp-heading); font-family: var(--ccp-font-heading); font-size: 15px; font-weight: 700; cursor: pointer; }
#ccp-root .ccp-cat__always {
	padding: 3px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ccp-accent) 18%, transparent);
	color: var(--ccp-heading);
	font-family: var(--ccp-font-button);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}
#ccp-root .ccp-cat__desc { margin: 6px 0 0; font-size: 14px; }

/* Toggle switch */
#ccp-root .ccp-switch { position: relative; flex: 0 0 auto; width: 44px; height: 24px; }
#ccp-root .ccp-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
#ccp-root .ccp-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: #c9ccd6;
	transition: background-color 0.2s ease;
}
#ccp-root .ccp-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease;
}
#ccp-root .ccp-switch input:checked + .ccp-switch__track { background: var(--ccp-btn-bg); }
#ccp-root .ccp-switch input:checked + .ccp-switch__track::after { transform: translateX(20px); }
#ccp-root .ccp-switch input:focus-visible + .ccp-switch__track { outline: 2px solid var(--ccp-btn-bg); outline-offset: 2px; }

#ccp-root .ccp-modal__footer {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--ccp-border);
}

/* ---------------------------------------------------------------- */
/* Re-open button                                                    */
/* ---------------------------------------------------------------- */

#ccp-root .ccp-revisit {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: calc(var(--ccp-z) - 1);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ccp-btn-bg);
	color: var(--ccp-btn-text);
	box-shadow: 0 8px 16px -6px rgba(12, 18, 45, 0.45);
	cursor: pointer;
	transition: transform 0.15s ease;
}
#ccp-root .ccp-revisit:hover { transform: scale(1.08); }

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */

@media (max-width: 900px) {
	#ccp-root.ccp--bar .ccp-banner__inner { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
	#ccp-root.ccp--bar .ccp-banner__actions { padding-top: 0; gap: 12px; }
}

@media (max-width: 600px) {
	#ccp-root { font-size: 14px; }
	#ccp-root.ccp--bar .ccp-banner__text { max-height: 40vh; overflow-y: auto; }
	#ccp-root.ccp--box .ccp-banner { left: 10px; right: 10px; bottom: 10px; width: auto; max-width: none; }
	#ccp-root .ccp-modal { padding: 0; align-items: flex-end; }
	#ccp-root .ccp-modal__panel { max-height: 92vh; border-radius: 12px 12px 0 0; }
	#ccp-root .ccp-modal__footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	#ccp-root .ccp-banner,
	#ccp-root .ccp-modal__panel { transition: none; animation: none; }
}
