/* Vouxat Cookies — front-end banner
 * Colours are injected as CSS variables by the JS from plugin settings.
 * Dark mode follows the platform convention: html[data-theme="dark"].
 * ------------------------------------------------------------------ */

#vxc-root,
#vxc-root * {
	box-sizing: border-box;
}

#vxc-root {
	--vxc-bg: #ffffff;
	--vxc-text: #1f2430;
	--vxc-accent: #4f46e5;
	--vxc-accent-text: #ffffff;
	--vxc-secondary: #eef0f5;
	--vxc-secondary-text: #1f2430;
	--vxc-border: #e4e7ee;
	--vxc-radius: 16px;
	--vxc-muted: color-mix(in srgb, var(--vxc-text) 60%, transparent);
	--vxc-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.28), 0 8px 16px -8px rgba(15, 23, 42, 0.18);

	position: fixed;
	z-index: 2147483000; /* above app shells, modals, toasts */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--vxc-text);
	-webkit-font-smoothing: antialiased;
}

/* ---------------- Positioning ---------------- */
#vxc-root.vxc-pos-bottom-left   { left: 20px;  bottom: 20px; }
#vxc-root.vxc-pos-bottom-right  { right: 20px; bottom: 20px; }
#vxc-root.vxc-pos-bottom-center { left: 50%; bottom: 20px; transform: translateX(-50%); }
#vxc-root.vxc-pos-top           { left: 0; right: 0; top: 0; }
#vxc-root.vxc-pos-center        { inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 11, 18, 0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Bar layout spans full width */
#vxc-root.vxc-layout-bar { left: 0; right: 0; transform: none; }
#vxc-root.vxc-layout-bar.vxc-pos-top { top: 0; bottom: auto; }
#vxc-root.vxc-layout-bar:not(.vxc-pos-top) { bottom: 0; top: auto; }

/* ---------------- Card ---------------- */
.vxc-card {
	background: var(--vxc-bg);
	color: var(--vxc-text);
	border: 1px solid var(--vxc-border);
	border-radius: var(--vxc-radius);
	box-shadow: var(--vxc-shadow);
	padding: 22px 24px;
	width: 420px;
	max-width: calc(100vw - 40px);
	animation: vxc-rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#vxc-root.vxc-layout-bar .vxc-card {
	width: 100%;
	max-width: none;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 18px clamp(16px, 4vw, 48px);
}
#vxc-root.vxc-layout-bar .vxc-body { flex: 1; }
#vxc-root.vxc-layout-bar .vxc-actions { flex-shrink: 0; margin-top: 0; }

#vxc-root.vxc-pos-center .vxc-card {
	width: 480px;
	animation: vxc-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Bubble layout: compact */
#vxc-root.vxc-layout-bubble .vxc-card { width: 340px; padding: 18px 20px; }
#vxc-root.vxc-layout-bubble .vxc-title { font-size: 15px; }
#vxc-root.vxc-layout-bubble .vxc-message { font-size: 13.5px; }

/* ---------------- Typography ---------------- */
.vxc-title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.vxc-message {
	margin: 0 0 16px;
	color: var(--vxc-muted);
	font-size: 14px;
}
.vxc-message a,
.vxc-policy-link {
	color: var(--vxc-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------------- Buttons ---------------- */
.vxc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.vxc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: calc(var(--vxc-radius) * 0.6);
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
	line-height: 1.2;
	white-space: nowrap;
}
.vxc-btn:active { transform: translateY(1px) scale(0.99); }
.vxc-btn:focus-visible { outline: 2px solid var(--vxc-accent); outline-offset: 2px; }

.vxc-btn-primary {
	background: var(--vxc-accent);
	color: var(--vxc-accent-text);
	box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--vxc-accent) 70%, transparent);
}
.vxc-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--vxc-accent) 75%, transparent); }

.vxc-btn-secondary {
	background: var(--vxc-secondary);
	color: var(--vxc-secondary-text);
	border-color: var(--vxc-border);
}
.vxc-btn-secondary:hover { filter: brightness(0.97); }

.vxc-btn-ghost {
	background: transparent;
	color: var(--vxc-muted);
	padding-left: 8px;
	padding-right: 8px;
}
.vxc-btn-ghost:hover { color: var(--vxc-text); }

.vxc-btn-grow { flex: 1; min-width: 120px; }

/* Close */
.vxc-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border: none;
	background: transparent;
	color: var(--vxc-muted);
	font-size: 20px;
	cursor: pointer;
	border-radius: 8px;
	line-height: 1;
}
.vxc-close:hover { background: var(--vxc-secondary); color: var(--vxc-text); }

/* ---------------- Preferences panel ---------------- */
.vxc-prefs { display: none; margin: 4px 0 16px; }
#vxc-root.vxc-show-prefs .vxc-prefs { display: block; animation: vxc-fade 0.3s ease both; }
#vxc-root.vxc-show-prefs .vxc-message { display: none; }

.vxc-cat {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-top: 1px solid var(--vxc-border);
}
.vxc-cat:first-child { border-top: none; }
.vxc-cat-info { flex: 1; }
.vxc-cat-name { font-weight: 600; font-size: 14px; margin: 0 0 3px; }
.vxc-cat-desc { font-size: 13px; color: var(--vxc-muted); margin: 0; }

/* Toggle switch */
.vxc-toggle { position: relative; flex-shrink: 0; width: 44px; height: 26px; }
.vxc-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vxc-track {
	position: absolute;
	inset: 0;
	background: var(--vxc-border);
	border-radius: 999px;
	transition: background 0.2s ease;
	pointer-events: none;
}
.vxc-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.vxc-toggle input:checked + .vxc-track { background: var(--vxc-accent); }
.vxc-toggle input:checked + .vxc-track::after { transform: translateX(18px); }
.vxc-toggle input:disabled + .vxc-track { opacity: 0.55; cursor: not-allowed; }
.vxc-toggle input:focus-visible + .vxc-track { outline: 2px solid var(--vxc-accent); outline-offset: 2px; }

.vxc-locked {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--vxc-accent);
	align-self: center;
	white-space: nowrap;
}

/* ---------------- Floating pill ---------------- */
#vxc-pill {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: var(--vxc-secondary-text, #1f2430);
	background: var(--vxc-bg, #fff);
	border: 1px solid var(--vxc-border, #e4e7ee);
	border-radius: 999px;
	box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.25);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}
#vxc-pill:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.32); }
#vxc-pill svg { width: 16px; height: 16px; }

/* ---------------- Dark mode (platform convention) ---------------- */
html[data-theme="dark"] #vxc-root,
#vxc-root.vxc-dark {
	--vxc-bg: #161b22;
	--vxc-text: #e6edf3;
	--vxc-accent: #6366f1;
	--vxc-accent-text: #ffffff;
	--vxc-secondary: #21262d;
	--vxc-secondary-text: #e6edf3;
	--vxc-border: #30363d;
	--vxc-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.6), 0 8px 16px -8px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] #vxc-pill,
#vxc-pill.vxc-dark {
	--vxc-bg: #161b22;
	--vxc-border: #30363d;
	--vxc-secondary-text: #e6edf3;
	color: #e6edf3;
}

/* ---------------- Cookie declaration shortcode ---------------- */
.vxc-declaration .vxc-decl-row { padding: 14px 0; border-bottom: 1px solid #e4e7ee; }
.vxc-declaration h3 { margin: 0 0 4px; font-size: 16px; }
.vxc-decl-badge {
	font-size: 11px; font-weight: 600; text-transform: uppercase;
	background: #eef0f5; color: #4f46e5; padding: 2px 8px; border-radius: 6px; margin-left: 6px;
}
html[data-theme="dark"] .vxc-declaration .vxc-decl-row { border-color: #30363d; }
html[data-theme="dark"] .vxc-decl-badge { background: #21262d; color: #8b93f8; }

/* ---------------- Animations ---------------- */
@keyframes vxc-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes vxc-pop  { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes vxc-fade { from { opacity: 0; } to { opacity: 1; } }

/* bottom-center keeps its translateX while rising */
#vxc-root.vxc-pos-bottom-center .vxc-card { animation-name: vxc-rise; }

@media (prefers-reduced-motion: reduce) {
	.vxc-card, #vxc-root.vxc-show-prefs .vxc-prefs { animation: none !important; }
	.vxc-btn, #vxc-pill, .vxc-track::after { transition: none !important; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 600px) {
	#vxc-root.vxc-pos-bottom-left,
	#vxc-root.vxc-pos-bottom-right,
	#vxc-root.vxc-pos-bottom-center {
		left: 12px; right: 12px; bottom: 12px; transform: none;
	}
	.vxc-card { width: 100%; max-width: none; padding: 18px; }
	#vxc-root.vxc-layout-bar .vxc-card { flex-direction: column; align-items: stretch; gap: 14px; }
	.vxc-actions { flex-direction: column; }
	.vxc-btn { width: 100%; }
	.vxc-btn-ghost { width: auto; }
}
