/*! GDPR Cookie Notice v1.0.0 */
#gcn-root {
	--gcn-accent: #2563eb;
	--gcn-bg: #ffffff;
	--gcn-fg: #1f2937;
	--gcn-muted: #6b7280;
	--gcn-border: #e5e7eb;
	--gcn-soft: #f3f4f6;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--gcn-fg);
}
#gcn-root.gcn-theme-dark {
	--gcn-bg: #1f2937;
	--gcn-fg: #f9fafb;
	--gcn-muted: #9ca3af;
	--gcn-border: #374151;
	--gcn-soft: #111827;
}
#gcn-root *, #gcn-root *::before, #gcn-root *::after { box-sizing: border-box; }
#gcn-root [hidden] { display: none !important; }

/* ---------- Banner ---------- */
.gcn-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--gcn-bg);
	color: var(--gcn-fg);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
	animation: gcn-in .3s ease-out;
}
.gcn-pos-bottom .gcn-banner { left: 0; right: 0; bottom: 0; }
.gcn-pos-top .gcn-banner { left: 0; right: 0; top: 0; box-shadow: 0 4px 24px rgba(0, 0, 0, .12); }
.gcn-pos-box-left .gcn-banner,
.gcn-pos-box-right .gcn-banner {
	bottom: 20px;
	width: 400px;
	max-width: calc(100% - 32px);
	border-radius: 12px;
	border: 1px solid var(--gcn-border);
}
.gcn-pos-box-left .gcn-banner { left: 16px; }
.gcn-pos-box-right .gcn-banner { right: 16px; }

.gcn-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.gcn-pos-box-left .gcn-banner-inner,
.gcn-pos-box-right .gcn-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }

.gcn-text { flex: 1 1 auto; min-width: 0; }
.gcn-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; color: var(--gcn-fg); }
.gcn-message, .gcn-message p { margin: 0; color: var(--gcn-muted); font-size: 14px; }
.gcn-message p + p { margin-top: 6px; }
.gcn-policy { color: var(--gcn-accent); text-decoration: underline; margin-left: 4px; }

.gcn-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; align-items: center; }
.gcn-pos-box-left .gcn-actions,
.gcn-pos-box-right .gcn-actions { justify-content: flex-end; }

/* ---------- Buttons ---------- */
#gcn-root .gcn-btn {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 10px 18px;
	border-radius: 8px;
	border: 2px solid var(--gcn-accent);
	cursor: pointer;
	white-space: nowrap;
	transition: filter .15s, background .15s;
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	margin: 0;
}
/* Accept and Reject share size and weight so neither is a "dark pattern". */
#gcn-root .gcn-btn-primary { background: var(--gcn-accent); color: #fff; }
#gcn-root .gcn-btn-secondary { background: transparent; color: var(--gcn-accent); }
#gcn-root .gcn-theme-dark .gcn-btn-secondary,
#gcn-root.gcn-theme-dark .gcn-btn-secondary { color: var(--gcn-fg); }
#gcn-root .gcn-btn-link {
	background: none;
	border-color: transparent;
	color: var(--gcn-fg);
	text-decoration: underline;
	padding-left: 6px;
	padding-right: 6px;
}
#gcn-root .gcn-btn:hover { filter: brightness(1.08); }
#gcn-root .gcn-btn-secondary:hover { background: var(--gcn-soft); }
#gcn-root .gcn-btn:focus-visible,
#gcn-root .gcn-revoke:focus-visible,
#gcn-root .gcn-close:focus-visible { outline: 3px solid var(--gcn-accent); outline-offset: 2px; }

/* ---------- Modal ---------- */
.gcn-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	background: rgba(0, 0, 0, .5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: gcn-fade .2s ease-out;
}
.gcn-modal-box {
	position: relative;
	background: var(--gcn-bg);
	color: var(--gcn-fg);
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 14px;
	padding: 28px 24px 22px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.gcn-modal-box .gcn-title { font-size: 19px; margin-bottom: 14px; padding-right: 32px; }
#gcn-root .gcn-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--gcn-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
#gcn-root .gcn-close:hover { background: var(--gcn-soft); color: var(--gcn-fg); }

.gcn-cats { list-style: none; margin: 0 0 18px; padding: 0; }
.gcn-cat { border: 1px solid var(--gcn-border); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.gcn-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.gcn-cat-name { font-weight: 600; }
.gcn-cat-desc { margin: 6px 0 0; font-size: 13px; color: var(--gcn-muted); }
.gcn-modal .gcn-actions { justify-content: flex-end; }

/* ---------- Toggle switch ---------- */
.gcn-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.gcn-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.gcn-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 24px; transition: background .2s; }
.gcn-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.gcn-switch input:checked + .gcn-slider { background: var(--gcn-accent); }
.gcn-switch input:checked + .gcn-slider::before { transform: translateX(18px); }
.gcn-switch input:disabled + .gcn-slider { opacity: .55; }
.gcn-switch input:disabled { cursor: not-allowed; }
.gcn-switch input:focus-visible + .gcn-slider { outline: 3px solid var(--gcn-accent); outline-offset: 2px; }

/* ---------- Floating re-open button ---------- */
#gcn-root .gcn-revoke {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--gcn-border);
	background: var(--gcn-bg);
	color: var(--gcn-accent);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	opacity: .85;
}
#gcn-root .gcn-revoke:hover { opacity: 1; }
.gcn-pos-box-right .gcn-revoke { left: auto; right: 16px; }
#gcn-root.gcn-modal-open .gcn-revoke { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
	.gcn-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
	.gcn-actions { justify-content: stretch; }
	.gcn-banner .gcn-actions .gcn-btn-primary,
	.gcn-banner .gcn-actions .gcn-btn-secondary { flex: 1 1 0; }
	.gcn-banner .gcn-actions .gcn-btn-link { order: 3; flex-basis: 100%; }
	.gcn-modal .gcn-actions .gcn-btn { flex: 1 1 auto; }
}

@keyframes gcn-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gcn-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.gcn-banner, .gcn-modal { animation: none; }
}
@media print { #gcn-root { display: none !important; } }
