/* TrustEdu Cookie Consent */

:root {
	--tecc-primary: #055115;
	--tecc-primary-hover: #043d11;
	--tecc-text: #1a1a1a;
	--tecc-text-muted: #6b7280;
	--tecc-bg: #ffffff;
	--tecc-surface: #f3f4f6;
	--tecc-border: #e5e7eb;
	--tecc-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	--tecc-radius: 16px;
	--tecc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ── Baner ── */
.tecc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	z-index: 999999;
	font-family: var(--tecc-font);
	font-size: 15px;
	line-height: 1.55;
	color: var(--tecc-text);
	animation: tecc-slide-in 0.35s ease-out;
	pointer-events: none;
}

.tecc-banner--bottom {
	bottom: 16px;
}

.tecc-banner--top {
	top: 16px;
	animation-name: tecc-slide-in-top;
}

.tecc-banner__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 28px;
	background: var(--tecc-bg);
	border-radius: var(--tecc-radius);
	box-shadow: var(--tecc-shadow);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	pointer-events: auto;
}

.tecc-banner__content {
	flex: 1;
	min-width: 0;
}

.tecc-banner__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--tecc-text);
	line-height: 1.3;
}

.tecc-banner__desc {
	margin: 0;
	color: var(--tecc-text-muted);
	font-size: 14px;
	line-height: 1.55;
}

.tecc-banner__link {
	color: var(--tecc-text);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}

.tecc-banner__link:hover {
	color: var(--tecc-primary);
}

.tecc-banner__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* ── Przyciski ── */
.tecc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	border-radius: 10px;
	font-family: var(--tecc-font);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	white-space: nowrap;
	line-height: 1.3;
}

.tecc-btn--primary {
	background: var(--tecc-primary);
	color: #fff;
	border-color: var(--tecc-primary);
}

.tecc-btn--primary:hover {
	background: var(--tecc-primary-hover);
	border-color: var(--tecc-primary-hover);
}

.tecc-btn--secondary {
	background: var(--tecc-surface);
	color: var(--tecc-text);
	border-color: var(--tecc-surface);
}

.tecc-btn--secondary:hover {
	background: #e5e7eb;
	border-color: #e5e7eb;
}

.tecc-btn--outline {
	background: var(--tecc-bg);
	color: var(--tecc-text);
	border-color: var(--tecc-border);
}

.tecc-btn--outline:hover {
	background: var(--tecc-surface);
	border-color: #d1d5db;
}

.tecc-btn--full {
	width: 100%;
	padding: 14px 22px;
	font-size: 15px;
}

/* ── Overlay ── */
.tecc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 999998;
	opacity: 0;
	transition: opacity 0.25s;
	pointer-events: none;
}

.tecc-overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* ── Modal ── */
.tecc-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--tecc-font);
}

.tecc-modal[hidden] {
	display: none;
}

.tecc-modal__backdrop {
	position: absolute;
	inset: 0;
}

.tecc-modal__panel {
	position: relative;
	background: var(--tecc-bg);
	border-radius: var(--tecc-radius);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: tecc-modal-in 0.3s ease-out;
}

.tecc-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 24px 24px 0;
	gap: 16px;
}

.tecc-modal__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--tecc-text);
	line-height: 1.3;
}

.tecc-modal__close {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	color: #9ca3af;
	padding: 6px;
	border-radius: 8px;
	display: flex;
	flex-shrink: 0;
	margin-top: 2px;
	transition: background 0.15s, color 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.tecc-modal__close:hover,
.tecc-modal__close:focus {
	background: var(--tecc-surface) !important;
	color: var(--tecc-text) !important;
	outline: none;
}

.tecc-modal__close:active {
	background: #e5e7eb !important;
	color: var(--tecc-text) !important;
}

.tecc-modal__intro {
	margin: 0;
	padding: 12px 24px 0;
	font-size: 14px;
	color: var(--tecc-text-muted);
	line-height: 1.55;
}

.tecc-modal__body {
	padding: 16px 24px;
	overflow-y: auto;
	flex: 1;
}

.tecc-modal__footer {
	padding: 8px 24px 24px;
}

/* ── Kategorie cookie ── */
.tecc-cookie-group {
	padding: 18px 0;
	border-bottom: 1px solid var(--tecc-border);
}

.tecc-cookie-group:last-child {
	border-bottom: none;
	padding-bottom: 8px;
}

.tecc-cookie-group__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.tecc-cookie-group__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--tecc-text);
}

.tecc-cookie-group__desc {
	margin: 0;
	font-size: 13px;
	color: var(--tecc-text-muted);
	line-height: 1.5;
}

/* ── Przełącznik ── */
.tecc-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 28px;
	flex-shrink: 0;
	margin-top: 2px;
}

.tecc-switch__input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.tecc-switch__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #d1d5db;
	border-radius: 28px;
	transition: background 0.2s;
}

.tecc-switch__slider::before {
	content: "";
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tecc-switch__input:checked + .tecc-switch__slider {
	background: var(--tecc-primary);
}

.tecc-switch__input:checked + .tecc-switch__slider::before {
	transform: translateX(22px);
}

.tecc-switch__input:focus-visible + .tecc-switch__slider {
	outline: 2px solid var(--tecc-primary);
	outline-offset: 2px;
}

.tecc-switch--locked .tecc-switch__slider {
	background: var(--tecc-primary);
	cursor: default;
	opacity: 0.85;
}

.tecc-switch--locked .tecc-switch__slider::before {
	transform: translateX(22px);
}

/* ── Animacje ── */
@keyframes tecc-slide-in {
	from {
		transform: translateY(calc(100% + 16px));
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes tecc-slide-in-top {
	from {
		transform: translateY(calc(-100% - 16px));
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes tecc-modal-in {
	from {
		transform: scale(0.96) translateY(8px);
		opacity: 0;
	}
	to {
		transform: scale(1) translateY(0);
		opacity: 1;
	}
}

.tecc-banner.is-hidden {
	display: none;
}

/* ── Responsywność — mobile: dolny pasek na pełną szerokość ── */
@media (max-width: 768px) {
	.tecc-banner {
		left: 0;
		right: 0;
	}

	.tecc-banner--bottom {
		bottom: 0;
	}

	.tecc-banner--top {
		top: 0;
	}

	.tecc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		max-width: none;
		margin: 0;
		padding: 18px 16px;
		padding-bottom: max(18px, env(safe-area-inset-bottom));
		gap: 16px;
		border-radius: 0;
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
	}

	.tecc-banner--top .tecc-banner__inner {
		box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
	}

	.tecc-banner__title {
		font-size: 16px;
	}

	.tecc-banner__desc {
		font-size: 13px;
	}

	.tecc-banner__actions {
		flex-direction: column-reverse;
		gap: 8px;
	}

	.tecc-btn {
		width: 100%;
	}

	/* Ustawienia: dolny panel, nie pełnoekranowy popup */
	.tecc-overlay.is-visible {
		background: rgba(0, 0, 0, 0.2);
	}

	.tecc-modal {
		align-items: flex-end;
		justify-content: center;
		padding: 0;
	}

	.tecc-modal__panel {
		max-width: none;
		width: 100%;
		max-height: min(72vh, 520px);
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
		animation: tecc-sheet-in 0.3s ease-out;
	}

	.tecc-modal__header {
		padding: 18px 16px 0;
	}

	.tecc-modal__intro {
		padding: 10px 16px 0;
		font-size: 13px;
	}

	.tecc-modal__body {
		padding: 12px 16px;
	}

	.tecc-modal__footer {
		padding: 8px 16px 16px;
		padding-bottom: max(16px, env(safe-area-inset-bottom));
	}

	.tecc-cookie-group {
		padding: 14px 0;
	}

	.tecc-cookie-group__title {
		font-size: 14px;
	}

	.tecc-cookie-group__desc {
		font-size: 12px;
	}
}

@keyframes tecc-sheet-in {
	from {
		transform: translateY(100%);
		opacity: 0.9;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ── Dostępność ── */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}
