/* Techfun Cookies — banner & modal */
:root {
	--tfc-primary: #1e73be;
	--tfc-text: #222;
	--tfc-bg: #fff;
	--tfc-border: rgba(0, 0, 0, .12);
	--tfc-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
	--tfc-radius: 8px;
	--tfc-gap: 12px;
}

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

.tfc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99998;
	background: var(--tfc-bg);
	color: var(--tfc-text);
	border-top: 1px solid var(--tfc-border);
	box-shadow: var(--tfc-shadow);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
}

.tfc-banner__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	gap: 20px;
	align-items: center;
	flex-wrap: wrap;
}

.tfc-banner__text {
	flex: 1 1 360px;
	min-width: 0;
}

.tfc-banner__title {
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 4px;
}

.tfc-banner__desc p {
	margin: 0 0 6px;
}

.tfc-banner__desc p:last-child {
	margin-bottom: 0;
}

.tfc-banner__policy {
	color: var(--tfc-primary);
	text-decoration: underline;
	margin-left: 4px;
}

.tfc-banner__actions {
	display: flex;
	gap: var(--tfc-gap);
	flex-wrap: wrap;
	justify-content: flex-end;
}

.tfc-banner .tfc-btn,
.tfc-modal .tfc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: var(--tfc-radius);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	transition: opacity .15s, transform .05s;
	text-decoration: none;
}

.tfc-banner .tfc-btn:focus-visible,
.tfc-modal .tfc-btn:focus-visible {
	outline: 2px solid var(--tfc-primary);
	outline-offset: 2px;
}

.tfc-banner .tfc-btn:active,
.tfc-modal .tfc-btn:active {
	transform: translateY(1px);
}

.tfc-banner .tfc-btn--primary,
.tfc-modal .tfc-btn--primary {
	background: var(--tfc-primary);
	color: #fff;
	border-color: var(--tfc-primary);
}

.tfc-banner .tfc-btn--primary:hover,
.tfc-modal .tfc-btn--primary:hover {
	background: var(--tfc-primary);
	color: #fff;
	opacity: .9;
}

.tfc-banner .tfc-btn--ghost,
.tfc-modal .tfc-btn--ghost {
	background: transparent;
	color: var(--tfc-text) !important;
	border-color: var(--tfc-border);
}

.tfc-banner .tfc-btn--ghost:hover,
.tfc-modal .tfc-btn--ghost:hover {
	background: rgba(0, 0, 0, .04);
	color: var(--tfc-text) !important;
}

.tfc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	line-height: 1.5;
}

.tfc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.tfc-modal__dialog {
	position: relative;
	background: var(--tfc-bg);
	color: var(--tfc-text);
	width: min(640px, calc(100% - 32px));
	max-height: calc(100vh - 64px);
	border-radius: var(--tfc-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.5;
}

.tfc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--tfc-border);
}

.tfc-modal__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
	color: var(--tfc-text);
	font-weight: 600;
}

.tfc-modal__close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--tfc-text);
	padding: 0 4px;
}

.tfc-modal__body {
	padding: 16px 20px;
	overflow-y: auto;
}

.tfc-modal__desc {
	margin-bottom: 14px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--tfc-text);
}

.tfc-modal__desc p {
	margin: 0 0 8px;
}

.tfc-modal__desc p:last-child {
	margin-bottom: 0;
}

.tfc-modal__footer {
	display: flex;
	gap: var(--tfc-gap);
	padding: 14px 20px;
	border-top: 1px solid var(--tfc-border);
	justify-content: flex-end;
	flex-wrap: wrap;
}

.tfc-cat {
	padding: 14px 0;
	border-top: 1px solid var(--tfc-border);
}

.tfc-cat:first-of-type {
	border-top: 0;
}

.tfc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tfc-cat__title {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	color: var(--tfc-text);
}

.tfc-cat__desc {
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.5;
	opacity: .85;
	color: var(--tfc-text);
}

.tfc-cat__desc p {
	margin: 0 0 4px;
}

.tfc-cat__desc p:last-child {
	margin-bottom: 0;
}

.tfc-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex: 0 0 auto;
}

.tfc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.tfc-switch input:disabled {
	cursor: not-allowed;
}

.tfc-switch__slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 24px;
	transition: background .15s;
}

.tfc-switch__slider::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 2px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.tfc-switch input:checked+.tfc-switch__slider {
	background: var(--tfc-primary);
}

.tfc-switch input:checked+.tfc-switch__slider::before {
	transform: translateX(20px);
}

.tfc-switch input:focus-visible+.tfc-switch__slider {
	box-shadow: 0 0 0 2px var(--tfc-primary);
}

.tfc-switch input:disabled {
	cursor: not-allowed;
}

.tfc-switch input:disabled:checked+.tfc-switch__slider {
	background: var(--tfc-primary);
	opacity: .55;
	cursor: not-allowed;
}

.tfc-switch input:disabled:checked+.tfc-switch__slider::before {
	background: #fff;
	box-shadow: none;
}

.tfc-reopen {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 99997;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--tfc-primary);
	color: #fff;
	border: 0;
	cursor: pointer;
	padding: 10px 14px;
	border-radius: 999px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
	font: inherit;
	font-weight: 600;
	font-size: 13px;
}

.tfc-reopen:focus-visible {
	outline: 2px solid var(--tfc-primary);
	outline-offset: 2px;
}

.tfc-reopen__icon {
	font-size: 18px;
}

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width:640px) {
	.tfc-banner__actions {
		width: 100%;
		justify-content: stretch;
	}

	.tfc-banner__actions .tfc-btn {
		flex: 1 1 auto;
	}

	.tfc-reopen__text {
		display: none;
	}

	.tfc-reopen {
		padding: 12px;
	}
}
