/* Humanoid Cookie Consent — rohová karta + modal + plávajúce tlačidlo.
   Prispôsobené svetlému aj tmavému režimu, responzívne, prístupné. */

#hcc-root {
	--hcc-accent: #2ea3f2;
	--hcc-bg: #ffffff;
	--hcc-fg: #1d2327;
	--hcc-muted: #5b616b;
	--hcc-border: rgba(0, 0, 0, .1);
	--hcc-shadow: 0 12px 40px rgba(0, 0, 0, .18);
	--hcc-radius: 14px;
}

@media (prefers-color-scheme: dark) {
	#hcc-root {
		--hcc-bg: #1e2229;
		--hcc-fg: #eaecef;
		--hcc-muted: #a6adb8;
		--hcc-border: rgba(255, 255, 255, .12);
		--hcc-shadow: 0 12px 40px rgba(0, 0, 0, .5);
	}
}

/* ---------- rohová karta (prvá vrstva) ---------- */
.hcc-card {
	position: fixed;
	bottom: 22px;
	z-index: 999999;
	width: 360px;
	max-width: calc(100vw - 32px);
	background: var(--hcc-bg);
	color: var(--hcc-fg);
	border: 1px solid var(--hcc-border);
	border-radius: var(--hcc-radius);
	box-shadow: var(--hcc-shadow);
	padding: 22px 22px 18px;
	font-size: 14px;
	line-height: 1.55;
	animation: hcc-in .25s ease;
}
#hcc-root[data-pos="right"] .hcc-card { right: 22px; }
#hcc-root[data-pos="left"] .hcc-card { left: 22px; }

@keyframes hcc-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

.hcc-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--hcc-fg); }
.hcc-text { margin: 0 0 10px; color: var(--hcc-muted); }
.hcc-policy { margin: 0 0 14px; }
.hcc-link { color: var(--hcc-accent); text-decoration: underline; }

/* ---------- tlačidlá (Prijať/Odmietnuť rovnocenné!) ---------- */
.hcc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hcc-btn {
	flex: 1 1 auto;
	min-width: 120px;
	padding: 11px 16px;
	border-radius: 9px;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s ease, background .15s ease;
}
.hcc-btn--primary { background: var(--hcc-accent); color: #fff; }
.hcc-btn--primary:hover { opacity: .88; }
.hcc-btn--ghost {
	background: transparent;
	color: var(--hcc-fg);
	border-color: var(--hcc-border);
	flex: 1 1 100%;
}
.hcc-btn--ghost:hover { background: rgba(127, 127, 127, .1); }
.hcc-btn:focus-visible { outline: 3px solid var(--hcc-accent); outline-offset: 2px; }

/* ---------- modal (druhá vrstva) ---------- */
.hcc-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: hcc-fade .2s ease;
}
@keyframes hcc-fade { from { opacity: 0; } to { opacity: 1; } }

.hcc-modal {
	background: var(--hcc-bg);
	color: var(--hcc-fg);
	border-radius: var(--hcc-radius);
	box-shadow: var(--hcc-shadow);
	width: 520px;
	max-width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 26px;
}
.hcc-cats { margin: 18px 0; }
.hcc-cat { padding: 14px 0; border-top: 1px solid var(--hcc-border); }
.hcc-cat:first-child { border-top: 0; }
.hcc-cat__head {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}
.hcc-cat__name { flex: 1; font-weight: 600; }
.hcc-cat__desc { margin: 6px 0 0; color: var(--hcc-muted); font-size: 13px; line-height: 1.5; }

/* prepínač */
.hcc-cat__head input { position: absolute; opacity: 0; width: 0; height: 0; }
.hcc-switch {
	position: relative;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #b8bcc4;
	flex: 0 0 auto;
	transition: background .15s ease;
}
.hcc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}
.hcc-cat__head input:checked + .hcc-switch { background: var(--hcc-accent); }
.hcc-cat__head input:checked + .hcc-switch::after { transform: translateX(18px); }
.hcc-cat__head input:disabled + .hcc-switch { opacity: .55; cursor: not-allowed; }
.hcc-cat__head input:focus-visible + .hcc-switch { outline: 3px solid var(--hcc-accent); outline-offset: 2px; }

/* ---------- plávajúce tlačidlo (odvolať/zmeniť kedykoľvek) ---------- */
.hcc-reopen {
	position: fixed;
	bottom: 18px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--hcc-border);
	background: var(--hcc-bg);
	color: var(--hcc-accent);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
#hcc-root[data-pos="right"] .hcc-reopen { left: 18px; }
#hcc-root[data-pos="left"] .hcc-reopen { right: 18px; }
.hcc-reopen:hover { transform: scale(1.06); }
.hcc-reopen:focus-visible { outline: 3px solid var(--hcc-accent); outline-offset: 2px; }

@media (max-width: 480px) {
	.hcc-card { left: 16px; right: 16px; width: auto; bottom: 16px; }
	.hcc-btn { flex: 1 1 100%; }
}
