/* ════════════════════════════════════════════════════════════════════
   TinyBull Cookie Consent — banner + modal + revisit pill
   All selectors prefixed with .tb-cc- to avoid colliding with the theme.
   ════════════════════════════════════════════════════════════════════ */

:root {
	--tb-cc-navy:     #0f1923;
	--tb-cc-navy-2:   #162330;
	--tb-cc-navy-3:   #08111a;
	--tb-cc-teal:     #68ccee;
	--tb-cc-green:    #7ac46d;
	--tb-cc-grad:     linear-gradient(90deg, #68ccee, #7ac46d);
	--tb-cc-white:    #ffffff;
	--tb-cc-text-on-dark: rgba(255,255,255,0.78);
	--tb-cc-muted-on-dark: rgba(255,255,255,0.55);
}

/* Root container — hidden until JS decides what to show */
#tb-cc-root.tb-cc-hidden #tb-cc-banner,
#tb-cc-root.tb-cc-hidden #tb-cc-modal,
#tb-cc-root.tb-cc-hidden #tb-cc-modal-backdrop,
#tb-cc-root.tb-cc-hidden #tb-cc-pill {
	/* parent-level hidden: nothing shows */
}

/* Per-element hidden */
.tb-cc-hidden { display: none !important; }

/* ════════════════════ BANNER ════════════════════ */
#tb-cc-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 2147483600;
	background: var(--tb-cc-navy);
	border-top: 1px solid rgba(104,204,238,0.3);
	box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
	padding: 22px 32px;
	font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--tb-cc-text-on-dark);
	transform: translateY(100%);
	transition: transform 380ms ease-out;
	padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
#tb-cc-banner.tb-cc-banner-shown { transform: translateY(0); }

.tb-cc-banner-content {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 32px;
}

.tb-cc-banner-text {
	flex: 1 1 auto;
	min-width: 0;
}

.tb-cc-heading {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-weight: 900;
	font-size: 18px;
	letter-spacing: -0.3px;
	color: var(--tb-cc-white);
	margin: 0 0 6px;
	line-height: 1.2;
}

.tb-cc-body {
	font-size: 14px;
	line-height: 1.6;
	color: var(--tb-cc-text-on-dark);
	margin: 0;
}
.tb-cc-body a {
	color: var(--tb-cc-teal);
	text-decoration: none;
}
.tb-cc-body a:hover { text-decoration: underline; }

.tb-cc-banner-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

/* ════════════════════ BUTTONS ════════════════════ */
.tb-cc-btn {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.1px;
	padding: 11px 26px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
	line-height: 1.2;
	white-space: nowrap;
}
.tb-cc-btn:focus-visible {
	outline: 2px solid var(--tb-cc-teal);
	outline-offset: 2px;
}

.tb-cc-btn-primary {
	background: var(--tb-cc-grad);
	color: var(--tb-cc-navy);
	box-shadow: 0 6px 20px rgba(104,204,238,0.18);
}
.tb-cc-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(104,204,238,0.35);
}

.tb-cc-btn-ghost {
	background: transparent;
	border: 1.5px solid rgba(255,255,255,0.4);
	color: var(--tb-cc-white);
}
.tb-cc-btn-ghost:hover {
	border-color: var(--tb-cc-white);
	background: rgba(255,255,255,0.04);
}

.tb-cc-btn-link {
	background: transparent;
	border: none;
	padding: 11px 12px;
	color: var(--tb-cc-teal);
}
.tb-cc-btn-link:hover { text-decoration: underline; }

.tb-cc-btn-block {
	width: 100%;
	padding: 14px 26px;
	font-size: 15px;
}

/* ════════════════════ MODAL ════════════════════ */
#tb-cc-modal-backdrop {
	position: fixed; inset: 0;
	background: rgba(15,25,35,0.6);
	z-index: 2147483640;
	animation: tb-cc-fade-in 200ms ease-out;
}

#tb-cc-modal {
	position: fixed;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2147483650;
	background: var(--tb-cc-navy-2);
	color: var(--tb-cc-text-on-dark);
	font-family: 'Poppins', system-ui, sans-serif;
	max-width: 560px;
	width: calc(100% - 32px);
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	border-radius: 16px;
	padding: 36px;
	box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(104,204,238,0.1);
	padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
	animation: tb-cc-modal-in 250ms ease-out;
}

@keyframes tb-cc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-cc-modal-in {
	from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tb-cc-modal-close {
	position: absolute;
	top: 14px; right: 14px;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,0.08);
	border: none;
	color: var(--tb-cc-white);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background .2s ease, transform .2s ease;
}
.tb-cc-modal-close svg { width: 16px; height: 16px; display: block; }
.tb-cc-modal-close:hover { background: rgba(255,255,255,0.16); transform: rotate(90deg); }
.tb-cc-modal-close:focus-visible { outline: 2px solid var(--tb-cc-teal); outline-offset: 2px; }

.tb-cc-modal-heading {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-weight: 900;
	font-size: 24px;
	letter-spacing: -0.5px;
	color: var(--tb-cc-white);
	margin: 0 0 8px;
	padding-right: 40px;
}
.tb-cc-modal-sub {
	font-size: 14px;
	line-height: 1.6;
	color: var(--tb-cc-muted-on-dark);
	margin: 0 0 24px;
}

/* ════════════════════ CATEGORY ROWS ════════════════════ */
.tb-cc-cats {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 28px;
}
.tb-cc-cat {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tb-cc-cat:last-child { border-bottom: none; }

.tb-cc-cat-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.tb-cc-cat-name {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: -0.2px;
	color: var(--tb-cc-white);
	line-height: 1.3;
}
.tb-cc-cat-desc {
	font-size: 13px;
	color: var(--tb-cc-muted-on-dark);
	line-height: 1.55;
}

/* Toggle switch — 44x24px */
.tb-cc-switch {
	position: relative;
	flex-shrink: 0;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: rgba(255,255,255,0.16);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background .2s ease;
	margin-top: 2px;
}
.tb-cc-switch:focus-visible {
	outline: 2px solid var(--tb-cc-teal);
	outline-offset: 2px;
}
.tb-cc-switch-thumb {
	position: absolute;
	top: 3px; left: 3px;
	width: 18px; height: 18px;
	background: var(--tb-cc-white);
	border-radius: 50%;
	transition: transform .22s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.tb-cc-switch[aria-checked="true"] {
	background: var(--tb-cc-grad);
}
.tb-cc-switch[aria-checked="true"] .tb-cc-switch-thumb {
	transform: translateX(20px);
}
.tb-cc-switch-locked {
	cursor: not-allowed;
	opacity: 0.85;
}

/* Save button at bottom of modal */
.tb-cc-modal-footer { margin-top: 8px; }

/* ════════════════════ REVISIT PILL ════════════════════ */
#tb-cc-pill {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147483500;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: var(--tb-cc-navy);
	color: var(--tb-cc-white);
	border: 1.5px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	font-family: 'Montserrat', system-ui, sans-serif;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0,0,0,0.25);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
#tb-cc-pill svg {
	width: 18px;
	height: 18px;
	color: var(--tb-cc-teal);
}
#tb-cc-pill:hover {
	border-color: var(--tb-cc-teal);
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
#tb-cc-pill:focus-visible {
	outline: 2px solid var(--tb-cc-teal);
	outline-offset: 2px;
}

/* ════════════════════ RESPONSIVE ════════════════════ */
@media (max-width: 700px) {
	#tb-cc-banner {
		padding: 20px 18px;
		padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	}
	.tb-cc-banner-content {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
	}
	.tb-cc-banner-actions {
		flex-wrap: wrap;
		gap: 10px;
	}
	.tb-cc-btn-primary, .tb-cc-btn-ghost {
		flex: 1 1 calc(50% - 5px);
	}
	.tb-cc-btn-link {
		flex: 1 1 100%;
		text-align: center;
		justify-content: center;
	}
	#tb-cc-modal {
		padding: 28px 24px;
		width: calc(100% - 16px);
		max-height: calc(100vh - 32px);
	}
	.tb-cc-modal-heading { font-size: 20px; padding-right: 36px; }
	#tb-cc-pill {
		left: 12px; bottom: 12px;
		padding: 9px 14px;
		font-size: 12px;
	}
}

/* ════════════════════ REDUCED MOTION ════════════════════ */
@media (prefers-reduced-motion: reduce) {
	#tb-cc-banner { transition: none; }
	#tb-cc-modal-backdrop, #tb-cc-modal { animation: none; }
	.tb-cc-switch-thumb { transition: none; }
	.tb-cc-modal-close:hover { transform: none; }
	#tb-cc-pill:hover { transform: none; }
	.tb-cc-btn-primary:hover { transform: none; }
}
