/*
Maudimi Companion V36 - menu, header and color mode helpers.
*/

html.maudimi-companion-v36-ready {
	scroll-padding-top: 110px;
}

body.maudimi-companion-v36-active .mdm-header-v36 {
	will-change: transform, opacity;
}

body.maudimi-v36-ready .mdm-mobile-toggle-v36 {
	display: none;
}

@media (max-width: 782px) {
	body.maudimi-v36-ready .mdm-mobile-toggle-v36 {
		display: grid !important;
	}
}

.mdm-mobile-drawer-v36:not([hidden]) {
	animation: maudimi-menu-v36-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mdm-mobile-drawer-v36:not([hidden]) .mdm-mobile-panel-v28 {
	animation: maudimi-panel-v36-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes maudimi-menu-v36-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes maudimi-panel-v36-in {
	from {
		opacity: 0;
		transform: translate3d(18px, -8px, 0) scale(0.975);
		filter: blur(8px);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
		filter: blur(0);
	}
}

.maudimi-color-switcher-v36 {
	font: 800 0.72rem/1.1 system-ui, sans-serif;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.maudimi-color-switcher-v36:hover,
.maudimi-color-switcher-v36:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(255, 217, 133, 0.62);
}

body.maudimi-theme-light .maudimi-latest-v28 .wp-block-group:has(.wp-block-post-title),
body.maudimi-theme-light .maudimi-card-v32,
body.maudimi-theme-light .mdm-card-body,
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-latest-v28 .wp-block-group:has(.wp-block-post-title),
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-card-v32,
body.maudimi-prefers-light.maudimi-theme-auto .mdm-card-body {
	background:
		radial-gradient(circle at 86% 0%, rgba(213, 170, 97, 0.15), transparent 16rem),
		linear-gradient(145deg, #fff8ea, #ead8bc) !important;
	color: #241811 !important;
	box-shadow: 0 24px 80px rgba(74, 45, 22, 0.14);
}

body.maudimi-theme-light .maudimi-latest-v28 .wp-block-post-title,
body.maudimi-theme-light .maudimi-latest-v28 .wp-block-post-title a,
body.maudimi-theme-light .mdm-card-body p,
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-latest-v28 .wp-block-post-title,
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-latest-v28 .wp-block-post-title a,
body.maudimi-prefers-light.maudimi-theme-auto .mdm-card-body p {
	color: #241811 !important;
}

body.maudimi-theme-light .maudimi-latest-v28 .wp-block-post-excerpt,
body.maudimi-theme-light .maudimi-latest-v28 .wp-block-post-excerpt__excerpt,
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-latest-v28 .wp-block-post-excerpt,
body.maudimi-prefers-light.maudimi-theme-auto .maudimi-latest-v28 .wp-block-post-excerpt__excerpt {
	color: #5f4936 !important;
}

@media (prefers-reduced-motion: reduce) {
	.mdm-mobile-drawer-v36:not([hidden]),
	.mdm-mobile-drawer-v36:not([hidden]) .mdm-mobile-panel-v28,
	.maudimi-color-switcher-v36 {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}
