/*
 * MYMOU Consent: theme layer over CookieConsent v3.
 * MYMOU Consent 0.1.0. Every colour, font and radius comes from the active theme's theme.json presets,
 * with neutral fallbacks for themes that do not define a slug.
 */
#cc-main {
	--mc-brand: var(--wp--preset--color--brand, #1e1e1e);
	--mc-brand-hover: var(--wp--preset--color--brand-hover, #000);
	--mc-heading: var(--wp--preset--color--text-heading, #1e1e1e);
	--mc-body: var(--wp--preset--color--text-body, #4a4a4a);
	--mc-muted: var(--wp--preset--color--text-muted, #6a6a6a);
	--mc-surface: var(--wp--preset--color--surface-base, #fff);
	--mc-soft: var(--wp--preset--color--surface-hero, #f2f4f7);
	--mc-border: var(--wp--preset--color--border, #e5e8ec);

	--cc-font-family: var(--wp--preset--font-family--body, system-ui, sans-serif);
	--cc-bg: var(--mc-surface);
	--cc-primary-color: var(--mc-heading);
	--cc-secondary-color: var(--mc-body);
	--cc-link-color: var(--mc-brand);

	/* Accept all and Reject all: the same filled button. */
	--cc-btn-primary-bg: var(--mc-brand);
	--cc-btn-primary-color: #fff;
	--cc-btn-primary-border-color: var(--mc-brand);
	--cc-btn-primary-hover-bg: var(--mc-brand-hover);
	--cc-btn-primary-hover-color: #fff;
	--cc-btn-primary-hover-border-color: var(--mc-brand-hover);

	/* Settings / Save my choice: outlined. */
	--cc-btn-secondary-bg: var(--mc-surface);
	--cc-btn-secondary-color: var(--mc-brand);
	--cc-btn-secondary-border-color: var(--mc-brand);
	--cc-btn-secondary-hover-bg: var(--wp--preset--color--brand-subtle, #eef2f6);
	--cc-btn-secondary-hover-color: var(--mc-brand-hover);
	--cc-btn-secondary-hover-border-color: var(--mc-brand-hover);
	--cc-btn-border-radius: var(--wp--preset--border-radius--pill, 100vmax);

	--cc-modal-border-radius: var(--wp--preset--border-radius--md, 1rem);
	--cc-modal-margin: 1.25rem;
	--cc-separator-border-color: var(--mc-border);
	--cc-footer-bg: var(--mc-surface);
	--cc-footer-color: var(--mc-muted);
	--cc-footer-border-color: var(--mc-border);
	--cc-overlay-bg: rgba(10, 20, 30, .55);

	--cc-toggle-on-bg: var(--mc-brand);
	--cc-toggle-off-bg: #7a8691;
	--cc-toggle-readonly-bg: #c9d2da;
	--cc-cookie-category-block-bg: var(--mc-soft);
	--cc-cookie-category-block-border: var(--mc-soft);
	--cc-cookie-category-block-hover-bg: var(--wp--preset--color--brand-subtle, #e9eff4);
	--cc-cookie-category-block-hover-border: var(--wp--preset--color--brand-subtle, #e9eff4);
	--cc-cookie-category-expanded-block-bg: var(--mc-surface);
	--cc-cookie-category-expanded-block-hover-bg: var(--mc-soft);
	--cc-section-category-border: var(--mc-border);
	--cc-z-index: 99990;

	font-size: 16px;
	line-height: 1.6;
}

/* ---------- First view (corner card; on phones across the bottom) ---------- */
#cc-main .cm {
	box-shadow: 0 .75rem 2.5rem rgba(10, 38, 58, .18), 0 0 0 1px var(--mc-border);
}
#cc-main .cm--box {
	max-width: 25rem;
}
#cc-main .cm__texts {
	padding-top: 1.25rem;
}
#cc-main .cm__title,
#cc-main .pm__title {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 600;
	letter-spacing: 0;
	color: var(--mc-heading);
}
#cc-main .cm__title {
	font-size: 1.25rem;
	line-height: 1.3;
}
#cc-main .cm__desc,
#cc-main .cm__title {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}
#cc-main .cm__title + .cm__desc {
	margin-top: .5rem;
}
#cc-main .cm__desc {
	font-size: .875rem;
	line-height: 1.55;
	max-height: 38vh;
	padding-bottom: 1rem;
}
#cc-main .cm__btns {
	padding: 1rem 1.25rem .75rem;
	border-top: 1px solid var(--mc-border);
}
#cc-main .cm .cm__btn {
	font-size: .875rem;
	min-height: 2.75rem;
	padding: .375rem .75rem;
}
/* "Einstellungen": a quiet link under the two answers (it is not one of them). */
#cc-main .cm .cm__btn-group:not(:first-child) {
	display: flex;
	justify-content: center;
}
#cc-main .cm .cm__btn[data-role="show"] {
	background: none;
	border: 0;
	color: var(--mc-brand);
	min-height: 0;
	width: auto;
	padding: .25rem .5rem;
	line-height: 1.6;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}
#cc-main .cm .cm__btn[data-role="show"]:hover {
	background: none;
	color: var(--mc-brand-hover);
	text-decoration-thickness: 2px;
}
#cc-main .cm__btn,
#cc-main .pm__btn {
	font-size: .9375rem;
	font-weight: 600;
	min-height: 3rem;
	padding: .5rem 1.25rem;
	letter-spacing: 0;
}
#cc-main .cm__btn-group + .cm__btn-group,
#cc-main .cm__btn + .cm__btn {
	margin-top: .5rem;
}
/* Accept all + Reject all: two equal columns. */
#cc-main .cm--inline .cm__btn-group:first-child {
	grid-auto-flow: row;
	grid-template-columns: 1fr 1fr;
	gap: .625rem;
}
#cc-main .cm--inline .cm__btn + .cm__btn {
	margin: 0;
}
#cc-main .cm__footer {
	padding: .625rem 0;
}
#cc-main .cm__link-group > * + * {
	margin-left: 0;
}
#cc-main .cm__links {
	padding: 0 1.25rem;
}
#cc-main .cm__link-group {
	justify-content: center;
	font-size: .8125rem;
	gap: .375rem 1.25rem;
	flex-wrap: wrap;
}

/* Links: theme link colour, underline always visible (not colour alone). */
#cc-main a,
#cc-main .cc__link {
	color: var(--mc-brand);
	font-weight: 600;
	background-image: none;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}
#cc-main .cm__footer a {
	color: var(--mc-muted);
	font-weight: 400;
}
#cc-main a:hover,
#cc-main .cm__footer a:hover {
	color: var(--mc-brand-hover);
	text-decoration-thickness: 2px;
}

/* Keyboard focus: same ring as the theme's buttons. */
#cc-main button:focus-visible,
#cc-main a:focus-visible,
#cc-main .section__toggle:focus-visible + .toggle__icon {
	outline: 3px solid var(--mc-brand);
	outline-offset: 3px;
	box-shadow: none;
}

/* ---------- Settings view ---------- */
#cc-main .pm {
	border-radius: var(--cc-modal-border-radius);
	max-width: 43rem;
}
#cc-main .pm__header {
	padding: 1.25rem 1.75rem;
	border-bottom-color: var(--mc-border);
}
#cc-main .pm__title {
	font-size: 1.5rem;
	line-height: 1.3;
}
#cc-main .pm__body {
	padding: 1.5rem 1.75rem;
}
#cc-main .pm__section-desc,
#cc-main .pm__section--toggle .pm__section-desc-wrapper {
	font-size: .9375rem;
	line-height: 1.6;
	color: var(--mc-body);
}
#cc-main .pm__section-title {
	font-size: 1rem;
	font-weight: 600;
}
#cc-main .pm__section--toggle .pm__section-title {
	min-height: 3.5rem;
	padding: 1rem 1.25rem 1rem 3.25rem;
	border-radius: var(--wp--preset--border-radius--sm, .55rem);
}
#cc-main .pm__section,
#cc-main .pm__section--toggle,
#cc-main .pm__section--toggle .pm__section-desc-wrapper,
#cc-main .pm__section-table {
	border-radius: var(--wp--preset--border-radius--sm, .55rem);
}
#cc-main .pm__section--toggle .pm__section-title {
	padding-right: 5.5rem;
}
#cc-main .mc-note {
	font-size: .8125rem;
	font-weight: 400;
	color: var(--mc-muted);
	margin-left: .5rem;
}
#cc-main .pm__badge {
	background: var(--mc-surface);
	color: var(--mc-muted);
	font-size: .75rem;
	font-weight: 600;
	border: 1px solid var(--mc-border);
}
#cc-main .pm__table-th,
#cc-main .pm__table-td {
	font-size: .8125rem;
}
#cc-main .pm__footer {
	padding: 1.25rem 1.75rem;
	border-top-color: var(--mc-border);
}
#cc-main .pm__btn-group:first-child {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .625rem;
}
#cc-main .pm__btn-group:first-child .pm__btn + .pm__btn {
	margin: 0;
}
#cc-main .pm__btn-group + .pm__btn-group {
	margin-left: .625rem;
}
#cc-main .mc-id {
	display: block;
	font-size: .8125rem;
	color: var(--mc-muted);
	margin-top: 1rem;
}
#cc-main .mc-id code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .8125rem;
	background: var(--mc-soft);
	padding: .125rem .375rem;
	border-radius: .25rem;
	color: var(--mc-heading);
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
	#cc-main {
		--cc-modal-margin: .75rem;
	}
	#cc-main .cm--box {
		max-width: none;
	}
	#cc-main .cm__desc {
		max-height: 32vh;
	}
	#cc-main .cm__title,
	#cc-main .cm__desc,
	#cc-main .cm__btns,
	#cc-main .cm__links {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
	#cc-main .cm__btns {
		padding-top: 1rem;
		padding-bottom: .75rem;
	}
	#cc-main .pm {
		border-radius: 0;
	}
	#cc-main .pm__header,
	#cc-main .pm__body,
	#cc-main .pm__footer {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
	#cc-main .pm__title {
		font-size: 1.25rem;
	}
	#cc-main .pm__btn-group:first-child {
		grid-template-columns: 1fr;
		grid-auto-flow: row;
	}
	/* The two answers stay side by side on phones too (shorter banner), still equal. */
	#cc-main .cm.cm--inline .cm__btn-group:first-child {
		display: grid !important; /* the library stacks them below 640px */
		grid-template-columns: 1fr 1fr !important;
		grid-auto-flow: row !important;
		gap: .5rem !important;
	}
	#cc-main .cm__btn + .cm__btn,
	#cc-main .cm--inline .cm__btn + .cm__btn {
		margin: 0 !important;
	}
	#cc-main .cm__btn-group + .cm__btn-group {
		margin-top: .5rem !important;
	}
	#cc-main .pm__btn-group:first-child {
		gap: .625rem;
	}
	#cc-main .pm__btn-group + .pm__btn-group {
		margin-left: 0;
		margin-top: .625rem;
	}
	#cc-main .cm__link-group {
		justify-content: center !important;
		gap: .25rem 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cc-main {
		--cc-modal-transition-duration: 0s;
	}
}

#cc-main .mc-services {
	margin: .625rem 0 0;
	padding-left: 1.125rem;
}
#cc-main .mc-services li {
	margin: .25rem 0;
}
#cc-main .mc-services strong {
	color: var(--mc-heading);
}
#cc-main .mc-id[hidden] {
	display: none;
}
