.cmk,
.cmk-widget {
	--cmk-bg: #ffffff;
	--cmk-fg: #111111;
	--cmk-accent: #0b5fff;
	--cmk-button-bg: #0b5fff;
	--cmk-button-fg: #ffffff;
	--cmk-radius: 8px;
}

.cmk {
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 440px;
	max-height: calc(100vh - 32px);
	margin: 16px;
	padding: 20px;
	overflow-y: auto;
	color: var(--cmk-fg);
	font-size: 15px;
	line-height: 1.5;
	background: var(--cmk-bg);
	border-radius: var(--cmk-radius);
}

.cmk[data-font='system'],
.cmk[data-font='system'] .cmk__btn {
	font-family:
		system-ui,
		-apple-system,
		'Segoe UI',
		Roboto,
		sans-serif;
}

.cmk[data-font='inherit'] {
	font-family: inherit;
}

.cmk[data-shadow='on'] {
	box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
}

.cmk[data-position='bottom-right'] {
	right: 0;
	bottom: 0;
}

.cmk[data-position='bottom-left'] {
	bottom: 0;
	left: 0;
}

.cmk[data-position='bottom-bar'] {
	right: 0;
	bottom: 0;
	left: 0;
	width: auto;
	max-width: none;
	margin: 0;
	border-radius: var(--cmk-radius) var(--cmk-radius) 0 0;
}

.cmk[data-position='center-modal'] {
	top: 50%;
	left: 50%;
	width: min(560px, calc(100% - 32px));
	max-width: none;
	margin: 0;
	transform: translate(-50%, -50%);

	/* dims the page behind the dialog */
	box-shadow: 0 0 0 100vmax rgb(0 0 0 / 45%);
}

.cmk [hidden] {
	display: none !important;
}

.cmk__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 8px;
}

.cmk__icon {
	flex: none;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.cmk__title {
	margin: 0;
	font-size: 1.2em;
	line-height: 1.3;
	color: inherit !important;
}

.cmk__title:focus {
	outline: none;
}

.cmk__body {
	color: inherit !important;
	margin: 0 0 8px;
}

.cmk__link {
	color: var(--cmk-accent);
}

.cmk__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 16px;
}

.cmk[data-layout='inline'] .cmk__actions {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

.cmk__btn {
	padding: 10px 16px;
	font: inherit;
	color: var(--cmk-fg);
	cursor: pointer;
	background: transparent;
	border: 1px solid var(--cmk-accent);
	border-radius: calc(var(--cmk-radius) / 1.5);
	appearance: none;
}

.cmk__btn--primary {
	color: var(--cmk-button-fg);
	background: var(--cmk-button-bg);
	border-color: var(--cmk-button-bg);
}

.cmk__btn--link {
	padding-right: 0;
	padding-left: 0;
	text-decoration: underline;
	border-color: transparent;
}

.cmk__btn:focus-visible,
.cmk-declaration__open:focus-visible,
.cmk-widget:focus-visible,
.cmk__link:focus-visible {
	outline: 3px solid var(--cmk-accent);
	outline-offset: 2px;
}

.cmk__prefs {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid rgb(127 127 127 / 40%);
}

.cmk__cat {
	margin-bottom: 14px;
}

.cmk__cat-head {
	display: flex;
	gap: 8px;
	align-items: center;
	font-weight: 600;
}

.cmk__cat-desc {
	margin: 4px 0 0;
	font-size: 0.93em;
}

.cmk__note {
	margin: 0.25rem 0 0;
	font-size: 0.85em;
}

.cmk__services,
.cmk__cookies {
	margin: 6px 0 0;
	padding-left: 20px;
	font-size: 0.9em;
}

.cmk-widget {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 2147482999;
	padding: 8px 14px;
	font: inherit;
	font-size: 14px;
	color: var(--cmk-button-fg);
	cursor: pointer;
	background: var(--cmk-button-bg);
	border: 0;
	border-radius: var(--cmk-radius);
	box-shadow: 0 2px 10px rgb(0 0 0 / 25%);
}

@media (prefers-reduced-motion: no-preference) {
	.cmk-widget {
		transition: transform 0.15s ease;
	}

	.cmk-widget:hover {
		transform: translateY(-1px);
	}
}

/* Appearance preview: show the banner in normal flow inside the dashboard instead of fixed to the window. */
.cmk-preview-stage {
	padding: 24px;
	background: repeating-linear-gradient(45deg, #f1f1f1, #f1f1f1 10px, #e8e8e8 10px, #e8e8e8 20px);
	border-radius: 6px;
}

.cmk-preview-stage .cmk {
	z-index: auto;
	position: relative;
	inset: auto;
	width: auto;
	max-width: 440px;
	margin: 0 auto;
	transform: none;
}

.cmk-preview-stage .cmk[data-position='bottom-bar'] {
	max-width: none;
	border-radius: var(--cmk-radius);
}

.cmk-preview-stage .cmk[data-position='center-modal'] {
	max-width: 560px;
	box-shadow: none;
}

.cmk-preview-stage .cmk[data-position='center-modal'][data-shadow='on'] {
	box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
}

.cmk-declaration__table {
	width: 100%;
	border-collapse: collapse;
}

.cmk-declaration__table th,
.cmk-declaration__table td {
	padding: 6px 8px;
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cmk-embed {
	position: relative;
	display: block;
	box-sizing: border-box;
	max-width: 100%;
}

.cmk-embed > iframe:not([src]),
iframe[data-cmk-embed]:not([src]) {
	display: none;
}

.cmk-embed__box {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
	justify-content: center;
	box-sizing: border-box;
	height: 100%;
	min-height: 160px;
	padding: 20px;
	color: #111111;
	font-size: 15px;
	line-height: 1.5;
	background: #f2f2f2;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
}

.cmk-embed__accept:focus-visible,
.cmk-embed__prefs:focus-visible {
	outline: 3px solid #0b5fff;
	outline-offset: 2px;
}

.cmk-embed__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cmk-embed__accept,
.cmk-embed__prefs {
	padding: 8px 14px;
	font: inherit;
	cursor: pointer;
	border: 1px solid #0b5fff;
	border-radius: 6px;
}

.cmk-embed__accept {
	color: #ffffff;
	background: #0b5fff;
}

.cmk-embed__prefs {
	color: #0b5fff;
	background: transparent;
}
