/**
 * Pacific Research Peptides — sitewide action-button contract.
 *
 * Loaded after every page/module stylesheet so actions keep one geometry and
 * typographic treatment without altering icon controls, quantity steppers,
 * payment-wallet controls, toggles, badges, or status pills.
 */

:root {
	--prp-action-blue: #176fbd;
	--prp-action-blue-hover: #0f4f91;
	--prp-action-navy: #102a57;
	--prp-action-radius: 10px;
	--prp-action-height: 48px;
	--prp-action-focus: #75b9f2;
}

html body.prp-premium-v2.prp-premium-v2 :is(
	a.prp-button,
	a.prp-c-button,
	a.button,
	button.button,
	input.button,
	.woocommerce-button,
	.wp-element-button,
	.wp-block-button__link,
	main button[type="submit"],
	main input[type="submit"],
	footer button[type="submit"],
	footer input[type="submit"],
	.prp-v2-newsletter button[type="submit"],
	.prp-entry-consent__accept,
	.prp-footer-cookie-preferences,
	.prp-member-referral__copy,
	.single_add_to_cart_button,
	#place_order
) {
	box-sizing: border-box !important;
	display: inline-flex !important;
	min-height: var(--prp-action-height) !important;
	padding: 12px 20px !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	border: 1px solid var(--prp-action-blue) !important;
	border-radius: var(--prp-action-radius) !important;
	background: var(--prp-action-blue) !important;
	box-shadow: 0 8px 18px rgb(23 111 189 / 14%) !important;
	color: #fff !important;
	font-family: var(--prp-font-body, "Avenir Next", Avenir, Montserrat, Arial, sans-serif) !important;
	font-size: 14px !important;
	font-style: normal !important;
	font-weight: 850 !important;
	line-height: 1.2 !important;
	letter-spacing: .035em !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
	white-space: normal;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

html body.prp-premium-v2.prp-premium-v2 :is(
	a.prp-button,
	a.prp-c-button,
	a.button,
	button.button,
	input.button,
	.woocommerce-button,
	.wp-element-button,
	.wp-block-button__link,
	main button[type="submit"],
	main input[type="submit"],
	footer button[type="submit"],
	footer input[type="submit"],
	.prp-v2-newsletter button[type="submit"],
	.prp-entry-consent__accept,
	.prp-footer-cookie-preferences,
	.prp-member-referral__copy,
	.single_add_to_cart_button,
	#place_order
):where(:hover, :focus-visible) {
	border-color: var(--prp-action-blue-hover) !important;
	background: var(--prp-action-blue-hover) !important;
	color: #fff !important;
	box-shadow: 0 10px 24px rgb(15 79 145 / 20%) !important;
	transform: translateY(-1px);
}

html body.prp-premium-v2.prp-premium-v2 :is(
	a.prp-button,
	a.prp-c-button,
	a.button,
	button.button,
	input.button,
	.woocommerce-button,
	.wp-element-button,
	.wp-block-button__link,
	main button[type="submit"],
	main input[type="submit"],
	footer button[type="submit"],
	footer input[type="submit"],
	.prp-v2-newsletter button[type="submit"],
	.prp-entry-consent__accept,
	.prp-footer-cookie-preferences,
	.prp-member-referral__copy,
	.single_add_to_cart_button,
	#place_order
):focus-visible {
	outline: 3px solid var(--prp-action-focus) !important;
	outline-offset: 3px !important;
}

/* Secondary actions keep hierarchy while sharing the exact same geometry. */
html body.prp-premium-v2.prp-premium-v2 :is(
	.prp-button--secondary,
	.prp-c-button--secondary,
	.prp-button--outline,
	.prp-c-button--outline,
	.button.is-secondary,
	.button.secondary
) {
	border-color: #9fc2e6 !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--prp-action-navy) !important;
}

html body.prp-premium-v2.prp-premium-v2 :is(
	.prp-button--secondary,
	.prp-c-button--secondary,
	.prp-button--outline,
	.prp-c-button--outline,
	.button.is-secondary,
	.button.secondary
):where(:hover, :focus-visible) {
	border-color: var(--prp-action-blue) !important;
	background: #eef6fd !important;
	color: var(--prp-action-navy) !important;
}

/* Destructive actions remain unmistakable, but use the same button contract. */
body.prp-premium-v2 :where(.button.delete, .button.remove, .prp-button--danger, .is-destructive) {
	border-color: #b4232c !important;
	background: #b4232c !important;
	color: #fff !important;
}

body.prp-premium-v2 :where(
	a.prp-button,
	a.prp-c-button,
	a.button,
	button.button,
	input.button,
	.woocommerce-button,
	.wp-element-button,
	.wp-block-button__link,
	main button[type="submit"],
	main input[type="submit"],
	footer button[type="submit"],
	footer input[type="submit"],
	.prp-v2-newsletter button[type="submit"],
	.prp-entry-consent__accept,
	.prp-footer-cookie-preferences,
	.prp-member-referral__copy,
	.single_add_to_cart_button,
	#place_order
):where(:disabled, [disabled], .disabled, .is-disabled) {
	border-color: #cfd6df !important;
	background: #e5e8ee !important;
	box-shadow: none !important;
	color: #5c6572 !important;
	cursor: not-allowed !important;
	opacity: 1 !important;
	transform: none !important;
}

/* Explicit exclusions: these are controls, not action buttons. */
	body.prp-premium-v2 :where(
	.prp-site-header button,
	.prp-v2-drawer__close,
	.prp-cart-drawer__close,
	.prp-v2-drawer__backdrop,
	.prp-cart-drawer__backdrop,
	.quantity button,
	.quantity .button,
	.minus,
	.plus,
	.slick-arrow,
	.swiper-button-prev,
	.swiper-button-next,
	.wcpay-payment-request-wrapper button,
	#wc-stripe-payment-request-button
) {
	text-transform: none;
}

/* Keep groups deliberate instead of visually fused. */
body.prp-premium-v2 :where(.woocommerce-orders-table__cell-order-actions, .prp-action-group, .button-group) {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	align-items: center !important;
}

body.prp-premium-v2 :where(.woocommerce-orders-table__cell-order-actions, .prp-action-group, .button-group) > :where(a, button, input) {
	margin: 0 !important;
}

@media (max-width: 640px) {
	body.prp-premium-v2 :where(.woocommerce-orders-table__cell-order-actions, .prp-action-group, .button-group) {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}

	body.prp-premium-v2 :where(.woocommerce-orders-table__cell-order-actions, .prp-action-group, .button-group) > :where(a, button, input) {
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.prp-premium-v2 :where(a.button, button.button, input.button, .prp-button, .prp-c-button, button[type="submit"], input[type="submit"]) {
		transition: none !important;
	}
}

/* Partner hero: neutralize the legacy light-button color during interaction. */
html body.prp-premium-v2.prp-premium-v2 .prp-referral-hero .prp-referral-hero__actions a.prp-button--light,
html body.prp-premium-v2.prp-premium-v2 .prp-referral-hero .prp-referral-hero__actions a.prp-button--light:visited {
	border-color: var(--prp-action-blue) !important;
	background: var(--prp-action-blue) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

html body.prp-premium-v2.prp-premium-v2 .prp-referral-hero .prp-referral-hero__actions a.prp-button--light:is(:hover, :focus-visible, :active) {
	border-color: var(--prp-action-blue-hover) !important;
	background: var(--prp-action-blue-hover) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	box-shadow: 0 10px 24px rgb(15 79 145 / 28%) !important;
}

/*
 * Account dashboard action contract.
 *
 * Several custom account modules render semantic links without WooCommerce's
 * `.button` class.  Keep those links scoped to their action containers so
 * ordinary inline links in account copy remain links, while every actual
 * dashboard action shares the sitewide button system above.
 */
html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
	.prp-verification-banner > a,
	.prp-v2-consent-status > a,
	.prp-v2-account-overview footer > a,
	.prp-member-dashboard-link > a,
	.prp-member-referral__tools > a,
	.prp-member-actions > a,
	.prp-v2-reorder-hub > div:last-child > a,
	.woocommerce-Addresses .woocommerce-Address-title a.edit
) {
	box-sizing: border-box !important;
	display: inline-flex !important;
	height: var(--prp-action-height) !important;
	min-height: var(--prp-action-height) !important;
	padding: 12px 20px !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	margin: 0 !important;
	border: 1px solid var(--prp-action-blue) !important;
	border-radius: var(--prp-action-radius) !important;
	background: var(--prp-action-blue) !important;
	box-shadow: 0 8px 18px rgb(23 111 189 / 14%) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	font-family: var(--prp-font-body, "Avenir Next", Avenir, Montserrat, Arial, sans-serif) !important;
	font-size: 14px !important;
	font-style: normal !important;
	font-weight: 850 !important;
	line-height: 1.2 !important;
	letter-spacing: .035em !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
	white-space: normal !important;
	cursor: pointer !important;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
	.prp-verification-banner > a,
	.prp-v2-consent-status > a,
	.prp-v2-account-overview footer > a,
	.prp-member-dashboard-link > a,
	.prp-member-referral__tools > a,
	.prp-member-actions > a,
	.prp-v2-reorder-hub > div:last-child > a,
	.woocommerce-Addresses .woocommerce-Address-title a.edit
):is(:hover, :focus-visible, :active) {
	border-color: var(--prp-action-blue-hover) !important;
	background: var(--prp-action-blue-hover) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	box-shadow: 0 10px 24px rgb(15 79 145 / 20%) !important;
	transform: translateY(-1px) !important;
}

html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
	.prp-verification-banner > a,
	.prp-v2-consent-status > a,
	.prp-v2-account-overview footer > a,
	.prp-member-dashboard-link > a,
	.prp-member-referral__tools > a,
	.prp-member-actions > a,
	.prp-v2-reorder-hub > div:last-child > a,
	.woocommerce-Addresses .woocommerce-Address-title a.edit
):focus-visible {
	outline: 3px solid var(--prp-action-focus) !important;
	outline-offset: 3px !important;
}

/* Action rows have visible separation and balanced controls. */
html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
	.prp-member-actions,
	.prp-member-referral__tools,
	.prp-v2-reorder-hub > div:last-child,
	.woocommerce-orders-table__cell-order-actions
) {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 12px !important;
}

html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
	.prp-member-actions,
	.prp-v2-reorder-hub > div:last-child,
	.woocommerce-orders-table__cell-order-actions
) > :is(a, button, input) {
	flex: 0 1 auto !important;
	margin: 0 !important;
}

@media (max-width: 640px) {
	html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
		.prp-member-actions,
		.prp-member-referral__tools,
		.prp-v2-reorder-hub > div:last-child,
		.woocommerce-orders-table__cell-order-actions
	) {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}

	html body.prp-premium-v2.prp-premium-v2 .woocommerce-MyAccount-content :is(
		.prp-member-actions,
		.prp-member-referral__tools,
		.prp-v2-reorder-hub > div:last-child,
		.woocommerce-orders-table__cell-order-actions
	) > :is(a, button, input) {
		height: auto !important;
		min-height: var(--prp-action-height) !important;
		width: 100% !important;
	}
}
