/**
 * Baner zgód - styl spójny z motywem Deep Flow, ale niezależny od jego CSS
 * (wtyczka musi działać także po zmianie szablonu).
 */

.dfc {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 99999;
	display: flex;
	justify-content: center;
	padding: 16px;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.dfc[hidden] { display: none; }

.dfc__panel {
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px 26px;
	background: #fff;
	border: 1px solid #DCE5F0;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(7, 26, 51, .22);
	color: #1F2937;
}

@media (prefers-color-scheme: dark) {
	.dfc__panel { background: #0F1F38; border-color: #24395C; color: #E6EDF7; }
}

.dfc__title {
	margin: 0 0 10px;
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.3;
	color: #0C2A52;
}
@media (prefers-color-scheme: dark) { .dfc__title { color: #fff; } }

.dfc__text { font-size: .875rem; line-height: 1.6; }
.dfc__text p { margin: 0 0 10px; }

.dfc__links { font-size: .8125rem; }
.dfc__links a { color: #1565C0; text-decoration: underline; }
.dfc__links a:hover { text-decoration: none; }
@media (prefers-color-scheme: dark) { .dfc__links a { color: #7FB3F0; } }

/* Akceptacja i odrzucenie mają identyczną wagę wizualnie - wymóg prawny:
   odmowa nie może być trudniejsza niż zgoda. */
.dfc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}
.dfc__actions--prefs { margin-top: 18px; }

.dfc__btn {
	flex: 1 1 auto;
	min-width: 150px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: .875rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.dfc__btn--primary { background: #0C2A52; border-color: #0C2A52; color: #fff; }
.dfc__btn--primary:hover { background: #123C74; border-color: #123C74; }

.dfc__btn--ghost { flex: 0 1 auto; background: transparent; border-color: #C6D3E4; color: #0C2A52; }
.dfc__btn--ghost:hover { border-color: #0C2A52; }

@media (prefers-color-scheme: dark) {
	.dfc__btn--primary { background: #2C7BE5; border-color: #2C7BE5; }
	.dfc__btn--primary:hover { background: #4A90EA; border-color: #4A90EA; }
	.dfc__btn--ghost { border-color: #35507A; color: #E6EDF7; }
}

.dfc__btn:focus-visible,
.dfc__reopen:focus-visible { outline: 2px solid #2C7BE5; outline-offset: 2px; }

.dfc__actions--single .dfc__btn { flex: 0 1 auto; }

/* --- Ustawienia szczegółowe --- */

.dfc__prefs { margin-top: 18px; border-top: 1px solid #E3EAF4; }
@media (prefers-color-scheme: dark) { .dfc__prefs { border-color: #24395C; } }
.dfc__prefs[hidden] { display: none; }

.dfc__cat { padding: 16px 0; border-bottom: 1px solid #EEF3FB; }
.dfc__cat:last-of-type { border-bottom: 0; }
@media (prefers-color-scheme: dark) { .dfc__cat { border-color: #1C2E4C; } }

.dfc__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dfc__cat-name { font-size: .9375rem; font-weight: 700; }
.dfc__cat-locked { font-size: .75rem; font-weight: 600; color: #6B7280; }

.dfc__cat-desc { margin: 6px 0 0; font-size: .8125rem; line-height: 1.55; color: #55637A; }
@media (prefers-color-scheme: dark) { .dfc__cat-desc { color: #A8B8CE; } }

.dfc__services { margin: 10px 0 0; padding: 0 0 0 16px; font-size: .75rem; line-height: 1.6; color: #6B7280; }
.dfc__services li { margin: 0 0 3px; }
.dfc__services strong { display: block; color: #1F2937; font-weight: 600; }
@media (prefers-color-scheme: dark) { .dfc__services strong { color: #E6EDF7; } }

/* Przełącznik */
.dfc__switch { position: relative; flex: none; display: inline-flex; align-items: center; cursor: pointer; }
.dfc__switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.dfc__switch-track {
	position: relative;
	display: block;
	width: 44px;
	height: 24px;
	background: #C6D3E4;
	border-radius: 999px;
	transition: background-color .2s ease;
}
.dfc__switch-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
.dfc__switch input:checked + .dfc__switch-track { background: #2C7BE5; }
.dfc__switch input:checked + .dfc__switch-track::after { transform: translateX(20px); }
.dfc__switch input:focus-visible + .dfc__switch-track { outline: 2px solid #2C7BE5; outline-offset: 2px; }

/* --- Link ponownego otwarcia (stopka) --- */

.dfc__reopen {
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.dfc__reopen:hover { text-decoration: none; }

@media (max-width: 560px) {
	.dfc { padding: 10px; }
	.dfc__panel { padding: 20px 18px; border-radius: 14px; }
	.dfc__btn { flex: 1 1 100%; }
	.dfc__btn--ghost { flex: 1 1 100%; }
}
