/* Consent Mode v2 | GTM | by INVTIV. Kolory przychodzą z ustawień jako zmienne --icc-*. */
.invtiv-cc {
	--icc-primary: #1f2937;
	--icc-primary-text: #ffffff;
	--icc-bg: #ffffff;
	--icc-text: #1f2937;
	--icc-radius: 12px;
	--icc-font: inherit;
}

.invtiv-cc[hidden],
.invtiv-cc [hidden] {
	display: none !important;
}

.invtiv-cc,
.invtiv-cc * {
	box-sizing: border-box;
}

.invtiv-cc--bottom-left,
.invtiv-cc--bottom-right,
.invtiv-cc--bottom,
.invtiv-cc--center {
	position: fixed;
	z-index: 2147483000;
	font-family: var(--icc-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--icc-text);
}

.invtiv-cc--bottom-left { left: 16px; bottom: 16px; max-width: 440px; width: calc(100% - 32px); }
.invtiv-cc--bottom-right { right: 16px; bottom: 16px; max-width: 440px; width: calc(100% - 32px); }
.invtiv-cc--bottom { left: 0; right: 0; bottom: 0; }
.invtiv-cc--center { inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }

.invtiv-cc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
}

.invtiv-cc__box {
	position: relative;
	background: var(--icc-bg);
	color: var(--icc-text);
	border-radius: var(--icc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
	padding: 22px 22px 18px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
}

.invtiv-cc--bottom .invtiv-cc__box {
	border-radius: var(--icc-radius) var(--icc-radius) 0 0;
	max-width: 1100px;
	margin: 0 auto;
}

.invtiv-cc--center .invtiv-cc__box {
	max-width: 560px;
	width: 100%;
}

.invtiv-cc__title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.invtiv-cc__msg,
.invtiv-cc__links {
	margin: 0 0 14px;
	font-size: 14px;
	color: inherit;
}

.invtiv-cc__links {
	font-size: 13px;
}

.invtiv-cc__msg a,
.invtiv-cc__links a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.invtiv-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.invtiv-cc__actions .invtiv-cc__btn {
	flex: 1 1 140px;
}

.invtiv-cc__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	border: 2px solid var(--icc-primary);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	transition: opacity 0.15s ease;
}

.invtiv-cc__btn:hover { opacity: 0.88; }

.invtiv-cc__btn:focus-visible,
.invtiv-cc__switch input:focus-visible + span,
.invtiv-cc-float:focus-visible {
	outline: 3px solid var(--icc-primary);
	outline-offset: 2px;
}

/* „Akceptuj” i „Odrzuć” wyglądają identycznie: EDPB i UODO uznają nierówne przyciski za nakłanianie do zgody. */
.invtiv-cc__btn--primary {
	background: var(--icc-primary);
	color: var(--icc-primary-text);
}

.invtiv-cc__btn--outline {
	background: transparent;
	color: var(--icc-text);
}

.invtiv-cc__cats {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}

.invtiv-cc__cat {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid rgba(127, 127, 127, 0.25);
}

.invtiv-cc__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.invtiv-cc__cat-title {
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}

.invtiv-cc__cat-desc {
	margin: 4px 0 0;
	font-size: 13px;
	opacity: 0.85;
}

.invtiv-cc__switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
}

.invtiv-cc__switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.invtiv-cc__switch input:disabled { cursor: not-allowed; }

.invtiv-cc__switch span {
	position: absolute;
	inset: 0;
	border-radius: 26px;
	background: #9ca3af;
	transition: background 0.15s ease;
}

.invtiv-cc__switch span::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
}

.invtiv-cc__switch input:checked + span { background: var(--icc-primary); }
.invtiv-cc__switch input:checked + span::after { transform: translateX(20px); }
.invtiv-cc__switch input:disabled + span { opacity: 0.6; }

.invtiv-cc-float {
	position: fixed;
	bottom: 16px;
	z-index: 2147482999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--icc-primary);
	color: var(--icc-primary-text);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.invtiv-cc-float--left { left: 16px; }
.invtiv-cc-float--right { right: 16px; }

.invtiv-cc-embed {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 200px;
	padding: 24px;
	background: #f3f4f6;
	color: #1f2937;
	border-radius: 8px;
	text-align: center;
	font-size: 14px;
}

.invtiv-cc-embed p { margin: 0; max-width: 460px; }

html.invtiv-cc-lock { overflow: hidden; }

@media (max-width: 600px) {
	.invtiv-cc--bottom-left,
	.invtiv-cc--bottom-right { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
	.invtiv-cc__box { padding: 18px 16px 14px; }
	.invtiv-cc__actions .invtiv-cc__btn { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.invtiv-cc *, .invtiv-cc-float { transition: none !important; }
}
