/* Atoja Core — baner zgód cookie (Consent Mode v2). */
.atoja-consent {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 99999;
	padding: 14px;
	pointer-events: none;
	font-family: inherit;
}

.atoja-consent[hidden] {
	display: none;
}

.atoja-consent__box {
	pointer-events: auto;
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	color: #1f1f1f;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
	padding: 22px 24px;
	font-size: 14px;
	line-height: 1.55;
	animation: atoja-consent-in 0.35s ease-out;
}

@keyframes atoja-consent-in {
	from { transform: translateY(24px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

.atoja-consent__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.atoja-consent__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #FCEAEA;
	color: #E42D2D;
	flex: 0 0 auto;
}

.atoja-consent__title {
	font-size: 16px;
	font-weight: 700;
}

.atoja-consent__text {
	margin: 0 0 14px;
	color: #555;
}

.atoja-consent__text a {
	color: #E42D2D;
	text-decoration: underline;
}

/* Panel opcji — domyślnie zwinięty; steruje klasa .is-open (nie [hidden]). */
.atoja-consent__options {
	display: none;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	margin: 0 0 14px;
	padding: 6px 0;
}

.atoja-consent.is-open .atoja-consent__options {
	display: block;
}

.atoja-consent__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 0;
	cursor: pointer;
}

.atoja-consent__option + .atoja-consent__option {
	border-top: 1px solid #f3f3f3;
}

.atoja-consent__option-label {
	display: block;
	font-weight: 600;
}

.atoja-consent__option-desc {
	display: block;
	font-size: 12.5px;
	color: #777;
}

/* Przełącznik (switch) */
.atoja-consent__switch {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.atoja-consent__slider {
	flex: 0 0 44px;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: #d4d4d4;
	position: relative;
	transition: background 0.2s;
}

.atoja-consent__slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s;
}

.atoja-consent__switch:checked + .atoja-consent__slider {
	background: #E42D2D;
}

.atoja-consent__switch:checked + .atoja-consent__slider::after {
	transform: translateX(20px);
}

.atoja-consent__switch:disabled + .atoja-consent__slider {
	background: #F0A9A9;
	cursor: not-allowed;
}

.atoja-consent__switch:focus-visible + .atoja-consent__slider {
	outline: 2px solid #E42D2D;
	outline-offset: 2px;
}

/* Przyciski */
.atoja-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.atoja-consent__btn {
	border: 0;
	border-radius: 999px;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s, background 0.15s;
}

.atoja-consent__btn--primary {
	background: #E42D2D;
	color: #fff;
}

.atoja-consent__btn--primary:hover {
	filter: brightness(0.92);
}

.atoja-consent__btn--secondary {
	background: #fff;
	color: #1f1f1f;
	border: 1.5px solid #d4d4d4;
}

.atoja-consent__btn--secondary:hover {
	border-color: #999;
}

.atoja-consent__btn--ghost {
	background: none;
	color: #666;
	text-decoration: underline;
	padding-inline: 8px;
}

/* "Zapisz mój wybór" widoczny tylko po rozwinięciu opcji. */
.atoja-consent [data-action="save"] {
	display: none;
}

.atoja-consent.is-open [data-action="save"] {
	display: inline-block;
}

.atoja-consent.is-open [data-action="settings"] {
	display: none;
}

/* Pływający przycisk ponownego otwarcia. */
.atoja-consent-reopen {
	position: fixed;
	left: 14px;
	bottom: 14px;
	z-index: 99998;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #555;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	transition: transform 0.15s;
}

.atoja-consent-reopen:hover {
	transform: scale(1.08);
	color: #E42D2D;
}

.atoja-consent-reopen[hidden] {
	display: none;
}

@media (max-width: 640px) {
	.atoja-consent {
		padding: 8px;
	}

	.atoja-consent__box {
		padding: 18px;
		border-radius: 14px;
	}

	.atoja-consent__btn--primary,
	.atoja-consent__btn--secondary {
		flex: 1 1 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atoja-consent__box {
		animation: none;
	}
}
