/**
 * CookieGate — DPDP Cookie Consent & Data Principal Rights
 * Developed & maintained by: Vijaya Kumar L, Lead Application Engineering, CIEL HR
 * © 2026 CIEL HR. Internal use only — not for sale or redistribution.
 *
 * ckg-banner.css: the consent card (EzyComp-compact design), loaded into the #ckg-root
 * Shadow DOM so page CSS cannot leak in or out. Colour variables (--ckg-*) are injected by
 * the JS; logical properties keep it RTL-ready; motion respects prefers-reduced-motion.
 *
 * THEME-PROOF SIZING: :host carries a FIXED font-size and EVERY size below is in px — never
 * rem/em — so the banner is pixel-identical whatever the theme sets on <html> (10px, 16px,
 * 20px, 62.5%). --ckg-top is the WP-admin-bar height (0 when absent) set by ckg-banner.js so
 * top-anchored layouts and the max-height clear the admin bar.
 */

/* --- Self-hosted Inter (the banner's shadow root only links THIS stylesheet, so the
 * @font-face must live here too). url() resolves relative to assets/css/. --- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/inter-700.woff2") format("woff2");
}

:host {
	all: initial;
	/* Fixed base so em/inherited sizes never follow the theme's html font-size. */
	font-size: 14px;
	line-height: 1.45;
	--ckg-primary: #0363FC;
	--ckg-primary-text: #FFFFFF;
	--ckg-surface: #FFFFFF;
	--ckg-text: #0A1931;
	--ckg-muted: #5B6475;
	--ckg-border: #E2E6ED;
	--ckg-success: #0D7A5F;
	--ckg-warning: #C47A00;
	--ckg-danger: #C62828;
	--ckg-radius: 14px;
	--ckg-top: 0px; /* WP admin-bar height; set by ckg-banner.js */
	--ckg-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ckg-primary-hover: color-mix(in srgb, var(--ckg-primary) 88%, #000);
	font-family: var(--ckg-font);
}

/* Universal font + box rule so the theme font/box model can never bleed into the banner. */
:host *,
.ckg-scope,
.ckg-scope * {
	box-sizing: border-box;
	font-family: var(--ckg-font);
}
.ckg-scope {
	color: var(--ckg-text);
	line-height: 1.45;
	font-size: 14px;
}

/* --- backdrop (popup_center only) ----------------------------------------- */
.ckg-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2099;
	background: rgba(8, 15, 35, 0.45);
}

/* --- card shell ----------------------------------------------------------- */
.ckg-card {
	position: fixed;
	z-index: 2100;
	inset-block-end: 16px;
	inset-inline-start: 16px;
	inline-size: 400px;
	max-inline-size: calc(100vw - 32px);
	max-block-size: calc(100vh - var(--ckg-top, 0px) - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--ckg-surface);
	border: 1px solid var(--ckg-border);
	border-radius: var(--ckg-radius);
	box-shadow: 0 18px 48px -14px rgba(2, 6, 23, 0.32);
	padding: 20px;
}

/* Layout variants (all share the card component). v1.1 adds Box 4-positions + Banner
 * top/bottom + Popup; legacy v1.0 names are aliased in the JS and kept here too. */
.ckg-layout-card_bottom_right,
.ckg-layout-box_bottom_right {
	inset-inline-start: auto;
	inset-inline-end: 16px;
}
.ckg-layout-box_top_left {
	inset-block-end: auto;
	inset-block-start: calc(var(--ckg-top, 0px) + 16px);
}
.ckg-layout-box_top_right {
	inset-block-end: auto;
	inset-block-start: calc(var(--ckg-top, 0px) + 16px);
	inset-inline-start: auto;
	inset-inline-end: 16px;
}
.ckg-layout-popup_center,
.ckg-layout-popup {
	inset-block-end: auto;
	inset-inline-start: 50%;
	inset-block-start: calc(50% + (var(--ckg-top, 0px) / 2));
	transform: translate(-50%, -50%);
	inline-size: 420px;
}
/* Full-width banner bars (top / bottom). */
.ckg-layout-bar_bottom,
.ckg-layout-banner_bottom {
	inset-inline: 16px;
	inset-block-end: 16px;
	inline-size: auto;
	max-inline-size: none;
}
.ckg-layout-banner_top {
	inset-inline: 16px;
	inset-block-start: calc(var(--ckg-top, 0px) + 16px);
	inset-block-end: auto;
	inline-size: auto;
	max-inline-size: none;
}
.ckg-layout-bar_bottom .ckg-head,
.ckg-layout-banner_bottom .ckg-head,
.ckg-layout-banner_top .ckg-head { margin-bottom: 8px; }

/* EzyComp bar — a compact, centred bottom bar (max ~1120px) matching the EzyComp consent UI. */
.ckg-layout-ezycomp_bar {
	inset-inline: 16px;
	margin-inline: auto;
	inset-block-end: 16px;
	inline-size: auto;
	max-inline-size: 1120px;
	padding: 18px 24px;
}
.ckg-layout-ezycomp_bar .ckg-head { margin-bottom: 8px; }

/* On wide viewports a banner lays notice + actions side by side. */
@media (min-width: 880px) {
	.ckg-layout-banner_top .ckg-actions,
	.ckg-layout-banner_bottom .ckg-actions,
	.ckg-layout-ezycomp_bar .ckg-actions {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	.ckg-layout-banner_top .ckg-decide,
	.ckg-layout-banner_bottom .ckg-decide,
	.ckg-layout-ezycomp_bar .ckg-decide {
		inline-size: auto;
	}
}

/* --- close × (A2: visible circular button) -------------------------------- */
.ckg-close {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	inline-size: 32px;
	block-size: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ckg-text) 7%, var(--ckg-surface));
	color: var(--ckg-muted);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.ckg-close svg { inline-size: 16px; block-size: 16px; }
.ckg-close:hover { background: color-mix(in srgb, var(--ckg-text) 15%, var(--ckg-surface)); color: var(--ckg-text); }
.ckg-close:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }

/* --- header --------------------------------------------------------------- */
.ckg-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
/* When the close × is shown it sits absolutely at the top-right of the card; push the
 * language pill clear of it so they never overlap. */
.ckg-close + .ckg-head .ckg-head-lang { margin-inline-end: 34px; }
.ckg-head-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 32px;
	block-size: 32px;
	border-radius: 8px;
	background: var(--ckg-primary);
}
.ckg-ico { display: inline-flex; inline-size: 18px; block-size: 18px; }
.ckg-ico svg { inline-size: 100%; block-size: 100%; display: block; }
.ckg-ico-sm { display: inline-flex; inline-size: 13px; block-size: 13px; vertical-align: middle; }
.ckg-ico-sm svg { inline-size: 100%; block-size: 100%; display: block; }
.ckg-title {
	flex: 1 1 auto;
	min-inline-size: 0;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 0;
	color: var(--ckg-text);
}
.ckg-title:focus { outline: none; }
.ckg-head-lang { flex: 0 0 auto; }

/* --- language dropdown (styled; replaces the native <select>) -------------- */
.ckg-lang { position: relative; display: inline-flex; }
.ckg-lang-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 7px;
	border: 1px solid var(--ckg-border);
	border-radius: 6px;
	background: #F6F8FB;
	color: var(--ckg-muted);
	font-size: 11px;
	line-height: 1.2;
	font-family: var(--ckg-font);
	cursor: pointer;
}
.ckg-lang-btn:hover { background: color-mix(in srgb, var(--ckg-text) 5%, #F6F8FB); }
.ckg-lang-btn:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }
.ckg-lang-name { font-weight: 600; }
.ckg-lang-chev { display: inline-flex; inline-size: 12px; block-size: 12px; transition: transform 0.15s ease; }
.ckg-lang-chev svg { inline-size: 100%; block-size: 100%; }
.ckg-lang-btn[aria-expanded="true"] .ckg-lang-chev { transform: rotate(180deg); }

/* The menu is position:fixed and appended to the shadow root (NOT the card) so the card's
 * overflow:auto can never clip it; ckg-banner.js computes top/left and flips it above the
 * pill when there isn't room below. */
.ckg-lang-menu {
	position: fixed;
	z-index: 2147483000;
	background: var(--ckg-surface);
	color: var(--ckg-text);
	border: 1px solid var(--ckg-border);
	border-radius: 10px;
	box-shadow: 0 16px 40px -12px rgba(2, 6, 23, 0.35);
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	overflow: hidden;
}
.ckg-lang-search {
	inline-size: 100%;
	padding: 7px 9px;
	font-size: 13px;
	font-family: var(--ckg-font);
	color: var(--ckg-text);
	background: var(--ckg-surface);
	border: 1px solid var(--ckg-border);
	border-radius: 7px;
	box-sizing: border-box;
}
.ckg-lang-search:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 1px; }
.ckg-lang-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; -webkit-overflow-scrolling: touch; }
.ckg-lang-opt {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 7px 9px;
	border-radius: 7px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.3;
}
.ckg-lang-opt:hover,
.ckg-lang-opt.is-active { background: color-mix(in srgb, var(--ckg-primary) 10%, transparent); }
.ckg-lang-opt.is-selected { background: color-mix(in srgb, var(--ckg-primary) 14%, transparent); }
.ckg-lang-opt-native { font-weight: 600; color: var(--ckg-text); }
.ckg-lang-opt-en { font-size: 11px; color: var(--ckg-muted); }
.ckg-lang-empty { padding: 8px 9px; font-size: 12px; color: var(--ckg-muted); }

/* --- body text ------------------------------------------------------------ */
.ckg-body {
	font-size: 14px;
	line-height: 1.45;
	color: var(--ckg-muted);
	margin: 0 0 10px;
}
.ckg-dpo { margin-top: -4px; }
.ckg-gov {
	font-size: 12px;
	line-height: 1.45;
	color: var(--ckg-muted);
	margin: 0 0 12px;
}
.ckg-ext {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: var(--ckg-primary);
	text-decoration: underline;
}
.ckg-ext:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; border-radius: 3px; }

/* --- "Do Not Share" opt-out row (item 2) ---------------------------------- */
.ckg-dns {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--ckg-text);
	margin: 0 0 12px;
	cursor: pointer;
}
.ckg-dns-cb {
	inline-size: 16px;
	block-size: 16px;
	margin: 1px 0 0;
	accent-color: var(--ckg-primary);
	flex: 0 0 auto;
	cursor: pointer;
}

/* --- keyboard-shortcut hint badge on the Accept / Reject buttons (item 2) --
   Stacked UNDER the label so the compact 400px button row never overflows. */
.ckg-btn-kbd {
	flex-direction: column;
	gap: 2px;
	padding-block: 5px;
	line-height: 1.1;
}
.ckg-kbd {
	display: block;
	padding: 1px 5px;
	font-size: 10px;
	line-height: 1.4;
	font-family: inherit;
	font-weight: 500;
	border-radius: 4px;
	border: 1px solid currentColor;
	/* Full currentColor (no opacity) so the shortcut hint keeps AA contrast on the primary
	 * button (white on #0363fc = 4.94:1); the 1px border keeps it visually subtle. */
	opacity: 0.85;
}
.ckg-btn-primary .ckg-kbd {
	opacity: 1;
}

/* --- under-18 amber strip ------------------------------------------------- */
.ckg-age {
	background: #FFF7ED;
	border: 1px solid #FCD9B6;
	border-radius: 9px;
	padding: 9px 11px;
	font-size: 12px;
	line-height: 1.45;
	color: #9A3412;
	margin: 0 0 12px;
}
.ckg-u18-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: #B45309;
	text-decoration: underline;
	cursor: pointer;
}
.ckg-u18-link:focus-visible { outline: 2px solid #B45309; outline-offset: 2px; }

/* --- inline customize list (legacy inline customise before the pref-centre) --- */
.ckg-customize {
	border: 1px solid var(--ckg-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin: 0 0 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ckg-tg-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.ckg-tg-text { flex: 1 1 auto; min-inline-size: 0; }
.ckg-tg-title { display: block; font-weight: 600; font-size: 13px; color: var(--ckg-text); }
.ckg-always { color: var(--ckg-muted); font-weight: 600; font-size: 12px; }
.ckg-tg-desc { display: block; color: var(--ckg-muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }/* toggle switch (compact 36x20) — IDENTICAL in every visitor stylesheet so the combined
 * web-app bundle (which concatenates them) has no conflicting rule. Markup:
 * label.ckg-switch > input + span.ckg-switch-track > span.ckg-switch-thumb. */
.ckg-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.ckg-switch input { position: absolute; inset: 0; width: 36px; height: 20px; opacity: 0; margin: 0; cursor: pointer; }
.ckg-switch.is-locked input { cursor: not-allowed; }
.ckg-switch-track { position: absolute; inset: 0; background: #cbd2dd; border: 1px solid #b4bdcc; border-radius: 999px; box-sizing: border-box; transition: background 0.15s ease, border-color 0.15s ease; }
.ckg-switch-thumb { position: absolute; top: 50%; inset-inline-start: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transform: translateY(-50%); transition: transform 0.15s ease; box-shadow: 0 1px 3px rgba(10, 25, 49, 0.35); }
.ckg-switch input:checked + .ckg-switch-track { background: var(--ckg-primary); border-color: var(--ckg-primary); }
.ckg-switch input:checked + .ckg-switch-track .ckg-switch-thumb { transform: translate(16px, -50%); }
.ckg-switch.is-locked .ckg-switch-track { background: var(--ckg-primary); border-color: var(--ckg-primary); opacity: 0.9; }
.ckg-switch.is-locked .ckg-switch-thumb { transform: translate(16px, -50%); }
.ckg-switch input:focus-visible + .ckg-switch-track { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }
[dir="rtl"] .ckg-switch-thumb { inset-inline-start: auto; inset-inline-end: 2px; }
[dir="rtl"] .ckg-switch input:checked + .ckg-switch-track .ckg-switch-thumb,
[dir="rtl"] .ckg-switch.is-locked .ckg-switch-thumb { transform: translate(-16px, -50%); }

/* --- actions -------------------------------------------------------------- */
.ckg-actions {
	display: flex;
	flex-direction: column-reverse; /* default: decide on top, ghosts below */
	gap: 10px;
}
.ckg-actions.is-customizing { flex-direction: column; } /* ghosts · save · decide */
.ckg-ghosts {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-start;
}
.ckg-decide {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	inline-size: 100%;
}

/* Buttons: 40px tall / 14px (44px tap target on mobile). */
.ckg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 40px;
	inline-size: 100%;
	min-inline-size: 0;
	padding: 0 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.15;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.ckg-btn-outline {
	border: 1.5px solid var(--ckg-primary);
	background: transparent;
	color: var(--ckg-primary);
}
.ckg-btn-outline:hover { background: color-mix(in srgb, var(--ckg-primary) 8%, transparent); }
/* Secondary = neutral outlined, used for Reject/Save so the primary Accept stands out. */
.ckg-btn-secondary {
	border: 1.5px solid var(--ckg-border);
	background: var(--ckg-surface);
	color: var(--ckg-text);
}
.ckg-btn-secondary:hover { background: color-mix(in srgb, var(--ckg-text) 4%, var(--ckg-surface)); }
.ckg-btn-primary,
.ckg-save {
	border: 1.5px solid var(--ckg-primary);
	background: var(--ckg-primary);
	color: var(--ckg-primary-text);
}
.ckg-btn-primary:hover,
.ckg-save:hover { background: var(--ckg-primary-hover); }
.ckg-btn:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }

/* Ghost buttons: no border/fill/underline, icon + label on one row. */
.ckg-ghost {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-block-size: 40px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ckg-primary);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.15;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s ease;
}
.ckg-ghost:hover { background: color-mix(in srgb, var(--ckg-primary) 8%, transparent); }
.ckg-ghost:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }

/* --- aria-live region (visually hidden) ----------------------------------- */
.ckg-live {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- floating cookie icon (44px) ------------------------------------------ */
.ckg-fab {
	position: fixed;
	inset-block-end: 16px;
	z-index: 2000;
	inline-size: 44px;
	block-size: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--ckg-fab-bg, var(--ckg-primary));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(3, 99, 252, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease, background 0.15s ease;
}
.ckg-fab-left { inset-inline-start: 16px; }
.ckg-fab-right { inset-inline-end: 16px; }
.ckg-fab:hover { background: var(--ckg-primary-hover); transform: translateY(-2px); }
.ckg-fab:focus-visible { outline: 3px solid var(--ckg-primary); outline-offset: 3px; }
.ckg-fab .ckg-ico { inline-size: 22px; block-size: 22px; }
.ckg-fab-img { inline-size: 24px; block-size: 24px; object-fit: contain; display: block; }

/* --- custom notice logo --------------------------------------------------- */
.ckg-head-logo {
	flex: 0 0 auto;
	max-inline-size: 140px;
	max-block-size: 36px;
	inline-size: auto;
	block-size: auto;
	object-fit: contain;
}

/* --- blocked-content placeholder demo (editor preview) -------------------- */
.ckg-blocked-demo {
	border: 1px dashed var(--ckg-blocked-border, var(--ckg-border));
	background: var(--ckg-blocked-bg, var(--ckg-tint));
	color: var(--ckg-blocked-text, var(--ckg-text));
	border-radius: 10px;
	padding: 16px;
	text-align: center;
}
.ckg-blocked-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: inherit; }
.ckg-blocked-msg { margin: 0 0 12px; font-size: 13px; color: inherit; }
.ckg-blocked-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* --- narrow + mobile bottom sheet ----------------------------------------- */
@media (max-width: 339px) {
	.ckg-decide { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.ckg-card.ckg-layout-card_bottom_left,
	.ckg-card.ckg-layout-card_bottom_right,
	.ckg-card.ckg-layout-bar_bottom,
	.ckg-card.ckg-layout-banner_bottom,
	.ckg-card.ckg-layout-ezycomp_bar {
		inset-inline: 0;
		margin-inline: 0;
		inset-block-end: 0;
		inline-size: 100%;
		max-inline-size: 100%;
		max-block-size: 85vh;
		border-inline: none;
		border-block-end: none;
		border-radius: 16px 16px 0 0;
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
	}
	.ckg-layout-popup_center { inline-size: calc(100vw - 24px); }
	/* 44px tap targets on mobile. */
	.ckg-btn, .ckg-ghost { min-block-size: 44px; }
	.ckg-close, .ckg-pc-close { inline-size: 44px; block-size: 44px; }
	.ckg-ghosts { width: 100%; justify-content: center; }
	/* EzyComp bar on mobile: stack the action row and make Reject/Accept full width. */
	.ckg-card.ckg-layout-ezycomp_bar .ckg-actions { flex-direction: column; align-items: stretch; }
	.ckg-card.ckg-layout-ezycomp_bar .ckg-decide { grid-template-columns: 1fr; inline-size: 100%; }
}

/* ======================= preference centre — COMPACT CARD ================= */
/* The "Customize" UI (before consent) is a COMPACT CARD — never a full-height sidebar.
 * Same footprint as the banner (≤420px), max 80vh, scrolls inside, sticky footer. */
.ckg-pc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2099;
	background: rgba(8, 15, 35, 0.45);
}
.ckg-pc {
	position: fixed;
	z-index: 2100;
	display: flex;
	flex-direction: column;
	inset-block-end: 16px;
	inset-inline-start: 16px;
	inline-size: 420px;
	max-inline-size: calc(100vw - 32px);
	max-block-size: min(80vh, calc(100vh - var(--ckg-top, 0px) - 32px));
	background: var(--ckg-surface);
	color: var(--ckg-text);
	border: 1px solid var(--ckg-border);
	border-radius: var(--ckg-radius);
	box-shadow: 0 18px 48px -14px rgba(2, 6, 23, 0.4);
	overscroll-behavior: contain;
}
/* The admin can still pick where it anchors — but it stays a compact card, never full height. */
.ckg-pc-center {
	inset-block-end: auto;
	inset-inline-start: 50%;
	inset-block-start: calc(50% + (var(--ckg-top, 0px) / 2));
	transform: translate(-50%, -50%);
}
.ckg-pc-sidebar.ckg-pc-right,
.ckg-pc-right { inset-inline-start: auto; inset-inline-end: 16px; }
.ckg-pc-sidebar.ckg-pc-left,
.ckg-pc-left { inset-inline-start: 16px; inset-inline-end: auto; }
.ckg-pc-pushdown {
	inset-block-end: auto;
	inset-block-start: calc(var(--ckg-top, 0px) + 16px);
	inset-inline-start: 50%;
	transform: translateX(-50%);
}

.ckg-pc-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-block-end: 1px solid var(--ckg-border);
	flex: 0 0 auto;
}
.ckg-pc-title { flex: 1 1 auto; margin: 0; font-size: 16px; font-weight: 600; }
.ckg-pc-title:focus { outline: none; }
.ckg-pc-close {
	flex: 0 0 auto;
	inline-size: 32px;
	block-size: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ckg-text) 7%, var(--ckg-surface));
	color: var(--ckg-muted);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.ckg-pc-close svg { inline-size: 16px; block-size: 16px; }
.ckg-pc-close:hover { background: color-mix(in srgb, var(--ckg-text) 15%, var(--ckg-surface)); color: var(--ckg-text); }
.ckg-pc-close:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }

.ckg-pc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ckg-pc-overview {
	margin: 0;
	color: var(--ckg-muted);
	font-size: 13px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ckg-pc-overview.is-expanded {
	-webkit-line-clamp: unset;
	display: block;
	overflow: visible;
}
.ckg-pc-more {
	align-self: flex-start;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--ckg-primary);
	text-decoration: underline;
	cursor: pointer;
}
.ckg-pc-more:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: 2px; }

.ckg-pc-accs { display: flex; flex-direction: column; gap: 6px; }
.ckg-pc-acc { border: 1px solid var(--ckg-border); border-radius: 9px; overflow: hidden; }
/* Header row ~48px: the expand button fills the row; the toggle is a sibling on the right. */
.ckg-pc-acc-row { display: flex; align-items: center; gap: 8px; padding-inline-end: 12px; min-block-size: 48px; }
.ckg-pc-acc-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-inline-size: 0;
	padding: 12px;
	background: transparent;
	border: 0;
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	color: var(--ckg-text);
	text-align: start;
	cursor: pointer;
}
.ckg-pc-acc-head:focus-visible { outline: 2px solid var(--ckg-primary); outline-offset: -2px; }
.ckg-pc-chev { display: inline-flex; inline-size: 15px; block-size: 15px; transition: transform 0.2s ease; }
.ckg-pc-chev svg { inline-size: 100%; block-size: 100%; }
.ckg-pc-acc-head[aria-expanded="true"] .ckg-pc-chev { transform: rotate(90deg); }
.ckg-pc-acc-name { flex: 1 1 auto; min-inline-size: 0; }
.ckg-pc-always { color: var(--ckg-muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.ckg-pc-switch { flex: none; }
.ckg-pc-acc-panel { padding: 0 12px 12px; }
.ckg-pc-acc-desc { margin: 0 0 8px; color: var(--ckg-muted); font-size: 12px; line-height: 1.45; }
.ckg-pc-ct-wrap { overflow-x: auto; border: 1px solid var(--ckg-border); border-radius: 8px; }
.ckg-pc-ct { inline-size: 100%; border-collapse: collapse; font-size: 12px; }
.ckg-pc-ct th, .ckg-pc-ct td { text-align: start; padding: 6px 8px; border-block-end: 1px solid var(--ckg-border); }
.ckg-pc-ct th { background: #F6F8FB; color: var(--ckg-muted); font-weight: 700; }
.ckg-pc-ct tr:last-child td { border-block-end: 0; }

/* Sticky footer: Accept all prominent (full width), Reject + Save in a compact row above.
 * Two rows so the long labels never wrap or truncate on a ≤420px card. */
.ckg-pc-foot {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	/* Equal padding on all sides so "Accept all" never touches the card edge (2.2.5 bug 5). */
	padding: 16px;
	padding-block-end: calc(16px + env(safe-area-inset-bottom));
	border-block-start: 1px solid var(--ckg-border);
	background: var(--ckg-surface);
}
.ckg-pc-foot .ckg-btn {
	min-block-size: 40px;
	padding-inline: 10px;
	font-size: 13px;
	line-height: 1.2;
	white-space: nowrap;
	text-align: center;
}
/* Accept all (primary) spans the full width on its own row. */
.ckg-pc-foot .ckg-btn-primary,
.ckg-pc-foot .ckg-save { grid-column: 1 / -1; }

@media (max-width: 480px) {
	.ckg-pc,
	.ckg-pc-center,
	.ckg-pc-sidebar,
	.ckg-pc-pushdown {
		inset: auto 0 0 0;
		inline-size: 100%;
		max-inline-size: 100%;
		max-block-size: 85vh;
		transform: none;
		border-radius: 16px 16px 0 0;
		border-inline: none;
		border-block-end: none;
	}
	.ckg-pc-foot .ckg-btn { min-block-size: 44px; }
	.ckg-card.ckg-layout-box_top_left,
	.ckg-card.ckg-layout-box_top_right,
	.ckg-card.ckg-layout-banner_top {
		inset-inline: 0;
		inset-block-start: var(--ckg-top, 0px);
		inset-block-end: auto;
		inline-size: 100%;
		max-inline-size: 100%;
		border-inline: none;
		border-radius: 0 0 16px 16px;
	}
}

/* --- dark scheme (A3): token colours come from ckg-banner.js cssVars(); these override
 * the few HARDCODED light surfaces so dark looks designed, not inverted. ----- */
:host([data-scheme="dark"]) .ckg-lang-btn { background: color-mix(in srgb, var(--ckg-text) 10%, var(--ckg-surface)); }
:host([data-scheme="dark"]) .ckg-lang-btn:hover { background: color-mix(in srgb, var(--ckg-text) 16%, var(--ckg-surface)); }
:host([data-scheme="dark"]) .ckg-pc-ct th { background: color-mix(in srgb, var(--ckg-text) 8%, var(--ckg-surface)); }
:host([data-scheme="dark"]) .ckg-age { background: #2A1E10; border-color: #5A3E1E; color: #F4C98A; }
:host([data-scheme="dark"]) .ckg-u18-link { color: #F4C98A; }
:host([data-scheme="dark"]) .ckg-u18-link:focus-visible { outline-color: #F4C98A; }
:host([data-scheme="dark"]) .ckg-switch-track { background: #3A4660; border-color: #4A587A; }

/* --- reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
}
