/* Prosty Cookie Consent — banner */
:root {
	--pcc-accent: #2563eb;
	--pcc-bg: #ffffff;
	--pcc-text: #1f2937;
	--pcc-muted: #6b7280;
	--pcc-border: #e5e7eb;
}

.pcc-banner * { box-sizing: border-box; }

/* Atrybut hidden musi ukrywac element mimo regul display:flex ponizej */
[hidden] { display: none !important; }

.pcc-banner {
	position: fixed;
	z-index: 999999;
	background: var(--pcc-bg);
	color: var(--pcc-text);
	box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.14);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	border-top: 1px solid var(--pcc-border);
	animation: pcc-slide-up 0.32s ease;
}

@keyframes pcc-slide-up {
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

/* Pozycje */
.pcc-pos-bottom { left: 0; right: 0; bottom: 0; width: 100%; }
.pcc-pos-bottom-left  { left: 20px; bottom: 20px; max-width: 440px; border-radius: 14px; border: 1px solid var(--pcc-border); }
.pcc-pos-bottom-right { right: 20px; bottom: 20px; max-width: 440px; border-radius: 14px; border: 1px solid var(--pcc-border); }
.pcc-pos-center {
	left: 50%; top: 50%; transform: translate(-50%, -50%);
	max-width: 520px; width: calc(100% - 40px);
	border-radius: 16px; border: 1px solid var(--pcc-border);
}
.pcc-pos-center::before {
	content: ""; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
	z-index: -1; pointer-events: none;
}

.pcc-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.pcc-pos-bottom .pcc-inner { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.pcc-content { flex: 1; min-width: 260px; }
.pcc-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: var(--pcc-text); }
.pcc-message { margin: 0; color: var(--pcc-text); }
.pcc-policy-link { color: var(--pcc-accent); text-decoration: underline; }

/* Akcje */
.pcc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; width: 100%; }
/* Akceptuj wszystkie na cala szerokosc (gora), pozostale dwa przyciski 50/50 ponizej */
#pcc-accept { order: 1; flex: 1 1 100%; }
#pcc-reject, #pcc-settings, #pcc-save { order: 2; flex: 1 1 0; min-width: 0; }

.pcc-btn {
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 9px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	transition: filter 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}
.pcc-btn-primary { background: var(--pcc-accent); color: #fff; }
.pcc-btn-primary:hover { filter: brightness(0.93); }
.pcc-btn-save { background: var(--pcc-accent); color: #fff; }
.pcc-btn-save:hover { filter: brightness(0.93); }
.pcc-btn-secondary {
	background: transparent;
	color: var(--pcc-text);
	border-color: var(--pcc-border);
}
.pcc-btn-secondary:hover { background: rgba(0,0,0,0.04); }

/* Preferencje */
.pcc-prefs {
	width: 100%;
	border-top: 1px solid var(--pcc-border);
	padding-top: 14px;
	margin-top: 2px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: 46vh;
	overflow-y: auto;
}
.pcc-pref-row { display: flex; gap: 14px; align-items: flex-start; }
.pcc-pref-text { display: flex; flex-direction: column; gap: 2px; }
.pcc-pref-label { font-weight: 600; }
.pcc-pref-label em { font-weight: 400; color: var(--pcc-muted); font-style: normal; font-size: 12px; }
.pcc-pref-desc { color: var(--pcc-muted); font-size: 13px; }

/* Przełącznik */
.pcc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 44px; margin-top: 2px; }
.pcc-switch input { opacity: 0; width: 0; height: 0; }
.pcc-slider {
	position: absolute; cursor: pointer; inset: 0;
	background: #cbd5e1; border-radius: 24px; transition: background 0.2s;
}
.pcc-slider::before {
	content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
	background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.pcc-switch input:checked + .pcc-slider { background: var(--pcc-accent); }
.pcc-switch input:checked + .pcc-slider::before { transform: translateX(20px); }
.pcc-switch input:disabled + .pcc-slider { opacity: 0.65; cursor: not-allowed; }

/* Motyw ciemny */
.pcc-theme-dark {
	--pcc-bg: #1f2937;
	--pcc-text: #f3f4f6;
	--pcc-muted: #9ca3af;
	--pcc-border: #374151;
}
.pcc-theme-dark .pcc-btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* Pływająca ikona ponownego otwarcia */
.pcc-reopen {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 999998;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: var(--pcc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
.pcc-reopen:hover { filter: brightness(0.93); }

@media (max-width: 640px) {
	.pcc-pos-bottom .pcc-inner { flex-direction: column; align-items: stretch; }
	.pcc-actions { justify-content: stretch; }
	.pcc-actions .pcc-btn { flex: 1; text-align: center; }
	.pcc-pos-bottom-left, .pcc-pos-bottom-right { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}

/* Lista wykrytych cookies w panelu szczegółów */
.pcc-cookie-list { margin-top: 8px; font-size: 12px; }
.pcc-cookie-list summary { cursor: pointer; color: var(--pcc-accent); user-select: none; padding: 2px 0; }
.pcc-cookie-list table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.pcc-cookie-list th, .pcc-cookie-list td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--pcc-border); vertical-align: top; }
.pcc-cookie-list th { color: var(--pcc-muted); font-weight: 600; }
.pcc-cookie-list code { font-size: 11px; word-break: break-all; }
