
/**
 * ZYMARG OS — Canonical Button System v13
 *
 * All action buttons use the approved Plain treatment by default. The
 * Glow Sweep treatment remains available only when explicitly selected with
 * .zymarg-btn--glow-sweep. Specialized icon-only controls keep their own
 * geometry and semantics.
 */

:is(.zymarg-btn,
	button.zymarg-btn,
	input[type="submit"].zymarg-btn,
	a.button,
	button.button,
	input.button,
	input[type="submit"],
	button[type="submit"],
	.wp-block-button__link,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit,
	.woocommerce .single_add_to_cart_button,
	.zymarg-import-btn,
	.zymarg-cataudit-btn,
	.zymarg-copy,
	.zymarg-crop-save,
	.zymarg-login__submit,
	.zymarg-login__google,
	.zymarg-logout-modal__btn,
	.zymarg-rv-save,
	.zymarg-rv-edit,
	.zymarg-rv-delete,
	.zymarg-vo-view,
	.zymarg-quick-view,
	.zpv-copy,
	.zpv-rotate,
	.zymarg-delay-add,
	.zymarg-delay-remove,
	.zymarg-navorder-up,
	.zymarg-navorder-down,
	.zymarg-ship-invoice-btn,
	.zym-linkbtn,
	.zymarg-search-form__submit) {
	box-sizing: border-box;
	min-width: 44px;
	padding: var(--zym-button-padding-y-medium) var(--zym-button-padding-x-medium);
	font-family: var(--zym-font);
	font-size: var(--zym-button-font-size-medium);
	font-weight: var(--zym-button-font-weight);
	line-height: 1;
	letter-spacing: var(--zym-button-letter-spacing);
	text-decoration: none;
	color: var(--zym-button-text);
	background: var(--zym-color-button-pop);
	border: 1px solid transparent;
	border-radius: var(--zym-radius-button);
	box-shadow: none;
	cursor: pointer;
	transition: transform var(--zym-motion-standard) var(--zym-ease),
		background-color var(--zym-motion-standard) var(--zym-ease),
		color var(--zym-motion-standard) var(--zym-ease),
		box-shadow var(--zym-motion-standard) var(--zym-ease);
}

:is(.zymarg-btn,
	button.zymarg-btn,
	input[type="submit"].zymarg-btn,
	a.button,
	button.button,
	input.button,
	input[type="submit"],
	button[type="submit"],
	.wp-block-button__link,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit,
	.woocommerce .single_add_to_cart_button,
	.zymarg-import-btn,
	.zymarg-cataudit-btn,
	.zymarg-copy,
	.zymarg-crop-save,
	.zymarg-login__submit,
	.zymarg-login__google,
	.zymarg-logout-modal__btn,
	.zymarg-rv-save,
	.zymarg-rv-edit,
	.zymarg-rv-delete,
	.zymarg-vo-view,
	.zymarg-quick-view,
	.zpv-copy,
	.zpv-rotate,
	.zymarg-delay-add,
	.zymarg-delay-remove,
	.zymarg-navorder-up,
	.zymarg-navorder-down,
	.zymarg-ship-invoice-btn,
	.zym-linkbtn,
	.zymarg-search-form__submit):hover {
	color: var(--zym-button-theme-glow-text);
	background: var(--zym-button-theme-glow-bg);
	border-color: transparent;
	box-shadow: var(--zym-button-theme-glow-shadow);
	transform: translateY(-2px) scale(1.03);
}

:is(.zymarg-btn,
	button.zymarg-btn,
	input[type="submit"].zymarg-btn,
	a.button,
	button.button,
	input.button,
	input[type="submit"],
	button[type="submit"],
	.wp-block-button__link,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit,
	.woocommerce .single_add_to_cart_button,
	.zymarg-import-btn,
	.zymarg-cataudit-btn,
	.zymarg-copy,
	.zymarg-crop-save,
	.zymarg-login__submit,
	.zymarg-login__google,
	.zymarg-logout-modal__btn,
	.zymarg-rv-save,
	.zymarg-rv-edit,
	.zymarg-rv-delete,
	.zymarg-vo-view,
	.zymarg-quick-view,
	.zpv-copy,
	.zpv-rotate,
	.zymarg-delay-add,
	.zymarg-delay-remove,
	.zymarg-navorder-up,
	.zymarg-navorder-down,
	.zymarg-ship-invoice-btn,
	.zym-linkbtn,
	.zymarg-search-form__submit):active {
	color: var(--zym-button-theme-glow-text);
	background: var(--zym-button-theme-glow-bg);
	border-color: transparent;
	box-shadow: 0 4px 12px rgba(197, 24, 197, 0.18);
	transform: none;
}

:is(.zymarg-btn,
	button.zymarg-btn,
	input[type="submit"].zymarg-btn,
	a.button,
	button.button,
	input.button,
	input[type="submit"],
	button[type="submit"],
	.wp-block-button__link,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit,
	.woocommerce .single_add_to_cart_button,
	.zymarg-import-btn,
	.zymarg-cataudit-btn,
	.zymarg-copy,
	.zymarg-crop-save,
	.zymarg-login__submit,
	.zymarg-login__google,
	.zymarg-logout-modal__btn,
	.zymarg-rv-save,
	.zymarg-rv-edit,
	.zymarg-rv-delete,
	.zymarg-vo-view,
	.zymarg-quick-view,
	.zpv-copy,
	.zpv-rotate,
	.zymarg-delay-add,
	.zymarg-delay-remove,
	.zymarg-navorder-up,
	.zymarg-navorder-down,
	.zymarg-ship-invoice-btn,
	.zym-linkbtn,
	.zymarg-search-form__submit):focus-visible {
	outline: 2px solid var(--zym-button-focus-color);
	outline-offset: 3px;
}

:is(.zymarg-btn--sm, .zymarg-btn--small, .button-small, .btn-sm, .zymarg-cataudit-btn--sm) {
	padding: var(--zym-button-padding-y-small) var(--zym-button-padding-x-small);
	font-size: var(--zym-button-font-size-small);
}

:is(.zymarg-btn--lg, .zymarg-btn--large) {
	padding: var(--zym-button-padding-y-large) var(--zym-button-padding-x-large);
	font-size: var(--zym-button-font-size-large);
}

/* Legacy secondary/ghost classes now resolve to the approved Plain treatment. */
:is(.zymarg-btn--secondary, .zymarg-btn--ghost, .btn-outline, .button-secondary) {
	color: var(--zym-button-text);
	background: var(--zym-color-button-pop);
	border-color: transparent;
	box-shadow: none;
}

/* Semantic danger remains red without creating a third ZYMARG treatment. */
:is(.btn-danger, .zymarg-import-btn--danger, .zymarg-rv-delete--danger, .zymarg-btn--danger) {
	color: var(--zym-color-error-text, #FFFFFF);
	background: var(--zym-color-error, #B3261E);
}
:is(.btn-danger, .zymarg-import-btn--danger, .zymarg-rv-delete--danger, .zymarg-btn--danger):hover {
	color: var(--zym-color-error-text, #FFFFFF);
	background: var(--zym-color-error-hover, #D43F3A);
}

/* Glow Sweep is opt-in and uses the exact v13 geometry. */
.zymarg-btn--glow-sweep {
	overflow: hidden;
	position: relative;
	box-shadow: var(--zym-button-sweep-shadow);
}
.zymarg-btn--glow-sweep::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset-block: 0;
	left: -70%;
	width: 20%;
	pointer-events: none;
	opacity: 0;
	filter: none;
	transform: translateX(0);
	background: none;
}
.zymarg-btn--glow-sweep > * { position: relative; z-index: 1; }
@keyframes zymarg-button-glow-sweep {
	from { transform: translateX(0); }
	to { transform: translateX(850%); }
}
.zymarg-btn--glow-sweep:hover { transform: translateY(-1px); }
.zymarg-btn--glow-sweep:hover::before { display: none; animation: none; }
.zymarg-btn--glow-sweep:active { transform: none; box-shadow: 0 4px 14px rgba(197, 24, 197,.18); }
.zymarg-btn--glow-sweep:active::before { animation-play-state: paused; }

:is(.zymarg-btn, .button, .btn, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, input[type="submit"], button[type="submit"]):disabled,
:is(.zymarg-btn, .button, .btn, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, input[type="submit"], button[type="submit"])[aria-disabled="true"] {
	opacity: .55;
	cursor: default;
	transform: none;
	box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
	:is(.zymarg-btn, .button, .btn, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, input[type="submit"], button[type="submit"]) { transition: none; }
	.zymarg-btn--glow-sweep::before { animation: none; }
}
