/* HEDEA Cookies 1.3.1 – WCAG 2.2 AA
 * Wszystkie kolory, kroje i zaokrąglenia to zmienne CSS.
 * Ustawia się je w panelu: Ustawienia → Cookies → Wygląd (wtyczka dopisuje je jako styl inline),
 * więc tej samej paczki można użyć na każdej stronie bez edycji CSS.
 * Poniżej wartości domyślne (gdy pole w panelu jest puste).
 */
.hc-root,
.hc-embed {
	--hc-bg: #ffffff;        /* tło banera i okna ustawień */
	--hc-ink: #1c2731;       /* tekst */
	--hc-muted: #55626e;     /* tekst opisów */
	--hc-navy: #12304a;      /* nagłówki, przycisk drugorzędny, tło planszy mapy/filmu */
	--hc-accent: #a63d2f;    /* przycisk główny, linki, przełączniki */
	--hc-accent-2: #7f2b20;  /* akcent po najechaniu */
	--hc-on-accent: #ffffff; /* tekst na przycisku głównym */
	--hc-line: #dde4ea;      /* linie podziału */
	--hc-radius: 18px;       /* zaokrąglenie banera i okna */
	--hc-font: inherit;      /* krój tekstu – domyślnie jak na stronie */
	--hc-display: inherit;   /* krój nagłówków – domyślnie jak na stronie */
	font-family: var(--hc-font);
}

.hc-root [hidden],
iframe[data-hc-src] { display: none !important; }

/* Osadzenia już dozwolone: placeholder chowamy od razu (klasa z <head>) */
.hc-ok-functional .hc-embed[data-hc-category="functional"],
.hc-ok-analytics .hc-embed[data-hc-category="analytics"],
.hc-ok-marketing .hc-embed[data-hc-category="marketing"] { display: none; }

.hc-lock, .hc-lock body { overflow: hidden; }

/* ---------- Typografia ---------- */
.hc-title {
	font-family: var(--hc-display);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--hc-navy);
	margin: 0 0 0.4rem;
	letter-spacing: 0;
	text-transform: none;
}
.hc-text {
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--hc-muted-a, var(--hc-muted));
	margin: 0;
	max-width: 68ch;
}
.hc-small { font-size: 0.875rem; margin: 1rem 0 0; }
.hc-a {
	color: var(--hc-link, var(--hc-accent));
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.hc-a:hover { color: var(--hc-link, var(--hc-accent-2)); text-decoration-thickness: 2px; }

/* ---------- Przyciski (pigułka; grubość czcionki 500, zmienna --hc-btn-weight) ---------- */
.hc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.6rem 1.4rem;
	border-radius: 999px;
	border: 2px solid transparent;
	font-family: var(--hc-font);
	font-weight: var(--hc-btn-weight, 500);
	font-size: 0.95rem;
	line-height: 1.2;
	cursor: pointer;
	white-space: normal;
	text-align: center;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.hc-btn--primary { background: var(--hc-btn, var(--hc-accent)); color: var(--hc-on-accent); }
.hc-btn--primary:hover { background: var(--hc-btn-2, var(--hc-accent-2)); }
.hc-btn--secondary {
	background: transparent;
	color: var(--hc-navy);
	border-color: var(--hc-navy);
}
.hc-btn--secondary:hover { background: var(--hc-navy); color: var(--hc-bg); }

.hc-link {
	appearance: none;
	background: none;
	border: 0;
	padding: 0.5rem 0.25rem;
	min-height: 44px;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--hc-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.hc-link:hover { color: var(--hc-accent); }
.hc-link--inline { min-height: 0; padding: 0; color: inherit; }

.hc-root :focus-visible,
.hc-embed :focus-visible,
.hc-link--inline:focus-visible {
	/* Widoczny fokus na każdym tle (WCAG 2.4.7 / 2.4.13): ciemny obrys + jasna obwódka. */
	outline: 3px solid var(--hc-focus, var(--hc-navy));
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
}
.hc-embed :focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px #000; }
.hc-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ---------- Baner ---------- */
.hc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 2147483000;
	max-width: 1120px;
	margin: 0 auto;
	background: var(--hc-bg);
	border: 1px solid var(--hc-line);
	border-radius: var(--hc-radius);
	box-shadow: 0 20px 60px rgba(11, 34, 54, 0.28);
	color: var(--hc-ink);
	animation: hc-in 0.4s ease-out both;
	/* Przy dużym powiększeniu i niskim ekranie baner się przewija zamiast wychodzić poza ekran (WCAG 1.4.10). */
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
}
/* cienki ceglasty akcent u góry baneru */
.hc-banner::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 28px;
	right: 28px;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: var(--hc-accent);
}
.hc-banner__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem 2rem;
	padding: 1.4rem 1.75rem;
}
.hc-banner__copy { flex: 1 1 auto; min-width: 0; }
.hc-banner__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.6rem;
	max-width: 340px;
}
.hc-banner__actions .hc-btn { flex: 1 1 100%; }
.hc-banner__actions .hc-link { margin: 0 auto; }

@keyframes hc-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Okno ustawień ---------- */
.hc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.hc-modal__backdrop { position: absolute; inset: 0; background: rgba(11, 34, 54, 0.6); }
.hc-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: var(--hc-bg);
	border-radius: var(--hc-radius);
	padding: 1.75rem;
	color: var(--hc-ink);
	box-shadow: 0 24px 70px rgba(11, 34, 54, 0.4);
}
.hc-modal__dialog:focus { outline: none; }
.hc-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--hc-muted);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}
.hc-modal__close:hover { color: var(--hc-navy); background: var(--hc-line); }

.hc-cats { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.hc-cat { padding: 1rem 0; border-top: 1px solid var(--hc-line); margin: 0; }
.hc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hc-cat__label { font-family: var(--hc-display); font-size: 1.15rem; color: var(--hc-navy); cursor: pointer; }
.hc-cat__always { font-size: 0.85rem; font-weight: 600; color: var(--hc-always-a, var(--hc-always, var(--hc-ok, #3b6420))); }
.hc-cat__desc { margin: 0.35rem 0 0; font-size: 0.925rem; line-height: 1.55; color: var(--hc-muted-a, var(--hc-muted)); }

.hc-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 auto; }
.hc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.hc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	/* Wyłączony przełącznik też musi odcinać się od tła min. 3:1 (WCAG 1.4.11). */
	background: var(--hc-switch-off-a, var(--hc-switch-off, var(--hc-track, #6b7785)));
	transition: background-color 0.2s ease;
}
.hc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--hc-switch-knob-a, var(--hc-switch-knob, #fff));
	box-shadow: 0 1px 3px rgba(11, 34, 54, 0.25);
	transition: transform 0.2s ease;
}
.hc-switch input:checked + .hc-switch__track { background: var(--hc-switch-on-a, var(--hc-switch-on, var(--hc-link, var(--hc-accent)))); }
.hc-switch input:checked + .hc-switch__track::after { transform: translateX(20px); background: var(--hc-switch-knob-on-a, var(--hc-switch-knob, #fff)); }
.hc-switch input:focus-visible + .hc-switch__track { outline: 3px solid var(--hc-focus, var(--hc-navy)); outline-offset: 2px; box-shadow: 0 0 0 5px #fff; }
.hc-switch__track::before { content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 2px; margin-top: -1px; background: var(--hc-switch-knob-on-a, var(--hc-switch-knob, #fff)); opacity: 0; }
.hc-switch input:checked + .hc-switch__track::before { opacity: 1; width: 10px; height: 2px; }

.hc-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hc-line);
}
.hc-modal__actions .hc-btn { flex: 1 1 160px; }

/* ---------- Przycisk ponownego otwarcia ---------- */
.hc-fab { /* mały przycisk „Ustawienia cookies” – matowe szkło (białe półprzezroczyste tło z rozmyciem) */
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 2147482999;
	padding: 0.3rem 0.75rem;
	min-height: 32px;
	border-radius: 999px;
	border: 1px solid var(--hc-navy);
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(16px) saturate(1.5);
	backdrop-filter: blur(16px) saturate(1.5);
	box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--hc-navy) 45%, transparent);
	color: var(--hc-navy);
	font-family: var(--hc-font);
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.hc-fab:hover, .hc-fab:focus-visible { opacity: 1; background: var(--hc-btn, var(--hc-accent)); border-color: var(--hc-btn, var(--hc-accent)); color: var(--hc-on-accent); }

/* ---------- Zablokowane osadzenia (mapy, filmy) ---------- */
.hc-embed {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 1.5rem;
	box-sizing: border-box;
	background: var(--hc-navy);
	color: #fff;
	text-align: center;
	font-family: var(--hc-font);
	border-radius: inherit;
}
.hc-embed__box { max-width: 440px; }
.hc-embed__title { font-family: var(--hc-display); font-size: 1.35rem; color: #fff; margin: 0 0 0.5rem; }
.hc-embed__text { font-size: 0.95rem; line-height: 1.55; color: rgba(255, 255, 255, 0.8); margin: 0 0 1rem; }
.hc-embed__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; margin: 0; }
.hc-embed .hc-link { color: #fff; }

/* ---------- Mobile (breakpoint z oryginalnej wtyczki) ---------- */
@media (max-width: 760px) {
	.hc-banner { left: 10px; right: 10px; bottom: 10px; }
	.hc-banner__inner { flex-direction: column; align-items: stretch; padding: 1.15rem 1.15rem 0.85rem; gap: 1rem; }
	.hc-banner__actions { max-width: none; }
	.hc-title { font-size: 1.3rem; }
	.hc-text { font-size: 0.925rem; }
	.hc-modal__dialog { padding: 1.35rem 1.15rem; }
	.hc-modal__actions .hc-btn { flex-basis: 100%; }
	.hc-fab { left: 8px; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.hc-banner { animation: none; }
	.hc-btn, .hc-switch__track, .hc-switch__track::after { transition: none; }
}

/* Tryb wysokiego kontrastu (Windows) – obramowania zamiast kolorów tła. */
@media (forced-colors: active) {
	.hc-btn, .hc-fab, .hc-banner, .hc-modal__dialog { border: 1px solid ButtonText; }
	.hc-switch__track { border: 2px solid ButtonText; background: Canvas; }
	.hc-switch__track::after { background: ButtonText; }
	.hc-switch input:checked + .hc-switch__track { background: Highlight; }
	.hc-root :focus-visible { outline: 3px solid Highlight; }
}

@media print { .hc-root, .hc-fab { display: none !important; } }

/* ---------- Odporność na style motywu (od 1.2.4) ----------
 * Niektóre motywy nadpisują wszystkie przyciski regułami z !important
 * (np. button { width:150px !important; background:… !important; }).
 * Poniżej przywracamy wygląd przycisków banera z wyższą specyficznością. */
#hc-root .hc-btn, #hc-root .hc-link, #hc-root .hc-modal__close, #hc-fab {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 !important;
	float: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
	text-indent: 0 !important;
	box-sizing: border-box !important;
}
#hc-root .hc-btn {
	min-height: 44px !important;
	padding: 0.6rem 1.4rem !important;
	border-radius: var(--hc-btn-radius, 999px) !important;
	border: 2px solid transparent !important;
	font-family: var(--hc-font) !important;
	font-weight: var(--hc-btn-weight, 500) !important;
	font-size: 0.95rem !important;
	line-height: 1.2 !important;
	white-space: normal !important;
}
#hc-root .hc-btn--primary { background: var(--hc-btn, var(--hc-accent)) !important; color: var(--hc-on-accent) !important; border-color: transparent !important; }
#hc-root .hc-btn--primary:hover { background: var(--hc-btn-2, var(--hc-accent-2)) !important; }
#hc-root .hc-btn--secondary { background: transparent !important; color: var(--hc-navy) !important; border-color: var(--hc-navy) !important; }
#hc-root .hc-btn--secondary:hover { background: var(--hc-navy) !important; color: var(--hc-bg) !important; }
#hc-root .hc-link {
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0.5rem 0.25rem !important;
	min-height: 44px !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	color: var(--hc-navy) !important;
}
#hc-root .hc-link:hover { color: var(--hc-accent) !important; }
#hc-root .hc-modal__close {
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--hc-muted) !important;
	font-size: 1.75rem !important;
	line-height: 1 !important;
}
#hc-root .hc-modal__close:hover { color: var(--hc-navy) !important; background: var(--hc-line) !important; }
#hc-fab {
	padding: 0.3rem 0.75rem !important;
	min-height: 32px !important;
	border-radius: var(--hc-btn-radius, 999px) !important;
	border: 1px solid var(--hc-navy) !important;
	background: rgba(255, 255, 255, 0.94) !important;
	color: var(--hc-navy) !important;
	font-family: var(--hc-font) !important;
	font-weight: 600 !important;
	font-size: 0.75rem !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
}
#hc-fab:hover, #hc-fab:focus-visible { background: var(--hc-btn, var(--hc-accent)) !important; border-color: var(--hc-btn, var(--hc-accent)) !important; color: var(--hc-on-accent) !important; }
/* Ozdobniki motywu przy nagłówkach i akapitach (np. h2::before z kreską) – wyłączone w banerze i oknie. */
#hc-root h2::before, #hc-root h2::after, #hc-root h3::before, #hc-root h3::after,
#hc-root p::before, #hc-root p::after { content: none !important; display: none !important; }
#hc-root h2, #hc-root h3 { position: static !important; margin-top: 0 !important; }
#hc-root .hc-title { font-family: var(--hc-display) !important; color: var(--hc-navy) !important; }
#hc-root .hc-text, #hc-root p { font-family: var(--hc-font) !important; }

/* ---------- 1.2.5: przycisk zamykania, kreska motywu, przełącznik ---------- */
html body #hc-root .hc-modal__dialog h2::before, html body #hc-root .hc-modal__dialog h2::after,
html body #hc-root .hc-banner h2::before, html body #hc-root .hc-banner h2::after,
html body #hc-root h2.hc-title::before, html body #hc-root h2.hc-title::after {
	content: none !important; display: none !important; width: 0 !important; height: 0 !important; background: none !important;
}
html body #hc-root .hc-modal__dialog h2, html body #hc-root .hc-modal__dialog h3 {
	position: static !important; z-index: auto !important; text-decoration: none !important; border: 0 !important;
}
html body #hc-root .hc-modal__dialog .hc-title { padding-right: 56px !important; }
html body #hc-root .hc-modal__close {
	position: absolute !important;
	top: 12px !important;
	right: 12px !important;
	z-index: 5 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	border-radius: var(--hc-btn-radius, 50%) !important;
	background: transparent !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	cursor: pointer !important;
	transition: border-color .15s, background-color .15s !important;
}
html body #hc-root .hc-modal__close::before, html body #hc-root .hc-modal__close::after {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 22px !important;
	height: 2px !important;
	margin: -1px 0 0 -11px !important;
	background: var(--hc-navy) !important;
	border-radius: 1px !important;
	transform: rotate(45deg) !important;
	pointer-events: none !important;
}
html body #hc-root .hc-modal__close::after { transform: rotate(-45deg) !important; }
html body #hc-root .hc-modal__close:hover { background: var(--hc-line) !important; border-color: var(--hc-line) !important; }
html body #hc-root .hc-modal__close:focus-visible { outline: 3px solid var(--hc-focus, var(--hc-navy)) !important; outline-offset: 2px !important; }
.hc-switch__track::before { left: 13px; width: 2px; height: 10px; margin-top: -5px; }
.hc-switch input:checked + .hc-switch__track::before { width: 2px; height: 10px; }

/* ---------- 1.3.0: krzyżyk na banerze, lista cookies w oknie, deklaracja cookies ---------- */
html body #hc-root .hc-banner__close {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	z-index: 2 !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	border-radius: var(--hc-btn-radius, 50%) !important;
	background: transparent !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer !important;
}
html body #hc-root .hc-banner__close::before, html body #hc-root .hc-banner__close::after {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 20px !important;
	height: 2px !important;
	margin: -1px 0 0 -10px !important;
	background: var(--hc-navy) !important;
	border-radius: 1px !important;
	transform: rotate(45deg) !important;
	pointer-events: none !important;
}
html body #hc-root .hc-banner__close::after { transform: rotate(-45deg) !important; }
html body #hc-root .hc-banner__close:hover { background: var(--hc-line) !important; border-color: var(--hc-line) !important; }
html body #hc-root .hc-banner__close:focus-visible { outline: 3px solid var(--hc-focus, var(--hc-navy)) !important; outline-offset: 2px !important; }
.hc-has-close .hc-banner__inner { padding-right: 3.5rem; }
@media (max-width: 760px) { .hc-has-close .hc-banner__copy { padding-right: 2.5rem; } .hc-has-close .hc-banner__inner { padding-right: 1.15rem; } }

.hc-cat__list { margin: 0.6rem 0 0; }
.hc-cat__list > summary {
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hc-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	min-height: 24px;
	list-style-position: inside;
}
.hc-cat__list > summary:hover { color: var(--hc-link, var(--hc-accent)); }
#hc-root .hc-cat__list > summary::before, #hc-root .hc-cat__list > summary::after { content: none !important; }
.hc-decl__wrap { overflow-x: auto; margin: 0.5rem 0 0; }
.hc-decl__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; line-height: 1.45; }
.hc-decl__table th, .hc-decl__table td { text-align: left; vertical-align: top; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--hc-line, #dde4ea); }
.hc-decl__table th { font-weight: 700; white-space: nowrap; }
.hc-decl__table code { font-size: 0.95em; word-break: break-all; background: none; padding: 0; }
#hc-root .hc-decl__table { color: var(--hc-ink); }
#hc-root .hc-decl__table th { color: var(--hc-navy); }
.hc-consent-info { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--hc-line); }
.hc-consent-info .hc-small { margin: 0.25rem 0 0; color: var(--hc-muted-a, var(--hc-muted)); word-break: break-all; }

/* Deklaracja cookies na stronie (shortcode [hedea_cookies_deklaracja]) – styl tekstu dziedziczony z motywu. */
.hc-decl { --hc-line: #dde4ea; }
.hc-decl__consent { padding: 1rem 1.25rem; border: 1px solid var(--hc-line); margin: 0 0 1.5rem; }
.hc-decl__consent p { margin: 0 0 0.35rem; }
.hc-decl__consent p:last-child { margin: 0; }
.hc-decl__state { word-break: break-word; }
.hc-decl__k { font-weight: 600; }
.hc-decl__title { margin: 1.75rem 0 0.35rem; }
.hc-decl__desc { margin: 0 0 0.5rem; }
.hc-decl__updated { margin-top: 1.5rem; }
.hc-decl__table { font-size: inherit; }
.hc-decl .hc-link--inline { font: inherit; text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
