/* MT Cookie Consent — banner & preferences modal */

.mtcc-root {
	--mtcc-bg: #ffffff;
	--mtcc-text: #1b1b1b;
	--mtcc-accent: #1437cf;
	--mtcc-accent-text: #ffffff;
	--mtcc-btn2: #ffffff;
	--mtcc-muted: #5f6673;
	/* Translucent neutral: readable on both light and dark backgrounds. */
	--mtcc-border: rgba(128, 137, 150, 0.3);
	--mtcc-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.mtcc-root [hidden] { display: none !important; }

/* Hard reset so the site theme can never leak borders, shadows or
   backgrounds into the consent UI. */
#mtcc-root *,
#mtcc-root *::before,
#mtcc-root *::after { box-sizing: border-box; }

#mtcc-root h2,
#mtcc-root p {
	background: none;
	border: 0;
	box-shadow: none;
	text-shadow: none;
}

#mtcc-root label,
#mtcc-root span {
	border: 0;
	box-shadow: none;
	text-shadow: none;
}

#mtcc-root .mtcc-category-title,
#mtcc-root .mtcc-always-on { background: transparent; }

#mtcc-root button {
	background-image: none !important;
	text-shadow: none !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

#mtcc-root input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	margin: 0;
}

.mtcc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(8, 10, 16, 0.72);
	z-index: 999998;
}

/* ------------------------------------------------------------ banner */

.mtcc-banner {
	position: fixed;
	z-index: 999999;
	background: var(--mtcc-bg);
	color: var(--mtcc-text);
	border: 0;
	border-radius: var(--mtcc-radius);
	box-shadow: 0 12px 45px rgba(15, 19, 30, 0.22);
	padding: 24px;
	box-sizing: border-box;
}

.mtcc-pos-bottom-left .mtcc-banner { left: 20px; bottom: 20px; max-width: 460px; }
.mtcc-pos-bottom-right .mtcc-banner { right: 20px; bottom: 20px; max-width: 460px; }

.mtcc-pos-bottom-bar .mtcc-banner {
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 0;
	max-width: none;
}

.mtcc-pos-bottom-bar .mtcc-banner-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	flex-wrap: wrap;
}

.mtcc-pos-bottom-bar .mtcc-banner-content { flex: 1 1 480px; }

.mtcc-pos-center .mtcc-banner {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: 520px;
	width: calc(100% - 40px);
}

.mtcc-title {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	color: var(--mtcc-text);
	line-height: 1.3;
}

.mtcc-text {
	margin: 0 0 4px;
	font-size: 15px;
	color: var(--mtcc-text);
}

.mtcc-privacy-link,
.mtcc-text a {
	color: var(--mtcc-accent);
	text-decoration: underline;
}

.mtcc-banner-actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	flex-wrap: wrap;
	align-items: center;
}

.mtcc-pos-bottom-bar .mtcc-banner-actions { margin-top: 0; }

/* ------------------------------------------------------------ buttons */
/* #mtcc-root prefix + !important on the surface so theme button styles
   (e.g. `.site button { background: ... }`) can never override them. */

#mtcc-root .mtcc-btn,
.mtcc-root .mtcc-btn {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 26px;
	line-height: 1.4;
	border-width: 1px !important;
	border-style: solid !important;
	border-color: transparent;
	border-radius: calc(var(--mtcc-radius) * 0.5);
	transition: filter 0.15s ease, background 0.15s ease;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

#mtcc-root .mtcc-btn:hover { filter: brightness(0.94); }
#mtcc-root .mtcc-btn:focus-visible { outline: 2px solid var(--mtcc-accent); outline-offset: 2px; }

#mtcc-root .mtcc-btn-primary {
	background: var(--mtcc-accent) !important;
	color: var(--mtcc-accent-text) !important;
	border-color: var(--mtcc-accent) !important;
}

#mtcc-root .mtcc-btn-secondary {
	background: var(--mtcc-btn2) !important;
	color: var(--mtcc-text) !important;
	border-color: var(--mtcc-accent) !important;
}

#mtcc-root .mtcc-btn-link {
	background: transparent !important;
	color: var(--mtcc-text) !important;
	border-color: transparent !important;
	text-decoration: underline;
	padding-left: 8px;
	padding-right: 8px;
	opacity: 0.85;
}

/* ------------------------------------------------------------- modal */

.mtcc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.mtcc-modal-box {
	background: var(--mtcc-bg);
	color: var(--mtcc-text);
	border: 0;
	border-radius: var(--mtcc-radius);
	box-shadow: 0 18px 60px rgba(15, 19, 30, 0.3);
	max-width: 1000px;
	width: 100%;
	max-height: min(86vh, 760px);
	overflow-y: auto;
	padding: 30px 34px;
	box-sizing: border-box;
}

.mtcc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.mtcc-modal .mtcc-title { font-size: 20px; margin-bottom: 0; }
.mtcc-modal .mtcc-text { font-size: 15px; color: var(--mtcc-text); }

#mtcc-root .mtcc-close,
.mtcc-close {
	appearance: none;
	background: transparent !important;
	border: 0 !important;
	color: var(--mtcc-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 8px;
	border-radius: 6px;
}

.mtcc-close:hover { color: var(--mtcc-text); }

/* Category columns — Cookiebot-style horizontal table */

.mtcc-categories {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--mtcc-border) !important;
	border-radius: calc(var(--mtcc-radius) * 0.5);
	overflow: hidden;
	margin: 22px 0;
}

.mtcc-category {
	padding: 20px 18px 16px;
	border: 0 !important;
	border-left: 1px solid var(--mtcc-border) !important;
	background: transparent;
}

.mtcc-category:first-child { border-left: 0 !important; }

.mtcc-category-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.mtcc-category-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--mtcc-text);
}

.mtcc-category-desc {
	margin: 12px 0 0;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--mtcc-muted);
	text-align: center;
}

/* ------------------------------------------------------------ switch */

.mtcc-switch {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
	flex: none;
}

.mtcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

#mtcc-root .mtcc-slider,
.mtcc-slider {
	position: absolute;
	inset: 0;
	background: #c7ccd6 !important;
	border-radius: 28px;
	transition: background 0.2s ease;
	cursor: pointer;
}

#mtcc-root .mtcc-slider::before,
.mtcc-slider::before {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 3px;
	background: #fff !important;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
	transition: transform 0.2s ease;
}

#mtcc-root .mtcc-switch input:checked + .mtcc-slider,
.mtcc-switch input:checked + .mtcc-slider { background: var(--mtcc-accent) !important; }
.mtcc-switch input:checked + .mtcc-slider::before { transform: translateX(24px); }
.mtcc-switch input:focus-visible + .mtcc-slider { outline: 2px solid var(--mtcc-accent); outline-offset: 2px; }

#mtcc-root .mtcc-switch-locked .mtcc-slider { cursor: default; opacity: 0.55; }

.mtcc-modal-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

#mtcc-root .mtcc-modal-actions .mtcc-btn { min-width: 200px; padding: 14px 30px; }

/* ------------------------------------------------------------- badge */

.mtcc-badge {
	position: fixed;
	bottom: 18px;
	z-index: 999997;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	background: var(--mtcc-bg);
	color: var(--mtcc-accent);
	box-shadow: 0 4px 18px rgba(15, 19, 30, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.mtcc-badge:hover { transform: scale(1.08); }
.mtcc-badge-left { left: 18px; }
.mtcc-badge-right { right: 18px; }

/* ------------------------------------------------------------ mobile */

@media (max-width: 900px) {
	.mtcc-categories { grid-template-columns: repeat(2, 1fr); }

	.mtcc-category { border-top: 1px solid var(--mtcc-border) !important; }
	.mtcc-category:nth-child(-n+2) { border-top: 0 !important; }
	.mtcc-category:nth-child(odd) { border-left: 0 !important; }
}

@media (max-width: 640px) {
	.mtcc-pos-bottom-left .mtcc-banner,
	.mtcc-pos-bottom-right .mtcc-banner {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
	}

	.mtcc-banner-actions .mtcc-btn { flex: 1 1 auto; text-align: center; }

	.mtcc-modal { padding: 12px; }
	.mtcc-modal-box { padding: 22px 18px; }

	.mtcc-categories { grid-template-columns: 1fr; }
	.mtcc-category { border-left: 0 !important; border-top: 1px solid var(--mtcc-border) !important; }
	.mtcc-category:first-child { border-top: 0 !important; }

	.mtcc-modal-actions .mtcc-btn { flex: 1 1 auto; min-width: 0; }
}
