/**
 * Divinho Performance Mode
 *
 * Activated by setting: <html data-divinho-perf="on">
 *
 * Goal: provide a safe “fallback rendering mode” for environments that
 * struggle with paint/compositing (notably Chrome + heavy glass/shadow UIs).
 *
 * Keep this file small and selector-cheap. It should be safe to enqueue
 * everywhere; it only applies when the attribute is present.
 */

:root[data-divinho-ua="chromium"][data-divinho-perf="on"] * {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* Disable always-on repaint animations */
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .fortnight-title,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .fortnight-badge__icon,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .divinho-loading-spinner,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .header-cart__spinner {
	animation: none !important;
}

/* Reduce the cost of hover elevations by keeping shadows modest */
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .hero-product-card:hover,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .country-card:hover,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .pairing-card:hover,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .fortnight-product:hover,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .wp-block-divinho-hero-section .hero-wine-card:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
}

/* Avoid big layered shadows on floating UI */
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .header-cart__dropdown,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .divinho-search-suggestions,
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .language-selector-menu {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

/* Chromium: reduce filter cost on transformed images */
:root[data-divinho-ua="chromium"][data-divinho-perf="on"] .wp-block-divinho-hero-section .hero-wine-image-wrapper img {
	filter: none !important;
}


