/**
 * Product license picker + purchase CTA.
 */

div.edd_price_options {
	margin: 0;
}

.product-purchase .edd_price_options {
	display: block !important;
	margin: 0 !important;
}

div.edd_price_options ul {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

div.edd_price_options li {
	margin: 0;
	list-style: none;
}

div.edd_price_options label {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	box-sizing: border-box;
	margin: 0;
	padding: 0.65rem 1.15rem 0.65rem 0.45rem;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	cursor: pointer;
	font-size: 0;
	line-height: 1.3;
	min-height: 2.6rem;
	transition: background-color 140ms ease;
}

@media (max-width: 781px) {
	div.edd_price_options label {
		min-height: 2.85rem;
		padding: 0.75rem 1rem 0.75rem 0.2rem;
	}
}

div.edd_price_options label:hover {
	background: color-mix(in srgb, var(--wp--preset--color--text, #1a1c1e) 2.5%, transparent);
}

div.edd_price_options label:has(input:checked) {
	background: color-mix(in srgb, var(--wp--preset--color--accent, #f5405b) 5%, transparent);
}

div.edd_price_options input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	opacity: 0;
	pointer-events: none;
}

div.edd_price_options .indicator {
	flex: 0 0 1rem;
	box-sizing: border-box;
	width: 1rem;
	height: 1rem;
	border: 1.5px solid color-mix(in srgb, var(--wp--preset--color--subtle, #8b949e) 70%, transparent);
	border-radius: 50%;
	background: transparent;
}

div.edd_price_options label:has(input:checked) .indicator {
	border-color: var(--wp--preset--color--accent, #f5405b);
	background: radial-gradient(circle, var(--wp--preset--color--accent, #f5405b) 0 0.28rem, transparent 0.3rem);
}

.edd_download_purchase_form .edd_price_options .edd_price_option_copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	min-width: 0;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.25;
	color: var(--wp--preset--color--muted, #5b6570);
}

div.edd_price_options label:has(input:checked) .edd_price_option_copy {
	color: var(--wp--preset--color--text, #1a1c1e);
	font-weight: 600;
}

.edd_download_purchase_form .edd_price_options .edd_price_option_badge {
	color: var(--wp--preset--color--accent, #f5405b);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.edd_download_purchase_form .edd_price_options .edd_price_option_meta {
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--wp--preset--color--subtle, #8b949e);
}

div.edd_price_options label:has(input:checked) .edd_price_option_meta {
	color: var(--wp--preset--color--muted, #5b6570);
}

.edd_download_purchase_form .edd_price_options .edd_price_option_price {
	margin-left: auto;
	font-size: 0.9875rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	white-space: nowrap;
	color: var(--wp--preset--color--muted, #5b6570);
}

.edd_download_purchase_form .edd_price_options .edd_price_option_currency {
	font-weight: 400;
	letter-spacing: 0;
}

div.edd_price_options label:has(input:checked) .edd_price_option_price {
	color: var(--wp--preset--color--text, #1a1c1e);
	font-weight: 600;
}

.product-purchase .edd-no-js,
.product-purchase .edd_go_to_checkout,
.product-purchase .edd-cart-ajax-alert,
.product-purchase .edd_purchase_submit_wrapper br,
.product-purchase p:empty,
.product-purchase .edd_download_purchase_form > p {
	display: none !important;
}

.product-purchase .edd_purchase_submit_wrapper {
	margin: 0;
	line-height: 0;
}

.product-purchase button.edd-add-to-cart.edd-has-js {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 3rem;
	margin: 0;
	border: 0;
	border-radius: var(--wp--custom--shape--button);
	background: var(--wp--custom--color--primary, #f5405b);
	color: var(--wp--custom--color--on-primary, #fff);
	font-weight: 500;
}

.product-purchase button.edd-add-to-cart:disabled {
	opacity: 0.6;
	pointer-events: none;
}

.edd-add-to-cart .edd-add-to-cart-label,
.edd-add-to-cart .edd-loading {
	transition: opacity 160ms ease !important;
}

.edd-loading {
	animation-duration: 650ms;
}

.plugins-catalog .plugin-card .wp-block-post-excerpt {
	font-size: 0.95rem;
	color: #5b6570;
}

/* Notices: pad matches card text; rail via inset shadow so it does not shift type. */
body :is(.edd-alert, .edd_errors, .edd_success, .edd-no-purchases, .edd-blocks__logged-in) {
	--bwp-notice-rail: var(--wp--custom--color--outline, #d5d9de);

	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0 0 var(--bwp-card-stack-gap, 1rem);

	/* +1px matches commerce card border so notice type shares the card text column. */
	padding: 1rem calc(var(--bwp-card-pad, 1.5rem) + 1px);
	border: 0;
	border-radius: var(--wp--custom--shape--xs, 0.25rem);
	background: var(--wp--custom--color--surface-container, #f1f2f3);
	box-shadow: inset 3px 0 0 var(--bwp-notice-rail);
	color: var(--wp--custom--color--on-surface, #2a3139);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	line-height: 1.45;
}

body .edd-alert p {
	margin: 0;
	padding: 0;
}

body .edd-alert p + p {
	margin-top: 0.35rem;
}

body .edd-alert-error {
	--bwp-notice-rail: var(--wp--custom--color--error, #b3261e);

	background: color-mix(in srgb, var(--wp--custom--color--error, #b3261e) 6%, #fff);
}

body .edd-alert-error strong {
	color: var(--wp--custom--color--error, #b3261e);
}

body :is(.edd-alert-success, .edd_success) {
	--bwp-notice-rail: #1b7a3d;

	background: color-mix(in srgb, #1b7a3d 6%, #fff);
}

body :is(.edd-alert-success, .edd_success) strong {
	color: #1b7a3d;
}

body .edd-alert-warn {
	--bwp-notice-rail: #9a6700;

	background: color-mix(in srgb, #9a6700 6%, #fff);
}

body .edd-alert-warn strong {
	color: #9a6700;
}

body .edd-blocks__logged-in strong {
	display: block;
	margin: 0 0 0.15rem;
	font-weight: 600;
}

body .edd-blocks__logged-in a {
	color: var(--wp--custom--color--on-surface-variant, #5b6570);
	font-weight: 600;
	text-underline-offset: 0.18em;
}
