/* Baner i okno ustawień cookies (assets/js/cookie-consent.js). */

.wcs-cc-banner,
.wcs-cc-dialog {
	--cc-green: #005f9b;
	--cc-green-dark: #004a7a;
	--cc-ink: #23343b;
	--cc-muted: #4a5a60;
	--cc-line: #e2e5e6;
	color: var(--cc-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* ---------- Baner ---------- */

.wcs-cc-banner {
	align-items: center;
	background: #fff;
	border: 1px solid var(--cc-line);
	border-radius: 20px;
	bottom: 1rem;
	box-shadow: 0 12px 40px rgba(35, 52, 59, 0.22);
	display: flex;
	gap: 1rem 1.5rem;
	left: 1rem;
	margin: 0 auto;
	max-width: 62rem;
	padding: 1.1rem 1.4rem;
	position: fixed;
	right: 1rem;
	z-index: 99999;
}

.wcs-cc-banner[hidden] {
	display: none;
}

.wcs-cc-banner__text {
	flex: 1 1 24rem;
}

.wcs-cc-banner p,
.wcs-cc-dialog p {
	color: var(--cc-muted);
	margin: 0;
}

.wcs-cc-banner__title {
	color: var(--cc-ink) !important;
	font-size: 1.05rem;
	font-weight: 800;
	margin-bottom: 0.25rem !important;
}

.wcs-cc-banner a,
.wcs-cc-dialog a {
	color: var(--cc-green-dark);
	text-decoration: underline;
}

.wcs-cc-actions {
	align-items: center;
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: flex-end;
}

/* ---------- Przyciski (Akceptuję i Tylko niezbędne mają tę samą wagę) ---------- */

button.wcs-cc-btn {
	border: 2px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	padding: 0.7em 1.25em;
	text-shadow: none;
	transition: background-color 0.15s, color 0.15s;
}

button.wcs-cc-btn:focus-visible,
button.wcs-cc-close:focus-visible,
input.wcs-cc-switch:focus-visible {
	outline: 3px solid var(--cc-green);
	outline-offset: 2px;
}

button.wcs-cc-btn--green {
	background: var(--cc-green);
	border-color: var(--cc-green);
	color: #fff;
}

button.wcs-cc-btn--green:hover {
	background: var(--cc-green-dark);
	border-color: var(--cc-green-dark);
	color: #fff;
}

button.wcs-cc-btn--dark {
	background: var(--cc-ink);
	border-color: var(--cc-ink);
	color: #fff;
}

button.wcs-cc-btn--dark:hover {
	background: #0f1c21;
	border-color: #0f1c21;
	color: #fff;
}

button.wcs-cc-btn--outline {
	background: #fff;
	border-color: var(--cc-green);
	color: var(--cc-green-dark);
}

button.wcs-cc-btn--outline:hover {
	background: var(--cc-green);
	color: #fff;
}

button.wcs-cc-btn--link {
	background: transparent;
	border-color: transparent;
	color: var(--cc-green-dark);
	text-decoration: underline;
}

button.wcs-cc-btn--link:hover {
	background: transparent;
	color: var(--cc-ink);
}

/* ---------- Okno ustawień ---------- */

.wcs-cc-dialog {
	background: #fff;
	border: 0;
	border-radius: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	max-height: calc(100vh - 2rem);
	max-width: 34rem;
	padding: 0;
	width: calc(100% - 2rem);
}

.wcs-cc-dialog::backdrop {
	background: rgba(35, 52, 59, 0.6);
}

.wcs-cc-dialog__inner {
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 1.5rem 1.6rem 1.6rem;
}

.wcs-cc-dialog__head {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.6rem;
}

.wcs-cc-dialog__head h2 {
	color: var(--cc-ink);
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0;
}

button.wcs-cc-close {
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--cc-ink);
	cursor: pointer;
	font-size: 1.8rem;
	height: 2.4rem;
	line-height: 1;
	padding: 0;
	width: 2.4rem;
}

button.wcs-cc-close:hover {
	background: #eceeef;
	color: var(--cc-ink);
}

.wcs-cc-cat {
	border: 1px solid var(--cc-line);
	border-radius: 16px;
	margin-top: 0.8rem;
	padding: 0.9rem 1.1rem;
}

.wcs-cc-cat__head {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.wcs-cc-cat__title {
	color: var(--cc-ink);
	cursor: pointer;
	font-size: 1.05rem;
	font-weight: 800;
	margin: 0;
}

.wcs-cc-cat__desc {
	font-size: 0.9rem;
	margin-top: 0.35rem !important;
}

/* Przełącznik zrobiony ze zwykłego pola wyboru – dostępny z klawiatury i czytników ekranu. */
input.wcs-cc-switch {
	-webkit-appearance: none;
	appearance: none;
	background: #c3c9ca;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	flex: none;
	height: 1.7rem;
	margin: 0;
	padding: 0;
	position: relative;
	transition: background-color 0.15s;
	width: 3rem;
}

input.wcs-cc-switch::before {
	background: #fff;
	border-radius: 50%;
	content: "";
	height: 1.3rem;
	left: 0.2rem;
	position: absolute;
	top: 0.2rem;
	transition: transform 0.15s;
	width: 1.3rem;
}

input.wcs-cc-switch:checked {
	background: var(--cc-green);
}

input.wcs-cc-switch:checked::before {
	transform: translateX(1.3rem);
}

input.wcs-cc-switch:disabled {
	cursor: not-allowed;
	opacity: 0.65;
}

.wcs-cc-actions--dialog {
	justify-content: flex-end;
	margin-top: 1.3rem;
}

/* ---------- Ekrany mniejsze ---------- */

@media (max-width: 640px) {
	.wcs-cc-banner {
		align-items: stretch;
		border-radius: 18px;
		bottom: 0.5rem;
		flex-direction: column;
		font-size: 0.9rem;
		gap: 0.75rem;
		left: 0.5rem;
		max-height: calc(100vh - 1rem);
		overflow-y: auto;
		padding: 1rem 1.1rem;
		right: 0.5rem;
	}

	.wcs-cc-banner__text {
		flex: 0 0 auto;
	}

	.wcs-cc-actions {
		justify-content: stretch;
		width: 100%;
	}

	/* „Tylko niezbędne” i „Akceptuję wszystkie” obok siebie, tej samej wielkości. */
	.wcs-cc-actions button.wcs-cc-btn--green,
	.wcs-cc-actions button.wcs-cc-btn--dark,
	.wcs-cc-actions button.wcs-cc-btn--outline {
		flex: 1 1 calc(50% - 0.3rem);
		padding-left: 0.6em;
		padding-right: 0.6em;
	}

	.wcs-cc-actions button.wcs-cc-btn--link {
		flex: 1 1 100%;
		order: 3;
	}
}

@media (prefers-reduced-motion: reduce) {
	button.wcs-cc-btn,
	input.wcs-cc-switch,
	input.wcs-cc-switch::before {
		transition: none;
	}
}
