/* NextHouse Cookies 1.0.0 */
#nhcc, #nhcc-reopen {
	--nhcc-bg: #ffffff;
	--nhcc-text: #1c1c1c;
	--nhcc-accent: #1c1c1c;
	--nhcc-line: color-mix(in srgb, var(--nhcc-text) 16%, transparent);
	--nhcc-muted: color-mix(in srgb, var(--nhcc-text) 68%, var(--nhcc-bg));
}
#nhcc[hidden], #nhcc-reopen[hidden], #nhcc [hidden] { display: none !important; }

#nhcc {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 2147483000;
	box-sizing: border-box;
	width: calc(100% - 48px);
	max-width: 460px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-y: auto;
	padding: 28px 28px 24px;
	background: var(--nhcc-bg);
	color: var(--nhcc-text);
	border: 1px solid var(--nhcc-line);
	border-radius: 0;
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35);
	font-size: 15px;
	line-height: 1.55;
	text-align: left;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
#nhcc.is-in { opacity: 1; transform: none; }
#nhcc:focus { outline: none; }
#nhcc *, #nhcc *::before, #nhcc *::after { box-sizing: border-box; }

#nhcc .nhcc-title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--nhcc-text);
	text-wrap: balance;
}
#nhcc .nhcc-text {
	margin: 0 0 20px;
	padding: 0;
	font-size: 14.5px;
	color: var(--nhcc-muted);
	text-wrap: pretty;
}
#nhcc .nhcc-link {
	color: var(--nhcc-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* Kategorie */
#nhcc .nhcc-prefs { margin: 0 0 20px; border-top: 1px solid var(--nhcc-line); }
#nhcc .nhcc-cat { padding: 14px 0; border-bottom: 1px solid var(--nhcc-line); }
#nhcc .nhcc-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	cursor: pointer;
}
#nhcc .nhcc-cat-name { font-weight: 600; font-size: 15px; color: var(--nhcc-text); }
#nhcc .nhcc-cat-note { font-weight: 400; font-size: 13px; color: var(--nhcc-muted); margin-left: 6px; }
#nhcc .nhcc-cat-desc { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--nhcc-muted); text-wrap: pretty; }

#nhcc .nhcc-switch { position: relative; flex: 0 0 44px; width: 44px; height: 24px; }
#nhcc .nhcc-switch input {
	position: absolute; inset: 0; width: 100%; height: 100%;
	margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
#nhcc .nhcc-slider {
	position: absolute; inset: 0;
	border: 1px solid var(--nhcc-text);
	background: var(--nhcc-bg);
	transition: background .15s ease;
}
#nhcc .nhcc-slider::after {
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 16px; height: 16px; background: var(--nhcc-text);
	transition: transform .15s ease, background .15s ease;
}
#nhcc .nhcc-switch input:checked + .nhcc-slider { background: var(--nhcc-accent); border-color: var(--nhcc-accent); }
#nhcc .nhcc-switch input:checked + .nhcc-slider::after { transform: translateX(20px); background: var(--nhcc-bg); }
#nhcc .nhcc-switch input:disabled { cursor: not-allowed; }
#nhcc .nhcc-switch input:disabled + .nhcc-slider { opacity: .45; }
#nhcc .nhcc-switch input:focus-visible + .nhcc-slider { outline: 2px solid var(--nhcc-accent); outline-offset: 3px; }

/* Przyciski: odrzucenie i akceptacja mają tę samą wagę wizualną */
#nhcc .nhcc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#nhcc .nhcc-btn,
#nhcc .nhcc-more {
	appearance: none;
	margin: 0;
	border-radius: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}
#nhcc .nhcc-btn {
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--nhcc-accent);
	background: var(--nhcc-accent);
	color: var(--nhcc-bg);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	transition: opacity .15s ease;
}
#nhcc .nhcc-btn:hover { opacity: .86; background: var(--nhcc-accent); color: var(--nhcc-bg); }
#nhcc .nhcc-btn--wide {
	grid-column: 1 / -1;
	background: transparent;
	color: var(--nhcc-text);
	border-color: var(--nhcc-text);
}
#nhcc .nhcc-btn--wide:hover { background: transparent; color: var(--nhcc-text); opacity: .7; }
#nhcc .nhcc-more {
	grid-column: 1 / -1;
	justify-self: start;
	padding: 6px 0 0;
	border: 0;
	background: none;
	color: var(--nhcc-text);
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}
#nhcc .nhcc-more:hover { background: none; color: var(--nhcc-text); opacity: .7; }
#nhcc .nhcc-btn:focus-visible,
#nhcc .nhcc-more:focus-visible,
#nhcc .nhcc-link:focus-visible { outline: 2px solid var(--nhcc-accent); outline-offset: 3px; }

/* Przycisk ponownego otwarcia */
#nhcc-reopen {
	position: fixed;
	left: 0;
	bottom: 24px;
	z-index: 2147482999;
	appearance: none;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid var(--nhcc-line);
	border-left: 0;
	border-radius: 0;
	background: var(--nhcc-bg);
	color: var(--nhcc-text);
	font: inherit;
	font-size: 12.5px;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .3);
	cursor: pointer;
	opacity: .9;
}
#nhcc-reopen:hover { opacity: 1; background: var(--nhcc-bg); color: var(--nhcc-text); }
#nhcc-reopen:focus-visible { outline: 2px solid var(--nhcc-accent); outline-offset: 2px; }

@media (max-width: 600px) {
	#nhcc {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		max-height: 88vh;
		max-height: 88dvh;
		padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px));
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
	}
	#nhcc .nhcc-title { font-size: 17px; }
	#nhcc .nhcc-text { font-size: 14px; margin-bottom: 16px; }
	#nhcc .nhcc-btn { font-size: 14px; padding: 12px 8px; }
	#nhcc .nhcc-more { justify-self: center; }
	#nhcc-reopen { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	#nhcc, #nhcc .nhcc-slider, #nhcc .nhcc-slider::after { transition: none; }
}
@media print { #nhcc, #nhcc-reopen { display: none !important; } }
