:root {
	--tf-cta: #7362fc;
	--tf-cta-light: #f4f2ff;
	--tf-gray-50: #f9fafb;
	--tf-gray-100: #f3f4f6;
	--tf-gray-200: #e5e7eb;
	--tf-gray-300: #d1d5db;
	--tf-gray-500: #6b7280;
	--tf-gray-700: #374151;
	--tf-gray-900: #111827;
}

.tf-consent-banner,
.tf-consent-banner *,
.tf-consent-modal,
.tf-consent-modal * {
	box-sizing: border-box;
}

.tf-consent-banner,
.tf-consent-modal,
.tf-consent-banner p,
.tf-consent-modal p,
.tf-consent-banner h2,
.tf-consent-modal h2,
.tf-consent-banner button,
.tf-consent-modal button,
.tf-consent-modal a {
	font-family: Inter, Arial, sans-serif !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

.tf-consent-banner p,
.tf-consent-modal p,
.tf-consent-banner h2,
.tf-consent-modal h2 {
	max-width: none !important;
}

.tf-consent-banner,
.tf-consent-modal {
	font-family: Inter, Arial, sans-serif;
	color: var(--tf-gray-900);
}

/* Guard against theme-level global button/submit styling bleeding into consent UI. */
.tf-consent-banner button:not(.tf-close),
.tf-consent-modal button:not(.tf-close),
.tf-consent-banner input[type="submit"],
.tf-consent-modal input[type="submit"] {
	height: auto !important;
	max-height: none !important;
}

.tf-consent-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	background: var(--tf-cta-light);
	border-top: 1px solid rgba(115, 98, 252, 0.28);
	padding: 16px;
	box-shadow: 0 -4px 24px rgba(17, 24, 39, 0.08);
}

.tf-consent-banner-content {
	width: min(60vw, 920px);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.tf-consent-banner-text {
	flex: 1 1 640px;
}

.tf-consent-title {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--tf-gray-900);
}

.tf-consent-copy {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--tf-gray-700);
}

.tf-consent-actions,
.tf-consent-modal-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tf-btn {
	border: 1px solid var(--tf-cta);
	color: #fff;
	background: var(--tf-cta);
	padding: 10px 20px;
	font-size: 14px;
	line-height: 1;
	font-weight: 600;
	cursor: pointer;
	height: auto !important;
	min-height: 44px;
	border-radius: 8px;
}

.tf-btn:hover {
	background: #5f4be7;
}

.tf-btn:focus-visible,
.tf-switch input:focus-visible + .tf-switch-ui,
.tf-cookie-settings:focus-visible,
.tf-privacy-settings:focus-visible,
[data-tf-cookie-settings]:focus-visible,
[data-tf-privacy-settings]:focus-visible,
.tf-tab:focus-visible,
.tf-category-head:focus-visible,
.tf-close:focus-visible {
	outline: 3px solid var(--tf-cta);
	outline-offset: 2px;
}

.tf-btn,
.tf-close,
.tf-tab,
.tf-category-head {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
}

.tf-btn-primary {
	background: var(--tf-cta);
	color: #fff;
	border-color: var(--tf-cta);
}

.tf-btn-primary:hover {
	background: #5f4be7;
}

.tf-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(17, 24, 39, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.tf-consent-modal-panel {
	width: min(60vw, 920px);
	max-height: min(92vh, 920px);
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	background: #fff;
	border: 1px solid var(--tf-gray-200);
	border-radius: 14px;
	overflow: hidden;
}

.tf-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--tf-gray-200);
}

.tf-modal-head h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--tf-gray-900);
}

.tf-close {
	border: 1px solid var(--tf-gray-300);
	background: #fff;
	color: var(--tf-gray-700);
	width: 36px;
	height: 36px !important;
	min-height: 36px !important;
	max-height: 36px !important;
	border-radius: 8px;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	padding: 0;
}

.tf-tablist {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid var(--tf-gray-200);
	background: var(--tf-gray-50);
}

.tf-tab {
	padding: 16px 18px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2 !important;
	height: auto !important;
	min-height: 0 !important;
	border: 0;
	border-right: 1px solid var(--tf-gray-200);
	background: transparent;
	color: var(--tf-gray-900);
	cursor: pointer;
}

.tf-tab:last-child {
	border-right: 0;
}

.tf-tab.is-active {
	color: var(--tf-cta);
	box-shadow: inset 0 -3px 0 0 var(--tf-cta);
	background: #fff;
}

.tf-panels {
	overflow: auto;
	padding: 0;
	background: #fff;
}

.tf-panel {
	padding: 26px 24px !important;
}

.tf-panel-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2 !important;
	color: var(--tf-gray-900);
}

.tf-panel-copy {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.65;
	color: var(--tf-gray-700);
}

.tf-consent-modal-panel-compact {
	width: min(92vw, 560px);
	max-height: min(86vh, 560px);
	grid-template-rows: auto 1fr;
}

.tf-us-privacy-panel {
	padding: 24px;
	display: grid;
	gap: 18px;
	background: #fff;
	overflow: auto;
}

.tf-us-choice-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	border: 1px solid var(--tf-gray-200);
	background: var(--tf-gray-50);
	border-radius: 12px;
}

.tf-us-choice-copy-wrap {
	display: grid;
	gap: 8px;
}

.tf-us-choice-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--tf-gray-900);
}

.tf-us-choice-copy,
.tf-us-choice-note {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--tf-gray-700);
}

.tf-us-choice-note {
	color: #92400e;
	font-weight: 600;
}

.tf-us-privacy-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

.tf-us-privacy-actions .tf-btn {
	flex: 1 1 180px;
}

.tf-category {
	border-top: 1px solid var(--tf-gray-200);
}

.tf-category:last-child {
	border-bottom: 1px solid var(--tf-gray-200);
}

.tf-category-head {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 12px;
	height: auto !important;
	min-height: 0 !important;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	line-height: 1.2 !important;
}

.tf-category-title-wrap {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-right: auto;
}

.tf-accordion-icon {
	font-size: 22px;
	line-height: 1;
	color: var(--tf-gray-500);
	transform: rotate(0deg);
	transition: transform 0.18s ease;
}

.tf-category-head[aria-expanded="false"] .tf-accordion-icon {
	transform: rotate(-90deg);
}

.tf-category-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2 !important;
	color: var(--tf-gray-900);
}

.tf-cat-count {
	font-size: 12px;
	font-weight: 700;
	background: var(--tf-gray-200);
	color: var(--tf-gray-700);
	padding: 2px 8px;
	border-radius: 999px;
}

.tf-category-body {
	padding: 0 16px 18px 54px;
}

.tf-category-copy {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--tf-gray-700);
}

.tf-services-list {
	display: grid;
	gap: 12px;
}

.tf-service-row {
	border: 1px solid var(--tf-gray-200);
	background: var(--tf-gray-50);
	border-radius: 10px;
	padding: 12px;
}

.tf-service-title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--tf-gray-900);
}

.tf-service-desc,
.tf-service-meta {
	margin: 0 0 6px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--tf-gray-700);
}

.tf-service-link {
	font-size: 12px;
	font-weight: 600;
	color: var(--tf-cta);
	text-decoration: underline;
}

.tf-service-empty {
	font-size: 13px;
	color: var(--tf-gray-500);
	margin: 0;
}

.tf-switch {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
}

.tf-switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tf-switch-ui {
	position: relative;
	display: inline-block;
	width: 58px;
	height: 32px;
	border-radius: 999px;
	border: 1px solid var(--tf-gray-300);
	background: var(--tf-gray-300);
	transition: all 0.2s ease;
}

.tf-switch-ui::after {
	content: '';
	position: absolute;
	left: 3px;
	top: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}

.tf-switch input:checked + .tf-switch-ui {
	background: #0ea5e9;
	border-color: #0ea5e9;
}

.tf-switch input:checked + .tf-switch-ui::after {
	transform: translateX(25px);
}

.tf-switch input:disabled + .tf-switch-ui {
	opacity: 0.6;
	cursor: not-allowed;
}

.tf-consent-modal-actions {
	padding: 16px 24px;
	border-top: 1px solid var(--tf-gray-200);
	background: #fff;
	justify-content: space-between;
}

.tf-consent-modal-actions .tf-btn {
	flex: 1 1 30%;
	min-height: 50px;
}

.tf-cookie-settings,
.tf-privacy-settings {
	color: var(--tf-cta);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tf-consent-modal[hidden],
.tf-consent-banner[hidden] {
	display: none !important;
}

html.tf-consent-modal-open,
html.tf-consent-modal-open body {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.tf-consent-banner-content {
		width: min(85vw, 920px);
	}

	.tf-consent-modal-panel {
		width: min(85vw, 920px);
	}

	.tf-consent-modal-panel-compact {
		width: min(85vw, 560px);
	}

	.tf-consent-title {
		font-size: 20px;
	}

	.tf-modal-head h2 {
		font-size: 20px;
	}

	.tf-tab {
		font-size: 14px;
	}

	.tf-category-title {
		font-size: 17px;
	}

	.tf-category-copy {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.tf-consent-banner-content {
		width: 100%;
	}

	.tf-consent-modal {
		padding: 10px;
	}

	.tf-consent-modal-panel {
		width: 100%;
		max-height: 96vh;
	}

	.tf-consent-modal-panel-compact {
		width: 100%;
		max-height: 96vh;
	}

	.tf-consent-actions,
	.tf-consent-modal-actions,
	.tf-us-privacy-actions {
		width: 100%;
	}

	.tf-btn {
		flex: 1 1 100%;
	}

	.tf-tab {
		font-size: 13px;
		padding: 14px 10px;
	}

	.tf-category-body {
		padding: 0 8px 16px 40px;
	}

	.tf-category-title {
		font-size: 16px;
	}

	.tf-category-copy {
		font-size: 13px;
	}

	.tf-us-privacy-panel {
		padding: 18px;
	}

	.tf-us-choice-row {
		flex-direction: column;
	}
}

[data-tf-youtube-id] {
	position: relative;
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--tf-gray-200);
	background: #fff;
	border-radius: 10px;
}

.tf-yt-play {
	display: block;
	width: 100%;
	background: #fff;
	border: 0;
	color: var(--tf-gray-900);
	cursor: pointer;
	padding: 0;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
}

.tf-yt-play img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.92;
}

.tf-yt-play-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 44px;
	line-height: 1;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.tf-yt-consent-needed {
	padding: 16px;
	color: var(--tf-gray-700);
}
