/* DTM Measure — consent banner. Colors follow the theme (Kadence palette) with fallbacks. */
.dtm-cc {
	--dtm-cc-primary: var(--global-palette1, #2563eb);
	--dtm-cc-primary-hover: var(--global-palette2, #1d4ed8);
	--dtm-cc-ink: var(--global-palette3, #0f172a);
	--dtm-cc-text: var(--global-palette5, #475569);
	--dtm-cc-line: var(--global-palette7, #e2e8f0);
	--dtm-cc-bg: var(--global-palette9, #ffffff);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: var(--dtm-cc-text);
}
.dtm-cc[hidden], .dtm-cc [hidden] { display: none !important; }
.dtm-cc *, .dtm-cc *::before, .dtm-cc *::after { box-sizing: border-box; }

.dtm-cc-bar {
	position: fixed;
	inset-inline: 12px;
	bottom: 12px;
	z-index: 2147483000;
	max-width: 980px;
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: var(--dtm-cc-bg);
	border: 1px solid var(--dtm-cc-line);
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(15, 23, 42, .14);
}
.dtm-cc-text { flex: 1 1 auto; margin: 0; }
.dtm-cc-text p { margin: 2px 0 0; }
.dtm-cc-title { display: block; color: var(--dtm-cc-ink); font-size: 15px; font-weight: 700; }
.dtm-cc a { color: var(--dtm-cc-primary); text-decoration: underline; }

.dtm-cc-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }

/* All three choices look the same: rejecting is as easy as accepting. */
.dtm-cc-btn {
	appearance: none;
	min-width: 0;
	min-height: 38px;
	padding: 7px 16px;
	border: 2px solid var(--dtm-cc-primary);
	border-radius: 8px;
	background: var(--dtm-cc-primary);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.dtm-cc-btn:hover { background: var(--dtm-cc-primary-hover); border-color: var(--dtm-cc-primary-hover); }
.dtm-cc-btn:focus-visible, .dtm-cc-x:focus-visible, .dtm-cc-switch:focus-visible {
	outline: 3px solid var(--global-palette10, #f59e0b);
	outline-offset: 2px;
}

.dtm-cc-short { padding: 8px 12px; max-width: 760px; }
.dtm-cc-short .dtm-cc-text { font-size: 13px; }
.dtm-cc-short .dtm-cc-btn { min-height: 32px; padding: 5px 12px; font-size: 13px; }

/* Settings panel */
.dtm-cc-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, .55);
}
.dtm-cc-panel {
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 18px;
	background: var(--dtm-cc-bg);
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
}
.dtm-cc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.dtm-cc-panel-head strong { color: var(--dtm-cc-ink); font-size: 16px; font-weight: 700; }
.dtm-cc-x {
	appearance: none;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--dtm-cc-ink);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.dtm-cc-cat { padding: 10px 0; border-bottom: 1px solid var(--dtm-cc-line); }
.dtm-cc-cat p { margin: 2px 0 0; font-size: 13px; }
.dtm-cc-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.dtm-cc-cat-name { color: var(--dtm-cc-ink); font-weight: 700; }
.dtm-cc-always { font-size: 13px; color: #15803d; font-weight: 700; }
.dtm-cc-panel .dtm-cc-actions { margin-top: 14px; }
.dtm-cc-panel .dtm-cc-btn { flex: 1 1 120px; }

/* Toggle switch built on a native checkbox (keyboard and screen readers keep working). */
.dtm-cc-switch {
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	margin: 0;
	border-radius: 26px;
	background: #cbd5e1;
	cursor: pointer;
	transition: background .2s;
}
.dtm-cc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: inset-inline-start .2s;
}
.dtm-cc-switch:checked { background: var(--dtm-cc-primary); }
.dtm-cc-switch:checked::after { inset-inline-start: 23px; }

@media (max-width: 782px) {
	.dtm-cc-bar { flex-direction: column; align-items: stretch; gap: 8px; inset-inline: 8px; bottom: 8px; padding: 10px 12px; }
	.dtm-cc-actions { gap: 6px; }
	.dtm-cc-actions .dtm-cc-btn { flex: 1 1 0; min-height: 36px; padding: 6px 8px; font-size: 13px; }
	.dtm-cc { font-size: 13px; }
	.dtm-cc-title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.dtm-cc-switch, .dtm-cc-switch::after { transition: none; }
}

/* Optional layout: full banner as a centered window (Settings > Banner layout). */
.dtm-cc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147482999;
	background: rgba(15, 23, 42, .45);
}
.dtm-cc.dtm-cc-center .dtm-cc-full {
	inset: auto;
	top: 50%;
	left: 50%;
	width: calc(100% - 32px);
	max-width: 520px;
	transform: translate(-50%, -50%);
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	padding: 20px;
}
.dtm-cc.dtm-cc-center .dtm-cc-full .dtm-cc-actions .dtm-cc-btn { flex: 1 1 0; }
