/*
 * D33 "centre everything" (printix3dc/UI-UX, DECISIONS.md D33, Tomer 19.10.2026):
 * the label inside every button is centred, on the site and in wp-admin.
 * Loaded last on the front end (wp_enqueue_scripts 999) and on every admin screen
 * (not the block editor). Low specificity on purpose: one class at most, the
 * exclusions sit inside :where() so they add nothing. A product that sets its own
 * text-align / justify-content on a button with a stronger selector keeps it.
 *
 * Not touched (D33 "lists you work through"): menu items and rows that look like
 * buttons but read icon + word from the start edge: anything inside nav / menu /
 * role=menu / role=listbox / an element whose class has "menu" (the "⋯" menus,
 * P-Worker / P-Marketing / P-Menu side menus, wp media menu), role=menuitem / option,
 * Elementor nav items, the site header and footer, the WP admin bar and admin menu.
 * P-Link public pages (.pp, the customer's own page) and P-Member's mini P-Link previews keep
 * their buttons as designed (Tomer 19.10: "the P-Link public pages are okay").
 * Containers named like "-btns" / "-btn-row" / "-btn-group" are groups, not buttons.
 */

:is(
	button,
	input[type="submit"],
	input[type="button"],
	input[type="reset"],
	.button,
	.btn,
	a.button,
	.wp-element-button,
	.elementor-button,
	[class*="-btn"],
	[class*="__btn"],
	a[role="button"],
	span[role="button"]
):where(
	:not(.mi, .elementor-item, .elementor-sub-item, [role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"], [role="option"], [class*="menu-item"], [class*="menuitem" i], .pp-btn, .pxpm-pbtn, .pxpm-mpl-b)
):where(
	:not([class*="btns"], [class*="btn-wrap"], [class*="btn-row"], [class*="btn-group"], [class*="btn-bar"], [class*="btn-box"], [class*="btn-list"])
):where(
	:not(:is(nav, menu, [role="menu"], [role="menubar"], [role="listbox"], :not(html, body)[class*="menu" i], .elementor-location-header, .elementor-location-footer, #wpadminbar, #adminmenuwrap, .pp, [class*="pxpm-mpl"]) *)
) {
	text-align: center;
	justify-content: center;
}

/* Elementor buttons: the icon + word sit together in the middle */
.elementor-button .elementor-button-content-wrapper {
	justify-content: center;
}
