/* ==========================================================================
 * EDD checkout — edd/checkout block only (.wsft-checkout)
 * Covers logged-in shell + guest AJAX login/register. See .cursor/rules/edd-checkout.mdc
 * ========================================================================== */

/* Fieldset reset */
body.edd-checkout fieldset {
	border: none;
	margin: 0;
	min-width: 0;
	padding: 0;
}

body.edd-checkout fieldset legend {
	border: 0;
	padding: 0;
}

/* --------------------------------------------------------------------------
 * Cart
 * -------------------------------------------------------------------------- */

.wsft-checkout .edd_cart_discount .edd_discount {
	display: inline-block;
	text-align: right;
	vertical-align: top;
}

.wsft-checkout .edd_discount_remove {
	background: none;
	display: block;
	font-size: 0.75rem; /* 12px */
	height: auto;
	margin-left: 0;
	margin-top: 0.25rem; /* 4px */
	position: static;
	text-align: right;
	text-decoration: none;
	top: auto;
	width: auto;
}

.wsft-checkout .edd_discount_remove:hover {
	background: none;
	text-decoration: none;
}

.wsft-checkout .edd_discount_remove::after {
	content: "Remove";
}

.wsft-checkout .edd-checkout del,
body.edd-checkout del {
	display: none;
}

.wsft-checkout .edd_cart_amount,
.wsft-checkout .edd_cart_total {
	font-weight: 700;
}

.wsft-checkout .edd-payment-icons {
	display: none;
}

.wsft-checkout .edd-sl-renewal-details {
	font-size: 1rem;
}

.wsft-checkout .edd-sl-renewal-details .edd-sl-renewal-key {
	font-family: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-style: normal;
}

.wsft-checkout .edd-sl-renewal-details .edd-sl-renewal-label,
.wsft-checkout .edd-sl-renewal-discount-details .edd-sl-renewal-discount-label,
.wsft-checkout .edd_total {
	font-weight: normal;
}

/* Hide cart-footer discount; theme coupon is in .wsft-checkout-actions */
.wsft-checkout .edd-blocks__cart #edd_discount_code,
.wsft-checkout .edd-blocks__cart .edd-blocks-cart__discount,
.wsft-checkout .edd-blocks-form__cart #edd_discount_code,
.wsft-checkout .edd-blocks-form__cart .edd-blocks-cart__discount,
.wsft-checkout .edd-blocks-cart #edd_discount_code,
.wsft-checkout .edd-blocks-cart__discount,
.wsft-checkout .edd-blocks-cart #edd_show_discount,
.wsft-checkout .edd-blocks-cart #edd-discount-code-wrap,
.wsft-checkout .edd_cart_footer_row > .edd-blocks-cart__discount {
	display: none !important;
}

.wsft-checkout .edd-blocks-cart {
	background: var(--wp--preset--color--background-light);
	border: 1px solid var(--wp--preset--color--text-lighter) !important;
	display: block !important;
	margin-bottom: 0;
	padding: 1.25rem; /* 20px */
}

.wsft-checkout .edd-blocks-cart__row-header {
	align-items: flex-start;
	border-bottom: 1px solid var(--wp--preset--color--text-lighter);
	color: var(--wp--preset--color--text-light);
	display: flex;
	font-size: 1.125rem; /* 18px */
	font-weight: 300;
	justify-content: space-between;
	padding: 0.625rem !important; /* 10px */
}

.wsft-checkout .edd-blocks-cart__row-header .edd_cart_item_price {
	color: var(--wp--preset--color--text-light);
	font-weight: 300;
}

.wsft-checkout .edd-blocks-cart__items {
	border-bottom: none;
}

.wsft-checkout .edd-blocks-cart__row-item {
	align-items: flex-start;
	border-top: 1px solid var(--wp--preset--color--text-lighter);
	display: flex;
	justify-content: space-between;
	padding: 0.625rem !important; /* 10px */
	position: relative;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_name {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 1rem;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_checkout_cart_item_title {
	align-items: center;
	display: flex;
	gap: 0.4rem;
	line-height: 1.4;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_image {
	display: inline-block;
	margin-right: 0;
	vertical-align: middle;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_image img {
	display: block;
	height: auto;
	max-width: 25px;
}

.wsft-checkout .edd-blocks-cart__row-item .eddr-cart-item-notice {
	margin: 0;
}

.wsft-checkout .edd-blocks-cart__row-item .eddr-cart-item-notice em {
	font-style: italic;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_price {
	align-items: unset;
	color: var(--wp--preset--color--text-light);
	display: block !important;
	flex: 0 0 auto;
	font-weight: 300;
	gap: 0;
	text-align: right;
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_price del {
	color: var(--wp--preset--color--semantic-red);
}

.wsft-checkout .edd-blocks-cart__row-item .edd_cart_item_price > .edd_cart_actions {
	display: block !important;
	line-height: 1;
	margin: 0.625rem 0 0; /* 10px */
	position: static;
	text-align: right;
}

.wsft-checkout .edd-blocks-form__cart .edd-blocks-cart__row-footer.edd_cart_footer_row,
.wsft-checkout .edd-blocks-form__cart .edd_cart_footer_row {
	padding: 0 !important;
}

.wsft-checkout .edd-blocks-form__cart .edd_cart_total {
	border-top: 1px solid var(--wp--preset--color--text-lighter);
	padding: 0.625rem; /* 10px */
	text-align: right;
}

.wsft-checkout .edd-blocks-cart__action-remove {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--wp--preset--color--logo-blue);
	display: inline;
	font-size: 0.75rem; /* 12px */
	font-weight: 300;
	line-height: 1.4;
	padding: 0 !important;
	text-decoration: none;
}

.wsft-checkout .edd-blocks-cart__action-remove:hover,
.wsft-checkout .edd-blocks-cart__action-remove:focus {
	color: var(--wp--preset--color--accent-blue);
}

.wsft-checkout .edd-blocks-cart__action-remove svg {
	display: none;
}

.wsft-checkout .edd-blocks-cart__action-remove .screen-reader-text {
	clip: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	position: static;
	width: auto;
}

.wsft-checkout .edd-blocks-cart__action-remove .screen-reader-text:not(:focus):not(:active) {
	clip: auto !important;
	clip-path: none !important;
	height: auto !important;
	margin: 0 !important;
	overflow: visible !important;
	position: static !important;
	width: auto !important;
}

/* --------------------------------------------------------------------------
 * Discount code (theme field in .wsft-checkout-actions)
 * -------------------------------------------------------------------------- */

.wsft-checkout #edd_discount_code {
	display: block !important;
	font-size: 1rem;
}

.wsft-checkout #edd_discount_code p,
.wsft-checkout #edd_discount_code a,
.wsft-checkout #edd_discount_code .edd-label,
.wsft-checkout #edd_discount_code .edd-description,
.wsft-checkout #edd_discount_code .edd-input,
.wsft-checkout #edd_discount_code .edd-apply-discount,
.wsft-checkout #edd_discount_code .edd_error {
	font-size: 1rem;
}

.wsft-checkout .edd-discount-code-field-wrap {
	display: flex;
	width: 100%;
}

.wsft-checkout .edd-discount-code-field-wrap input[type="submit"] {
	margin-left: 0.4375rem; /* 7px */
}

.wsft-checkout .edd-discount-code-field-wrap #edd-discount {
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}

.wsft-checkout .edd-discount-code-field-wrap .edd-apply-discount {
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
	flex: 0 0 auto;
}

.wsft-checkout #edd-discount-code-wrap {
	width: 100%;
}

.wsft-checkout #edd-discount-code-wrap label,
.wsft-checkout #edd-discount-code-wrap .edd-description {
	display: none;
}

/* --------------------------------------------------------------------------
 * Secure SSL notice
 * -------------------------------------------------------------------------- */

.wsft-checkout #edd_secure_site_wrapper {
	background-color: color-mix(in srgb, var(--wp--preset--color--green) 15%, white);
	border-left: solid 4px var(--wp--preset--color--green);
	border-radius: 4px;
	clear: both;
	font-size: 1rem;
	margin-bottom: 1.25rem !important; /* 20px */
	padding: 0.625rem !important; /* 10px */
}

.wsft-checkout #edd_secure_site_wrapper .padlock svg path {
	fill: var(--wp--preset--color--green);
}

.wsft-checkout #edd_secure_site_wrapper span {
	font-size: 1rem;
	font-weight: 300;
}

.wsft-checkout .edd-icon.edd-icon-lock {
	display: inline-block;
	height: 1rem;
	vertical-align: text-bottom;
	width: 1rem;
}

.wsft-checkout #edd-stripe-payment-errors {
	margin-top: 1.25rem;
}

.wsft-checkout #edds-field-spacer-shim,
.wsft-checkout .edds-field-spacer-shim {
	display: none;
}

/* --------------------------------------------------------------------------
 * Labels / legends / descriptions
 * -------------------------------------------------------------------------- */

body.edd-checkout legend {
	font-size: 1.5rem; /* 24px */
	font-weight: 300;
	margin-bottom: 0.625rem; /* 10px */
	text-transform: capitalize;
}

.wsft-checkout #edd_cc_fields legend,
.wsft-checkout #edd_payment_mode_select legend,
.wsft-checkout #edd_login_fields legend,
.wsft-checkout #edd_purchase_form fieldset.edd-blocks-form > legend {
	float: left;
	font-size: 1.5rem; /* 24px */
	font-weight: 300;
	margin-bottom: 0.625rem; /* 10px */
	text-transform: capitalize;
}

.wsft-checkout .wp-block-edd-checkout #edd_purchase_form .edd-blocks-form legend {
	margin: 0 0 0.625rem; /* 10px */
}

#edd-agree-to-privacy-policy + label,
#edd_mailchimp_signup + label,
#edd_terms_of_use + label,
#edd-stripe-update-billing-address + label,
.edd-gateway-option,
.edd-description,
.edd-label {
	display: inline-block;
	font-size: 1rem;
	margin-bottom: 0.3125rem; /* 5px */
	touch-action: manipulation;
	user-select: none;
}

.edd-description {
	color: var(--wp--preset--color--text-light);
	display: block;
	font-size: 0.75rem; /* 12px */
}

.wsft-checkout #edd_checkout_user_info .edd-description,
.wsft-checkout .edd-blocks-form__group .edd-description {
	display: none;
}

.edd-required-indicator {
	color: var(--wp--preset--color--semantic-red);
	font-weight: 700;
	margin-left: 0.25rem; /* 4px */
}

/* --------------------------------------------------------------------------
 * Custom checkboxes (Mailchimp, privacy, terms, Stripe billing)
 * -------------------------------------------------------------------------- */

#edd-agree-to-privacy-policy,
#edd_mailchimp_signup,
#edd_terms_of_use,
#edd-stripe-update-billing-address {
	bottom: auto;
	height: 1.4rem;
	left: auto;
	margin: 0;
	opacity: 0;
	position: absolute;
	right: auto;
	top: auto;
	width: 1.4rem;
}

#edd-agree-to-privacy-policy + label,
#edd_mailchimp_signup + label,
#edd_terms_of_use + label,
#edd-stripe-update-billing-address + label {
	margin: 0 0 0.625rem; /* 10px */
	padding-inline-start: 1.7125rem;
	position: relative;
	transition: color 200ms ease-in-out;
}

#edd-privacy-policy-agreement {
	margin: 0.625rem 0;
}

#edd-agree-to-privacy-policy + label::before,
#edd_mailchimp_signup + label::before,
#edd_terms_of_use + label::before,
#edd-stripe-update-billing-address + label::before {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--text-light);
	border-radius: 4px;
	content: "";
	cursor: pointer;
	display: inline-block;
	height: 1.4rem;
	left: 0;
	position: absolute;
	transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
	vertical-align: top;
	width: 1.4rem;
}

#edd-agree-to-privacy-policy + label::after,
#edd_mailchimp_signup + label::after,
#edd_terms_of_use + label::after,
#edd-stripe-update-billing-address + label::after {
	content: "";
	cursor: pointer;
	display: inline-block;
	height: 1.4rem;
	left: 0;
	position: absolute;
	top: 0;
	vertical-align: top;
	width: 1.4rem;
}

#edd-agree-to-privacy-policy:focus + label::before,
#edd_mailchimp_signup:focus + label::before,
#edd_terms_of_use:focus + label::before,
#edd-stripe-update-billing-address:focus + label::before {
	border-color: var(--wp--preset--color--logo-blue);
	box-shadow: 0 0 0 2px var(--wp--preset--color--soft-blue);
}

#edd-agree-to-privacy-policy:disabled + label,
#edd_mailchimp_signup:disabled + label,
#edd_terms_of_use:disabled + label,
#edd-stripe-update-billing-address:disabled + label {
	color: var(--wp--preset--color--text-light);
}

#edd-agree-to-privacy-policy:disabled + label::before,
#edd_mailchimp_signup:disabled + label::before,
#edd_terms_of_use:disabled + label::before,
#edd-stripe-update-billing-address:disabled + label::before {
	background-color: var(--wp--preset--color--background-light);
	cursor: not-allowed;
}

#edd-agree-to-privacy-policy:disabled + label::after,
#edd_mailchimp_signup:disabled + label::after,
#edd_terms_of_use:disabled + label::after,
#edd-stripe-update-billing-address:disabled + label::after {
	cursor: not-allowed;
}

#edd-agree-to-privacy-policy:checked + label::before,
#edd_mailchimp_signup:checked + label::before,
#edd_terms_of_use:checked + label::before,
#edd-stripe-update-billing-address:checked + label::before {
	background-color: var(--wp--preset--color--logo-blue);
	border-color: var(--wp--preset--color--logo-blue);
}

#edd-agree-to-privacy-policy:checked + label::after,
#edd_mailchimp_signup:checked + label::after,
#edd_terms_of_use:checked + label::after,
#edd-stripe-update-billing-address:checked + label::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
	background-position: 50%;
	background-repeat: no-repeat;
	background-size: 50%;
}

#edd-agree-to-privacy-policy:checked:disabled + label::before,
#edd_mailchimp_signup:checked:disabled + label::before,
#edd_terms_of_use:checked:disabled + label::before,
#edd-stripe-update-billing-address:checked:disabled + label::before {
	opacity: 0.5;
}

#edd-agree-to-privacy-policy {
	margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
 * Inputs / selects / Stripe Elements
 * -------------------------------------------------------------------------- */

.edd-input,
.edd-select,
.edd-stripe-card-element.StripeElement {
	appearance: none;
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--text-lighter);
	border-radius: 4px;
	color: var(--wp--preset--color--text-dark);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	font-weight: inherit;
	height: 2.5625rem; /* 41px */
	line-height: 1.4;
	margin: 0;
	padding: 0.53125rem 0.625rem; /* 8.5px 10px */
	touch-action: manipulation;
	transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
	width: 100%;
}

.edd-input::placeholder,
.edd-select::placeholder {
	color: var(--wp--preset--color--text-light);
	opacity: 1;
}

.edd-input:focus,
.edd-select:focus,
.edd-stripe-card-element.StripeElement:focus {
	border-color: var(--wp--preset--color--logo-blue);
	box-shadow: 0 0 0 2px var(--wp--preset--color--soft-blue);
	outline: 0;
}

.edd-input:disabled,
.edd-select:disabled,
.edd-stripe-card-element.StripeElement:disabled {
	background-color: var(--wp--preset--color--background-light);
	color: var(--wp--preset--color--text-light);
	cursor: not-allowed;
	opacity: 1;
	user-select: none;
}

select.edd-select:not([multiple]) {
	background-image: url('data:image/svg+xml,<svg%20width%3D"10"%20height%3D"5"%20viewBox%3D"169%20177%2010%205"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"><path%20fill%3D"%23373A3C"%20fill-rule%3D"evenodd"%20d%3D"M174%20182l5-5h-10"%2F><%2Fsvg>');
	background-position: right 0.625rem center;
	background-repeat: no-repeat;
	background-size: 0.625rem 0.3125rem;
	padding-right: 1.875rem; /* 30px */
	transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out, background-image 200ms ease-in-out, box-shadow 200ms ease-in-out;
}

select.edd-select:not([multiple])::-ms-expand {
	display: none;
}

select.edd-select:not([multiple]):disabled {
	background-image: url('data:image/svg+xml,<svg%20width%3D"10"%20height%3D"5"%20viewBox%3D"169%20177%2010%205"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"><path%20fill%3D"%23767676"%20fill-rule%3D"evenodd"%20d%3D"M174%20182l5-5h-10"%2F><%2Fsvg>');
	border-color: var(--wp--preset--color--text-lighter);
}

select.edd-select:not([multiple]) optgroup {
	font-weight: 700;
}

select.edd-select:not([multiple]) option:disabled {
	color: var(--wp--preset--color--text-light);
}

/* --------------------------------------------------------------------------
 * Alerts / errors
 * -------------------------------------------------------------------------- */

.edd_errors,
.edd-alert-success {
	background-color: var(--wp--preset--color--background-light);
	border-left: solid 4px var(--wp--preset--color--text-lighter);
	border-radius: 4px;
	font-size: 1rem;
	margin-bottom: 1.25rem;
	padding: 0.625rem;
}

.edd_errors > *:last-child,
.edd-alert-success > *:last-child {
	margin-bottom: 0;
}

.edd_errors.primary,
.edd-alert-success.primary {
	background-color: color-mix(in srgb, var(--wp--preset--color--logo-blue) 15%, white);
	border-color: var(--wp--preset--color--logo-blue);
}

.edd_errors.secondary,
.edd-alert-success.secondary {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent-blue) 15%, white);
	border-color: var(--wp--preset--color--accent-blue);
}

.edd_errors.success,
.edd-alert-success.success {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-green) 15%, white);
	border-color: var(--wp--preset--color--semantic-green);
}

.edd_errors.information,
.edd-alert-success.information {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-blue) 15%, white);
	border-color: var(--wp--preset--color--semantic-blue);
}

.edd_errors.warning,
.edd-alert-success.warning {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-yellow) 15%, white);
	border-color: var(--wp--preset--color--semantic-yellow);
}

.edd_errors.danger,
.edd-alert-success.danger {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-red) 15%, white);
	border-color: var(--wp--preset--color--semantic-red);
}

.edd-alert-success {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-green) 15%, white);
	border-color: var(--wp--preset--color--semantic-green);
}

.edd_errors {
	background-color: color-mix(in srgb, var(--wp--preset--color--semantic-red) 15%, white);
	border-color: var(--wp--preset--color--semantic-red);
}

/* --------------------------------------------------------------------------
 * Payment method cards
 * -------------------------------------------------------------------------- */

.wsft-checkout #edd_payment_mode_select_wrap {
	background: var(--wp--preset--color--background-light);
	border: 1px solid var(--wp--preset--color--text-lighter) !important;
	box-sizing: border-box;
	display: block !important;
	max-width: none !important;
	padding: 1.25rem !important;
	width: 100%;
}

.wsft-checkout #edd_payment_mode_select_wrap #edd_payment_mode_select {
	background: transparent;
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

.wsft-checkout #edd-payment-mode-wrap {
	clear: both;
	display: flex !important;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.25rem !important;
	margin-top: 0.75rem;
}

.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option {
	align-items: center !important;
	background: var(--wp--preset--color--white) !important;
	border: 2px solid var(--wp--preset--color--text-lighter) !important;
	border-radius: 4px !important;
	box-sizing: border-box;
	cursor: pointer;
	display: flex !important;
	flex: 1 1 0 !important;
	flex-direction: column !important;
	font-size: 1rem !important;
	font-weight: 300 !important;
	gap: 0.5rem !important;
	justify-content: center !important;
	margin: 0 !important;
	min-height: 5.5rem;
	min-width: 0;
	padding: 1.25rem 1.5rem !important;
	position: relative;
	text-align: center !important;
	transform: none !important;
	transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out;
	width: auto;
}

.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option.edd-gateway-option-selected,
.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option:has(input[type="radio"]:checked) {
	background: var(--wp--preset--color--soft-blue) !important;
	border-color: var(--wp--preset--color--logo-blue) !important;
}

.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option:hover {
	transform: none !important;
}

.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option .edd-payment-icons {
	display: none !important;
}

.wsft-checkout label.edd-gateway-option#edd-gateway-option-stripe::before,
.wsft-checkout label.edd-gateway-option[id*="paypal"]:not([id*="paypalpro"])::before {
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	display: block !important;
	flex-shrink: 0;
	opacity: 0.75;
}

.wsft-checkout label.edd-gateway-option#edd-gateway-option-stripe::before {
	background-image: url("../images/checkout/credit-card.svg");
	height: 1.75rem;
	width: 2.5rem;
}

.wsft-checkout label.edd-gateway-option[id*="paypal"]:not([id*="paypalpro"])::before {
	background-image: url("../images/checkout/paypal.svg");
	height: 2rem;
	width: 2rem;
}

.wsft-checkout #edd-paypal-container {
	margin: 0 auto;
	max-width: 500px;
}

.edd-gateway-option input[type="radio"] {
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

@media (max-width: 767px) {
	.wsft-checkout #edd-payment-mode-wrap {
		flex-direction: column;
	}

	.wsft-checkout #edd-payment-mode-wrap label.edd-gateway-option {
		flex: 1 1 100% !important;
	}
}

/* --------------------------------------------------------------------------
 * Stripe saved cards (checkout)
 * -------------------------------------------------------------------------- */

.edd-stripe-card-selector.edd-card-selector-radio .edd-stripe-card-radio-item {
	margin-bottom: 0.625rem;
}

.edd-stripe-card-selector.edd-card-selector-radio .edd-stripe-card-radio-item label {
	cursor: pointer;
	display: block;
	font-size: 1rem;
	font-weight: 300;
}

.edd-stripe-card-selector.edd-card-selector-radio .edd-stripe-existing-card {
	margin-right: 0.5rem;
}

/* --------------------------------------------------------------------------
 * Buttons
 * -------------------------------------------------------------------------- */

.edd-submit {
	text-transform: capitalize;
}

.edd-submit,
.edd-stripe-add-new,
#edd-recurring-update-submit,
.edd-stripe-submit-update,
.edd-stripe-cancel-update,
#edd-purchase-button {
	appearance: none;
	background-color: var(--wp--preset--color--soft-gray);
	border: 1px solid var(--wp--preset--color--text-lighter);
	border-radius: var(--wp--custom--border-radius);
	color: var(--wp--preset--color--text-dark);
	cursor: pointer;
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	font-weight: 300;
	height: 2.5625rem; /* 41px */
	line-height: 1.4;
	padding: 0.53125rem 0.625rem;
	text-align: center;
	text-decoration: none;
	text-transform: capitalize;
	touch-action: manipulation;
	transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out;
	user-select: none;
	vertical-align: middle;
}

.edd-submit:hover,
.edd-stripe-add-new:hover,
#edd-recurring-update-submit:hover,
.edd-stripe-submit-update:hover,
.edd-stripe-cancel-update:hover {
	background-color: var(--wp--preset--color--logo-gray);
	border-color: var(--wp--preset--color--logo-gray);
	color: var(--wp--preset--color--text-dark);
}

.edd-submit:hover:disabled,
.edd-stripe-add-new:hover:disabled,
#edd-recurring-update-submit:hover:disabled,
.edd-stripe-submit-update:hover:disabled,
.edd-stripe-cancel-update:hover:disabled {
	background-color: var(--wp--preset--color--text-lighter);
	border-color: var(--wp--preset--color--text-lighter);
}

.edd-submit:focus,
.edd-submit:active,
.edd-stripe-add-new:focus,
.edd-stripe-add-new:active,
#edd-recurring-update-submit:focus,
#edd-recurring-update-submit:active,
.edd-stripe-submit-update:focus,
.edd-stripe-submit-update:active,
.edd-stripe-cancel-update:focus,
.edd-stripe-cancel-update:active {
	background-color: var(--wp--preset--color--text-light);
	border-color: var(--wp--preset--color--text-light);
	color: var(--wp--preset--color--text-dark);
	outline: 0;
}

.edd-submit:focus:disabled,
.edd-submit:active:disabled,
.edd-stripe-add-new:focus:disabled,
.edd-stripe-add-new:active:disabled,
#edd-recurring-update-submit:focus:disabled,
#edd-recurring-update-submit:active:disabled,
.edd-stripe-submit-update:focus:disabled,
.edd-stripe-submit-update:active:disabled,
.edd-stripe-cancel-update:focus:disabled,
.edd-stripe-cancel-update:active:disabled {
	background-color: var(--wp--preset--color--text-lighter);
	border-color: var(--wp--preset--color--text-lighter);
}

/* Primary CTAs */
#edd-purchase-button,
.edd-stripe-add-new,
#edd-recurring-update-submit,
.edd-stripe-submit-update,
#edd_login_submit,
#edd_profile_editor_submit,
.wsft-checkout input.edd-submit[name="edd_login_submit"] {
	background-color: var(--wp--preset--color--logo-blue);
	border-color: var(--wp--preset--color--logo-blue);
	color: var(--wp--preset--color--white);
}

#edd-purchase-button:hover,
.edd-stripe-add-new:hover,
#edd-recurring-update-submit:hover,
.edd-stripe-submit-update:hover,
#edd_login_submit:hover,
#edd_profile_editor_submit:hover,
.wsft-checkout input.edd-submit[name="edd_login_submit"]:hover {
	background-color: var(--wp--preset--color--accent-blue);
	border-color: var(--wp--preset--color--accent-blue);
	color: var(--wp--preset--color--white);
}

.wsft-checkout #edd-purchase-button,
.wsft-checkout input.edd-submit[name="edd-purchase-button"],
.wsft-checkout button.edd-submit {
	background-color: var(--wp--preset--color--logo-blue) !important;
	border-color: var(--wp--preset--color--logo-blue) !important;
	color: var(--wp--preset--color--white) !important;
}

.wsft-checkout #edd-purchase-button:hover,
.wsft-checkout input.edd-submit[name="edd-purchase-button"]:hover,
.wsft-checkout button.edd-submit:hover {
	background-color: var(--wp--preset--color--accent-blue) !important;
	border-color: var(--wp--preset--color--accent-blue) !important;
	color: var(--wp--preset--color--white) !important;
}

#edd-purchase-button:hover:disabled,
.edd-stripe-add-new:hover:disabled,
#edd-recurring-update-submit:hover:disabled,
.edd-stripe-submit-update:hover:disabled,
#edd_login_submit:hover:disabled,
#edd_profile_editor_submit:hover:disabled {
	background-color: var(--wp--preset--color--logo-blue);
	border-color: var(--wp--preset--color--logo-blue);
}

#edd-purchase-button:focus,
#edd-purchase-button:active,
.edd-stripe-add-new:focus,
.edd-stripe-add-new:active,
#edd-recurring-update-submit:focus,
#edd-recurring-update-submit:active,
.edd-stripe-submit-update:focus,
.edd-stripe-submit-update:active,
#edd_login_submit:focus,
#edd_login_submit:active,
#edd_profile_editor_submit:focus,
#edd_profile_editor_submit:active {
	background-color: var(--wp--preset--color--accent-blue);
	border-color: var(--wp--preset--color--accent-blue);
	color: var(--wp--preset--color--white);
}

#edd-purchase-button:focus:disabled,
#edd-purchase-button:active:disabled,
.edd-stripe-add-new:focus:disabled,
.edd-stripe-add-new:active:disabled,
#edd-recurring-update-submit:focus:disabled,
#edd-recurring-update-submit:active:disabled,
.edd-stripe-submit-update:focus:disabled,
.edd-stripe-submit-update:active:disabled,
#edd_login_submit:focus:disabled,
#edd_login_submit:active:disabled,
#edd_profile_editor_submit:focus:disabled,
#edd_profile_editor_submit:active:disabled {
	background-color: var(--wp--preset--color--logo-blue);
	border-color: var(--wp--preset--color--logo-blue);
}

/* --------------------------------------------------------------------------
 * Layout: purchase form, actions, panels, personal-info AJAX
 * -------------------------------------------------------------------------- */

.wsft-checkout .edd-blocks__logged-in,
.wp-block-edd-checkout .edd-blocks__logged-in {
	display: none !important;
}

.wsft-checkout .edd-blocks__checkout-user {
	margin-bottom: 0;
	position: relative;
}

/* Hide login/register toggles while EDD swaps personal-info via AJAX */
.wsft-checkout .edd-blocks__checkout-user:has(.edd-checkout-block__personal-info:empty) .edd-blocks__checkout-forms,
.wsft-checkout .edd-blocks__checkout-user:has(.edd-checkout-block__personal-info .edd-loading) .edd-blocks__checkout-forms {
	visibility: hidden;
	pointer-events: none;
}

@keyframes wsft-edd-spinning {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.wsft-checkout .edd-loading-ajax.edd-loading,
.wsft-checkout .edd-discount-loader.edd-loading {
	animation: wsft-edd-spinning 1.1s infinite linear;
	border: 0.2em solid rgba(0, 0, 0, 0.2);
	border-left-color: var(--wp--preset--color--black);
	border-radius: 50%;
	box-sizing: border-box;
	display: block;
	font-size: 1rem;
	height: 1.5em;
	margin: 1.25rem auto;
	opacity: 1;
	position: relative;
	transform: translateZ(0);
	width: 1.5em;
}

.wsft-checkout .edd-blocks-form__purchase {
	border: none !important;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	padding: 0 !important;
}

.wsft-checkout .edd-blocks-form__purchase > * {
	flex: 0 0 100%;
	margin-bottom: 0;
	max-width: 100%;
	width: 100%;
}

.wsft-checkout .wsft-checkout-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin: 0;
	width: 100%;
}

.wsft-checkout .wsft-checkout-actions > .wsft-renewal-link,
.wsft-checkout .wsft-checkout-actions > #edd_discount_code {
	align-items: center;
	background: var(--wp--preset--color--background-light) !important;
	border: 1px solid var(--wp--preset--color--text-lighter) !important;
	box-sizing: border-box;
	display: flex;
	flex: 0 0 calc(50% - 0.625rem);
	justify-content: center;
	margin: 0 !important;
	max-width: calc(50% - 0.625rem);
	padding: 1.25rem !important;
}

.wsft-checkout .wsft-checkout-actions > :only-child {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (max-width: 767px) {
	.wsft-checkout .wsft-checkout-actions > .wsft-renewal-link,
	.wsft-checkout .wsft-checkout-actions > #edd_discount_code {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

.wsft-checkout .wsft-checkout-actions #edd_discount_code p,
.wsft-checkout .wsft-checkout-actions #edd_show_discount,
.wsft-checkout .wsft-checkout-actions .wsft-renewal-link-toggle {
	margin: 0;
	text-align: center;
	width: 100%;
}

/*
 * Beat theme prose-link underline (p a + three :not(.class) in style.css).
 * Covers renewal + discount “Click here” whether nested under actions or entry-content.
 */
.wsft-checkout .wsft-checkout-actions #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button),
.wsft-checkout .wsft-checkout-actions .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button),
.entry-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button),
.entry-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button),
.wp-block-post-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button),
.wp-block-post-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button) {
	color: var(--wp--preset--color--logo-blue);
	font-weight: 300;
	text-decoration: none;
}

.wsft-checkout .wsft-checkout-actions #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.wsft-checkout .wsft-checkout-actions #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus,
.wsft-checkout .wsft-checkout-actions .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.wsft-checkout .wsft-checkout-actions .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus,
.entry-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.entry-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus,
.entry-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.entry-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus,
.wp-block-post-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.wp-block-post-content .wsft-checkout #edd_show_discount a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus,
.wp-block-post-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):hover,
.wp-block-post-content .wsft-checkout .wsft-renewal-link-toggle a:not(.wp-block-button__link):not(.wp-element-button):not(.wsft-button):focus {
	color: var(--wp--preset--color--accent-blue);
	text-decoration: none;
}

.wsft-checkout .wsft-renewal-link {
	align-items: center;
	display: flex;
	justify-content: center;
}

.wsft-checkout .wsft-renewal-link-toggle {
	font-size: 1rem;
	margin: 0;
	text-align: center;
	width: 100%;
}

/* Panels: login, create-account (bare fieldset), CC fields */
.wsft-checkout #edd_cc_fields,
.wsft-checkout #edd_login_fields,
.wsft-checkout #edd_purchase_form fieldset.edd-blocks-form {
	background: var(--wp--preset--color--background-light);
	border: 1px solid var(--wp--preset--color--text-lighter) !important;
	box-sizing: border-box;
	display: block !important;
	gap: 0;
	max-width: none !important;
	padding: 1.25rem !important;
	width: 100%;
}

.wsft-checkout .edd-checkout-block__personal-info {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* all:unset wipes purchase-form > * flex width — restore full row */
.wsft-checkout .edd-blocks__user-details,
.wsft-checkout .edd-blocks__payment-details {
	all: unset;
	box-sizing: border-box;
	display: flex;
	flex: 0 0 100%;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 100%;
	width: 100%;
}

.wsft-checkout .edd-blocks__user-details.edd-blocks__user-details--logged-in {
	display: none !important;
}

.wsft-checkout .edd-blocks-form__group,
.wsft-checkout .wp-block-edd-checkout #edd_purchase_form .edd-blocks-form .edd-blocks-form__group {
	margin: 0 0 1rem;
}

.wsft-checkout .edd-blocks-form__group label {
	font-size: 1rem;
}

.wsft-checkout .edd-blocks-form__group-username {
	clear: both;
	display: block;
	width: 100%;
}

.wsft-checkout #edd_purchase_form fieldset.edd-blocks-form::after {
	clear: both;
	content: "";
	display: table;
}

.wsft-checkout .edd-blocks-form__group-edd_email {
	display: none !important;
}

.wsft-checkout #edd-user-login-submit {
	clear: both;
	margin-bottom: 0;
}

@media (min-width: 600px) {
	.wsft-checkout .edd-blocks__checkout-forms--inline {
		margin-bottom: 0;
		position: absolute;
		right: 1.25rem;
		top: 1.25rem;
		z-index: 99;
	}

	.wsft-checkout .edd-blocks-form__group-edd_first,
	.wsft-checkout .edd-blocks-form__group-password:has(+ .edd-blocks-form__group-password-confirm) {
		clear: both;
		float: left;
		width: 49%;
	}

	.wsft-checkout .edd-blocks-form__group-edd_last,
	.wsft-checkout .edd-blocks-form__group-password-confirm {
		float: right;
		width: 49%;
	}
}

/* ==========================================================================
 * EDD account — Stripe manage cards / profile editor (not checkout)
 * ========================================================================== */

.edd-stripe-card-item .card-update-form label {
	display: block;
	font-weight: 300 !important;
}

.edd-stripe-card-item {
	border: none !important;
	border-radius: 0 !important;
	margin-bottom: 1.25rem !important;
	padding: 0 !important;
}

.edd-stripe-card-item .card-update-form input {
	margin-bottom: 0 !important;
}

.edd-stripe-cancel-update {
	margin-left: 0.3125rem; /* 5px */
}

.card-update-form > label:first-child {
	font-size: 1.625rem; /* 26px */
	margin-bottom: 0.625rem;
}

.edd-stripe-card-item .card-actions a.delete {
	color: var(--wp--preset--color--semantic-red) !important;
}

.card-meta {
	display: block;
	margin-bottom: 1.25rem;
}

.card-update-field.address_country,
.card-update-field.address_state.card_state,
.card-update-field.exp_month,
.card-update-field.exp_year {
	background-color: var(--wp--preset--color--white) !important;
	background-image: url('data:image/svg+xml,<svg%20width%3D"10"%20height%3D"5"%20viewBox%3D"169%20177%2010%205"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"><path%20fill%3D"%23373A3C"%20fill-rule%3D"evenodd"%20d%3D"M174%20182l5-5h-10"%2F><%2Fsvg>') !important;
	background-position: right 0.625rem center !important;
	background-repeat: no-repeat !important;
	background-size: 0.625rem 0.3125rem !important;
	border: 1px solid var(--wp--preset--color--text-lighter) !important;
	height: initial !important;
}

.card-update-field.address_country:focus,
.card-update-field.address_state.card_state:focus,
.card-update-field.exp_month:focus,
.card-update-field.exp_year:focus {
	border-color: var(--wp--preset--color--logo-blue) !important;
}

.card-update-field.exp_month,
.card-update-field.exp_year {
	width: 6.25rem !important; /* 100px */
}

#edd-stripe-add-new-card .edd-stripe-new-card > label {
	font-size: 2rem; /* 32px */
	font-weight: 300;
	margin-bottom: 1.25rem;
}

#edd-stripe-add-new-card .edd-stripe-new-card > fieldset {
	border: none;
	padding: 0;
}

#edd-stripe-add-new-card .edd-stripe-new-card > fieldset > legend {
	display: none;
}

#edd-stripe-add-new-card .edd-stripe-new-card > fieldset label {
	font-weight: normal;
}

#edd-stripe-add-new-card .edd-stripe-new-card > fieldset .card_name {
	width: 100%;
}

#edd-stripe-add-new-card .edd-stripe-new-card > fieldset .edd-stripe-card-element {
	padding-top: 0.5625rem; /* 9px */
}

#edd-stripe-manage-cards a {
	text-decoration: underline !important;
}
