.tmcc,
.tmcc-float,
.tmcc-ph {
	--tmcc-dark: #0e2240;
	--tmcc-accent: #e0662f;
	--tmcc-bg: #fff;
	--tmcc-muted: #5b6778;
	--tmcc-line: #e3e8ef;
	font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--tmcc-dark);
	box-sizing: border-box;
}

.tmcc *,
.tmcc *::before,
.tmcc *::after {
	box-sizing: border-box;
}

.tmcc[hidden],
.tmcc [hidden],
.tmcc-float[hidden] {
	display: none !important;
}

/* ---------- baner ---------- */

.tmcc__banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--tmcc-bg);
	box-shadow: 0 10px 40px rgba(14, 34, 64, .25);
	padding: 22px;
}

.tmcc--box .tmcc__banner {
	left: 20px;
	bottom: 20px;
	width: min(440px, calc(100vw - 40px));
	border-radius: 14px;
}

.tmcc--bar .tmcc__banner {
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 14px 14px 0 0;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 32px;
	align-items: center;
	padding: 20px max(20px, calc((100vw - 1200px) / 2));
}

.tmcc--bar .tmcc__head {
	grid-column: 1;
}

.tmcc--bar .tmcc__text {
	grid-column: 1;
	margin: 0;
}

.tmcc--bar .tmcc__actions {
	grid-column: 2;
	grid-row: 1 / span 2;
	margin: 0;
}

.tmcc__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.tmcc__logo {
	flex: 0 0 auto;
	width: auto;
	max-width: 40%;
	object-fit: contain;
	object-position: right top;
}

.tmcc__title {
	margin: 0;
	font-family: Anton, Impact, "Arial Narrow", sans-serif;
	font-size: 22px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--tmcc-dark);
}

.tmcc__text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--tmcc-muted);
}

.tmcc__text a,
.tmcc__small a {
	color: var(--tmcc-dark);
	font-weight: 700;
	text-decoration: underline;
}

.tmcc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

/* „Akceptuj” i „Odrzuć” mają identyczny wygląd – wymóg równorzędnego wyboru. */
.tmcc-btn {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.tmcc-btn--solid {
	background: var(--tmcc-dark);
	color: #fff;
	border: 2px solid var(--tmcc-dark);
}

.tmcc-btn--solid:hover,
.tmcc-btn--solid:focus-visible {
	background: var(--tmcc-accent);
	border-color: var(--tmcc-accent);
}

.tmcc-btn--ghost {
	background: transparent;
	color: var(--tmcc-dark);
	border: 2px solid var(--tmcc-dark);
}

.tmcc-btn--ghost:hover,
.tmcc-btn--ghost:focus-visible {
	color: var(--tmcc-accent);
	border-color: var(--tmcc-accent);
}

.tmcc-btn:focus-visible,
.tmcc-float:focus-visible,
.tmcc__switch input:focus-visible + .tmcc__slider {
	outline: 3px solid var(--tmcc-accent);
	outline-offset: 2px;
}

/* ---------- okno ustawień ---------- */

.tmcc__modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	background: rgba(14, 34, 64, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tmcc__panel {
	background: var(--tmcc-bg);
	border-radius: 14px;
	width: min(560px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
}

.tmcc__cat {
	padding: 14px 0;
	border-bottom: 1px solid var(--tmcc-line);
}

.tmcc__switch {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
}

.tmcc__switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.tmcc__slider {
	position: relative;
	flex: 0 0 44px;
	height: 24px;
	border-radius: 999px;
	background: #c5ccd6;
	transition: background-color .15s;
}

.tmcc__slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}

.tmcc__switch input:checked + .tmcc__slider {
	background: var(--tmcc-accent);
}

.tmcc__switch input:checked + .tmcc__slider::after {
	transform: translateX(20px);
}

.tmcc__switch input:disabled + .tmcc__slider {
	opacity: .6;
}

.tmcc__cat-name em {
	font-weight: 400;
	font-size: 13px;
	color: var(--tmcc-muted);
}

.tmcc__cat-desc {
	margin: 6px 0 0 56px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--tmcc-muted);
}

.tmcc__small {
	margin: 14px 0 0;
	font-size: 13px;
}

/* ---------- pływający przycisk ---------- */

.tmcc-float {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--tmcc-dark);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(14, 34, 64, .3);
}

.tmcc-float:hover {
	background: var(--tmcc-accent);
}

/* ---------- zablokowane iframe'y ---------- */

iframe[data-tmcc-blocked] {
	display: none !important;
}

.tmcc-ph {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px;
	border: 1px dashed #c5ccd6;
	border-radius: 14px;
	background: #f4f6f9;
	font-size: 14px;
	line-height: 1.5;
}

.tmcc-ph p {
	margin: 0;
}

.tmcc-ph .tmcc-btn {
	flex: 0 0 auto;
}

/* ---------- telefon ---------- */

@media (max-width: 640px) {
	.tmcc--box .tmcc__banner,
	.tmcc--bar .tmcc__banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		border-radius: 14px 14px 0 0;
		display: block;
		padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
		max-height: 80vh;
		overflow-y: auto;
	}

	.tmcc__actions {
		flex-direction: column;
	}

	.tmcc-btn {
		width: 100%;
	}

	.tmcc__cat-desc {
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tmcc-btn,
	.tmcc__slider,
	.tmcc__slider::after {
		transition: none;
	}
}
