/* CN GDPR Cookie Consent */
.cncc-banner,
.cncc-prefs,
.cncc-reopen {
	--cncc-radius: 10px;
	--cncc-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--cncc-text, #1f2937);
	box-sizing: border-box;
}
.cncc-banner *,
.cncc-prefs * {
	box-sizing: border-box;
}
.cncc-banner[hidden],
.cncc-reopen[hidden],
.cncc-prefs__id[hidden] {
	display: none !important;
}

/* ---- banner ---- */
.cncc-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--cncc-bg, #fff);
	box-shadow: var(--cncc-shadow);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.cncc-banner.is-visible {
	opacity: 1;
	transform: none;
}
.cncc-pos-bottom {
	left: 0;
	right: 0;
	bottom: 0;
	border-top: 1px solid rgba(0, 0, 0, .08);
}
.cncc-pos-bottom .cncc-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	gap: 24px;
	align-items: center;
}
.cncc-pos-bottom-left,
.cncc-pos-bottom-right,
.cncc-pos-center {
	bottom: 20px;
	width: min(420px, calc(100vw - 32px));
	border-radius: var(--cncc-radius);
}
.cncc-pos-bottom-left { left: 20px; }
.cncc-pos-bottom-right { right: 20px; }
.cncc-pos-center {
	left: 50%;
	bottom: auto;
	top: 50%;
	width: min(560px, calc(100vw - 32px));
	transform: translate(-50%, -46%);
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45), var(--cncc-shadow);
}
.cncc-pos-center.is-visible { transform: translate(-50%, -50%); }
.cncc-pos-bottom-left .cncc-banner__inner,
.cncc-pos-bottom-right .cncc-banner__inner,
.cncc-pos-center .cncc-banner__inner {
	padding: 20px;
}
.cncc-banner__text { flex: 1 1 auto; }
.cncc-banner__title {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: 1.05em;
}
.cncc-banner__msg { margin: 0; }
.cncc-banner a,
.cncc-prefs a { color: var(--cncc-primary, #1d4ed8); text-decoration: underline; }
.cncc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}
.cncc-pos-bottom-left .cncc-banner__actions,
.cncc-pos-bottom-right .cncc-banner__actions,
.cncc-pos-center .cncc-banner__actions { margin-top: 14px; }

/* ---- buttons (Accept and Reject are deliberately equal in prominence) ---- */
.cncc-btn {
	appearance: none;
	border: 2px solid var(--cncc-primary, #1d4ed8);
	background: var(--cncc-primary, #1d4ed8);
	color: #fff;
	font: inherit;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1.2;
	flex: 1 1 auto;
	transition: filter .15s ease;
}
.cncc-btn:hover { filter: brightness(1.08); }
.cncc-btn--ghost {
	background: transparent;
	color: var(--cncc-primary, #1d4ed8);
}
.cncc-btn:focus-visible,
.cncc-reopen:focus-visible,
.cncc-prefs__close:focus-visible,
.cncc-link:focus-visible,
.cncc-switch input:focus-visible + .cncc-switch__ui {
	outline: 3px solid var(--cncc-primary, #1d4ed8);
	outline-offset: 2px;
}

/* ---- preferences dialog ---- */
.cncc-prefs {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 0;
	border-radius: var(--cncc-radius);
	background: var(--cncc-bg, #fff);
	box-shadow: var(--cncc-shadow);
	z-index: 2147483001;
}
.cncc-prefs::backdrop { background: rgba(0, 0, 0, .5); }
.cncc-prefs__form {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 48px);
	margin: 0;
}
.cncc-prefs__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.cncc-prefs__head h2 {
	margin: 0;
	font-size: 1.2em;
	color: inherit;
}
.cncc-prefs__close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 0 4px;
}
.cncc-prefs__body {
	padding: 8px 20px;
	overflow-y: auto;
}
.cncc-cat {
	padding: 14px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.cncc-cat:last-of-type { border-bottom: 0; }
.cncc-cat__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.cncc-cat__label { font-weight: 600; }
.cncc-cat__always {
	font-size: .8em;
	opacity: .7;
	white-space: nowrap;
}
.cncc-cat__desc {
	margin: 6px 0 0;
	font-size: .9em;
	opacity: .85;
}
.cncc-prefs__id {
	font-size: .8em;
	opacity: .7;
	margin: 10px 0;
	word-break: break-all;
}
.cncc-prefs__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 16px 20px;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

/* ---- switch ---- */
.cncc-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex: 1;
	cursor: pointer;
	position: relative;
}
.cncc-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.cncc-switch__ui {
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
	border-radius: 24px;
	background: #cbd5e1;
	position: relative;
	transition: background .2s ease;
}
.cncc-switch__ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
}
.cncc-switch input:checked + .cncc-switch__ui { background: var(--cncc-primary, #1d4ed8); }
.cncc-switch input:checked + .cncc-switch__ui::after { transform: translateX(20px); }
.cncc-switch input:disabled + .cncc-switch__ui { opacity: .55; cursor: not-allowed; }

/* ---- reopen button + shortcode link ---- */
.cncc-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--cncc-bg, #fff);
	color: var(--cncc-primary, #1d4ed8);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
	cursor: pointer;
	display: grid;
	place-items: center;
}
.cncc-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 782px) {
	.cncc-pos-bottom .cncc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}
	.cncc-pos-bottom-left,
	.cncc-pos-bottom-right {
		left: 16px;
		right: 16px;
		bottom: 16px;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cncc-banner,
	.cncc-switch__ui,
	.cncc-switch__ui::after { transition: none; }
}
