/* Zgody Cookie PL – style front-end. Kolory i rozmiary sterowane zmiennymi z panelu. */
.zcpl, .zcpl * { box-sizing: border-box; }
.zcpl [hidden], .zcpl-embed-ph[hidden] { display: none !important; }

.zcpl {
	font-size: var(--zcpl-font-size, 15px);
	line-height: 1.5;
	color: var(--zcpl-text, #1f2933);
}

.zcpl-overlay {
	position: fixed; inset: 0;
	background: rgba(15, 23, 42, .55);
	z-index: calc(var(--zcpl-z, 2147483000) - 1);
}
.zcpl-overlay-prefs { z-index: calc(var(--zcpl-z, 2147483000) + 1); }

/* ---------- Baner ---------- */
.zcpl-banner {
	position: fixed;
	z-index: var(--zcpl-z, 2147483000);
	background: var(--zcpl-bg, #fff);
	color: var(--zcpl-text, #1f2933);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	outline: none;
	font-family: inherit;
}
.zcpl-banner-inner { position: relative; padding: 1.25em 1.5em; }

.zcpl-layout-bar { left: 0; right: 0; }
.zcpl-layout-bar.zcpl-pos-bottom { bottom: 0; }
.zcpl-layout-bar.zcpl-pos-top { top: 0; }
.zcpl-layout-bar .zcpl-banner-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: .25em 2em; align-items: center; }
.zcpl-layout-bar .zcpl-title, .zcpl-layout-bar .zcpl-text, .zcpl-layout-bar .zcpl-gpc { grid-column: 1; }
.zcpl-layout-bar .zcpl-actions { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; }

.zcpl-layout-box { bottom: 1em; width: min(370px, calc(100vw - 2em)); border-radius: var(--zcpl-radius, 10px); font-size: .9em; }
.zcpl-layout-box.zcpl-pos-left { left: 1em; }
.zcpl-layout-box.zcpl-pos-right { right: 1em; }
.zcpl-layout-box .zcpl-banner-inner { padding: 1em 1.1em; }
.zcpl-layout-box .zcpl-title { font-size: 1.08em; margin-bottom: .3em; }
.zcpl-layout-box .zcpl-text { margin-bottom: .85em; line-height: 1.45; }
.zcpl-layout-box .zcpl-actions { gap: .45em; }
.zcpl-layout-box .zcpl-btn { min-height: 40px; padding: .5em .8em; }
.zcpl-layout-box .zcpl-close { width: 36px; height: 36px; top: .3em; right: .3em; font-size: 1.4em; }

.zcpl-layout-modal { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 2em)); max-height: calc(100vh - 2em); overflow: auto; border-radius: var(--zcpl-radius, 10px); }

.zcpl-title { font-size: 1.15em; font-weight: 700; margin: 0 0 .4em; padding-right: 1.5em; color: inherit; }
.zcpl-text { margin: 0 0 1em; }
.zcpl-text a, .zcpl-details summary { color: var(--zcpl-link, #1a56db); text-decoration: underline; }
.zcpl-gpc { font-size: .9em; margin: 0 0 1em; padding: .5em .75em; border-left: 3px solid var(--zcpl-link, #1a56db); background: rgba(0, 0, 0, .04); }

/* ---------- Przyciski: akceptuj i odrzuć zawsze o tej samej randze ---------- */
.zcpl-actions { display: flex; flex-wrap: wrap; gap: .6em; }
.zcpl-btn {
	font: inherit; font-weight: 600;
	flex: 1 1 auto;
	min-height: 44px; /* WCAG 2.2 – cel dotykowy */
	padding: .6em 1.1em;
	border-radius: calc(var(--zcpl-radius, 10px) * .6);
	border: 2px solid var(--zcpl-primary, #1a56db);
	cursor: pointer;
	line-height: 1.2;
	text-align: center;
}
.zcpl-btn-main { background: var(--zcpl-primary, #1a56db); color: var(--zcpl-primary-text, #fff); }
.zcpl-btn-main:hover { filter: brightness(1.08); }
.zcpl-btn-ghost { background: transparent; color: var(--zcpl-text, #1f2933); border-color: currentColor; }
.zcpl-btn:focus-visible, .zcpl-close:focus-visible, .zcpl-floating:focus-visible, .zcpl-switch input:focus-visible + .zcpl-slider, .zcpl-details summary:focus-visible {
	outline: 3px solid var(--zcpl-link, #1a56db); outline-offset: 2px;
}

.zcpl-close {
	position: absolute; top: .5em; right: .6em;
	background: none; border: 0; color: inherit;
	font-size: 1.6em; line-height: 1; width: 44px; height: 44px; cursor: pointer;
}

/* ---------- Okno ustawień ---------- */
.zcpl-prefs {
	position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
	z-index: calc(var(--zcpl-z, 2147483000) + 2);
	width: min(680px, calc(100vw - 1.5em));
	max-height: calc(100vh - 1.5em);
	display: flex; flex-direction: column;
	background: var(--zcpl-bg, #fff); color: var(--zcpl-text, #1f2933);
	border-radius: var(--zcpl-radius, 10px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	outline: none;
}
.zcpl-prefs[hidden] { display: none; }
.zcpl-prefs-head { position: relative; padding: 1.1em 1.5em .6em; border-bottom: 1px solid rgba(127, 127, 127, .2); }
.zcpl-prefs-head .zcpl-title { margin: 0; }
.zcpl-prefs-head .zcpl-close { top: .35em; }
.zcpl-prefs-body { padding: 1em 1.5em; overflow-y: auto; }
.zcpl-prefs-actions { padding: 1em 1.5em; border-top: 1px solid rgba(127, 127, 127, .2); }

.zcpl-cat { border: 1px solid rgba(127, 127, 127, .25); border-radius: calc(var(--zcpl-radius, 10px) * .6); padding: .85em 1em; margin-bottom: .75em; }
.zcpl-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.zcpl-cat-label { font-weight: 700; cursor: pointer; }
.zcpl-cat-desc { margin: .4em 0 0; font-size: .93em; opacity: .9; }
.zcpl-always { font-size: .85em; font-weight: 600; color: var(--zcpl-link, #1a56db); white-space: nowrap; }

.zcpl-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; }
.zcpl-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.zcpl-slider { position: absolute; inset: 0; border-radius: 28px; background: #8a94a6; transition: background .2s; }
.zcpl-slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; }
.zcpl-switch input:checked + .zcpl-slider { background: var(--zcpl-link, #1a56db); }
.zcpl-switch input:checked + .zcpl-slider::before { transform: translateX(22px); }

.zcpl-details { margin-top: .5em; font-size: .9em; }
.zcpl-details summary { cursor: pointer; display: inline-block; }

.zcpl-table-wrap { overflow-x: auto; margin-top: .5em; }
.zcpl-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.zcpl-table th, .zcpl-table td { text-align: left; padding: .4em .5em; border-bottom: 1px solid rgba(127, 127, 127, .2); vertical-align: top; }
.zcpl-table code { font-size: .95em; word-break: break-all; }

.zcpl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Przycisk pływający ---------- */
.zcpl-floating {
	z-index: calc(var(--zcpl-z, 2147483000) - 2);
	width: 48px; height: 48px; border-radius: 50%;
	border: 0; cursor: pointer;
	background: var(--zcpl-icon-bg, var(--zcpl-primary, #1a56db)); color: var(--zcpl-primary-text, #fff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	display: flex; align-items: center; justify-content: center;
}
.zcpl-floating[hidden], .zcpl-inline-btn[hidden] { display: none; }
.zcpl-floating-fixed { position: fixed; bottom: 1em; }
.zcpl-floating-fixed.zcpl-floating-left { left: 1em; }
.zcpl-floating-fixed.zcpl-floating-right { right: 1em; }

/* Tryb „Stały”: przycisk w normalnym przepływie strony, na samym dole – przewija się razem z treścią. */
.zcpl-static-wrap { display: flex; padding: 0 1em; }
.zcpl-static-wrap.zcpl-static-right { justify-content: flex-end; }
.zcpl-floating-static { position: static; margin: 1em 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }

/* Shortcode [zcpl_przycisk] – osadzony w treści lub stopce. */
.zcpl-inline-btn {
	display: inline-flex; align-items: center; gap: .45em;
	font: inherit; font-size: .95em; line-height: 1.2; cursor: pointer;
	min-height: 40px; padding: .45em .9em;
	border: 0; border-radius: 999px;
	background: var(--zcpl-icon-bg, var(--zcpl-primary, #1a56db)); color: var(--zcpl-primary-text, #fff);
	vertical-align: middle;
}
.zcpl-inline-btn.zcpl-inline-icon { width: 44px; height: 44px; padding: 0; justify-content: center; }
.zcpl-inline-btn:hover { filter: brightness(1.08); }
.zcpl-inline-btn:focus-visible { outline: 3px solid var(--zcpl-link, #1a56db); outline-offset: 2px; }

/* ---------- Zablokowane osadzenia ---------- */
.zcpl-embed-ph {
	box-sizing: border-box;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75em;
	width: 100%; min-height: 200px; padding: 1.5em; text-align: center;
	background: #f1f3f6; color: #1f2933; border-radius: 8px; margin: 1em 0;
}
.zcpl-embed-ph p { margin: 0; }
.zcpl-embed-ph .zcpl-btn { flex: 0 0 auto; background: var(--zcpl-primary, #1a56db); }

html.zcpl-lock { overflow: hidden; }

@media (max-width: 640px) {
	.zcpl-layout-bar .zcpl-banner-inner { display: block; }
	.zcpl-layout-bar .zcpl-actions { flex-direction: row; }
	.zcpl-layout-box { left: .5em !important; right: .5em !important; bottom: .5em; width: auto; }
	.zcpl-btn { flex-basis: 100%; }
	.zcpl-banner { max-height: 85vh; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.zcpl-slider, .zcpl-slider::before { transition: none; }
}

@media print { .zcpl { display: none !important; } }
