/* ==========================================================================
   Xylus – Modern EDD Checkout v2
   Scoped to body.xt-edd-checkout
   Layout: left = billing / payment | right = sticky order summary
   ========================================================================== */

/* ── Design tokens ──────────────────────────────────────────────────────── */
.xt-edd-checkout {
	--xt-brand: #3b82f6;
	--xt-brand-hover: #2563eb;
	--xt-brand-light: #eff6ff;
	--xt-brand-glow: rgba(59, 130, 246, 0.15);

	--xt-text: #475569;
	--xt-heading: #0f172a;
	--xt-muted: #94a3b8;
	--xt-border: #e2e8f0;
	--xt-bg: #f8fafc;
	--xt-card-bg: #ffffff;
	--xt-success: #10b981;
	--xt-danger: #ef4444;
	--xt-warning: #f59e0b;

	--xt-radius-sm: 8px;
	--xt-radius: 12px;
	--xt-radius-lg: 16px;

	--xt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--xt-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--xt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

	--xt-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	--xt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ── Page-level resets ──────────────────────────────────────────────────── */
.xt-edd-checkout #masthead { margin-bottom: 0; }
.xt-edd-checkout.edd-checkout .post-text,
.xt-edd-checkout .site-content .post-text {
	padding: 0;
	max-width: 100%;
}
.xt-edd-checkout .site-content { max-width: 100%; padding: 0; }
.xt-edd-checkout #main.site-main { background: var(--xt-bg); min-height: 80vh; }
.xt-edd-checkout #primary { max-width: 100%; }
.xt-edd-checkout .post-header { display: none; }

/* ── Main wrapper ───────────────────────────────────────────────────────── */
.xt-edd-checkout #edd_checkout_wrap {
	display: grid;
	grid-template-columns: 1fr 420px;
	gap: 40px;
	max-width: 1160px;
	margin: 0 auto;
	padding: 40px 24px 60px;
	align-items: start;
}
.xt-edd-checkout #edd_checkout_wrap > * { grid-column: 1 / -1; }

/* Left – form area */
.xt-edd-checkout #edd_checkout_wrap > #edd_checkout_form_wrap {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

/* Right – order summary (sticky) */
.xt-edd-checkout #edd_checkout_wrap > #edd_checkout_cart_form {
	grid-column: 2;
	grid-row: 1;
	position: sticky;
	top: 24px;
}

/* ── Hide No-JS Next Button / Payment Mode Submit ─────────────────────────── */
.xt-edd-checkout #edd_payment_mode_submit,
.xt-edd-checkout fieldset#edd_payment_mode_submit,
.xt-edd-checkout .edd-no-js#edd_payment_mode_submit,
.xt-edd-checkout #edd-next-submit-wrap {
	display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN / ACCOUNT BOX
   ══════════════════════════════════════════════════════════════════════════ */
.xt-checkout-login-box {
	background: var(--xt-card-bg);
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius);
	padding: 18px 24px;
	margin-bottom: 24px;
	box-shadow: var(--xt-shadow-sm);
}

.xt-checkout-login-box.xt-logged-in {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--xt-brand-light);
	border-color: rgba(59, 130, 246, 0.2);
}
.xt-login-avatar img {
	width: 40px; height: 40px;
	border-radius: 50%;
	object-fit: cover;
}
.xt-login-info { flex: 1 1 auto; }
.xt-login-greeting { margin: 0; font-size: 15px; color: var(--xt-heading); }
.xt-login-email { margin: 2px 0 0; font-size: 13px; color: var(--xt-muted); }
.xt-login-logout {
	font-size: 13px;
	color: var(--xt-brand);
	text-decoration: underline;
	white-space: nowrap;
}

.xt-login-header {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--xt-text);
}
.xt-login-header svg { color: var(--xt-brand); flex-shrink: 0; }
.xt-login-toggle-btn {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--xt-brand);
	text-decoration: none;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--xt-brand-light);
	transition: var(--xt-transition);
}
.xt-login-toggle-btn:hover {
	background: var(--xt-brand);
	color: #fff;
}

.xt-login-form-wrap { margin-top: 18px; }
.xt-login-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}
.xt-login-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--xt-heading);
}
.xt-login-field input {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font-size: 14px;
	color: var(--xt-heading);
	background: #fff;
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius-sm);
	transition: var(--xt-transition);
}
.xt-login-field input:focus {
	outline: 0;
	border-color: var(--xt-brand);
	box-shadow: 0 0 0 3px var(--xt-brand-glow);
}
.xt-login-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}
.xt-login-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--xt-brand);
	border: 0;
	border-radius: var(--xt-radius-sm);
	cursor: pointer;
	transition: var(--xt-transition);
}
.xt-login-submit:hover { background: var(--xt-brand-hover); }
.xt-login-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.xt-login-forgot {
	font-size: 13px;
	color: var(--xt-muted);
	text-decoration: underline;
}
.xt-login-alert {
	padding: 10px 14px;
	margin-bottom: 14px;
	border-radius: var(--xt-radius-sm);
	font-size: 14px;
}
.xt-login-alert.xt-alert-error {
	background: #fef2f2;
	color: var(--xt-danger);
	border: 1px solid rgba(239, 68, 68, 0.2);
}
.xt-login-alert.xt-alert-success {
	background: #ecfdf5;
	color: var(--xt-success);
	border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════════
   LEFT COLUMN – FORM SECTIONS
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd_purchase_form fieldset:not(#edd_discount_code) {
	margin: 0 0 24px;
	padding: 24px;
	background: var(--xt-card-bg);
	border-radius: var(--xt-radius);
	border: 1px solid var(--xt-border) !important;
	box-shadow: var(--xt-shadow-sm);
	min-width: 0;
	box-sizing: border-box;
}
.xt-edd-checkout #edd_purchase_form fieldset#edd_terms_agreement,
.xt-edd-checkout #edd_purchase_form fieldset#edd_purchase_submit {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
}
.xt-edd-checkout #edd_purchase_form fieldset#edd_payment_mode_select {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin-bottom: 24px;
}

/* Section headings & Card Legends – cleanly embedded inside cards with zero top line */
.xt-edd-checkout #edd_purchase_form legend,
.xt-edd-checkout #edd-payment-mode-wrap .edd-payment-mode-label,
.xt-edd-checkout #edd_checkout_user_info legend,
.xt-edd-checkout #edd_checkout_form_wrap legend {
	display: block !important;
	float: left !important;
	width: 100% !important;
	margin: 0 0 20px 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-bottom: none !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--xt-heading) !important;
	background: transparent !important;
}

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

/* Also eliminate any border between renewal and purchase forms */
.xt-edd-checkout #edd_sl_renewal_form + #edd_purchase_form,
#edd_sl_renewal_form + #edd_purchase_form {
	border-top: none !important;
	border: none !important;
}

.xt-secure-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	margin-bottom: 16px;
	font-size: 12px;
	font-weight: 600;
	color: var(--xt-success);
	background: #ecfdf5;
	border-radius: 20px;
}

.xt-edd-checkout #edd_purchase_form fieldset > p,
.xt-edd-checkout #edd_purchase_form fieldset > div:not(.edd-alert) {
	margin: 0 0 16px;
}

.xt-edd-checkout #edd-email-wrap {
	width: 100% !important;
	clear: both !important;
}
.xt-edd-checkout #edd-first-name-wrap {
	float: left !important;
	width: calc(50% - 8px) !important;
	margin-right: 16px !important;
	clear: none !important;
}
.xt-edd-checkout #edd-last-name-wrap {
	float: left !important;
	width: calc(50% - 8px) !important;
	margin-right: 0 !important;
	clear: none !important;
}

.xt-edd-checkout #edd-card-number-wrap { width: 100% !important; clear: both !important; }
.xt-edd-checkout #edd-card-cvc-wrap { float: right !important; width: calc(50% - 8px) !important; margin-right: 0 !important; }
.xt-edd-checkout #edd-card-expiration-wrap,
.xt-edd-checkout #edd-card-exp-wrap { float: left !important; width: calc(50% - 8px) !important; margin-right: 16px !important; }
.xt-edd-checkout #edd-card-name-wrap { width: 100% !important; clear: both !important; }

@media (max-width: 640px) {
	.xt-edd-checkout #edd-first-name-wrap,
	.xt-edd-checkout #edd-last-name-wrap,
	.xt-edd-checkout #edd-card-cvc-wrap,
	.xt-edd-checkout #edd-card-expiration-wrap,
	.xt-edd-checkout #edd-card-exp-wrap {
		float: none !important;
		width: 100% !important;
		margin-right: 0 !important;
	}
}

.xt-edd-checkout #edd_purchase_form label,
.xt-edd-checkout #edd_purchase_form .edd-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--xt-heading);
}
.xt-edd-checkout #edd_purchase_form .edd-description {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	color: var(--xt-muted);
}
.xt-edd-checkout #edd_purchase_form .edd-description:empty { display: none; }

.xt-edd-checkout #edd_purchase_form input[type="text"],
.xt-edd-checkout #edd_purchase_form input[type="email"],
.xt-edd-checkout #edd_purchase_form input[type="tel"],
.xt-edd-checkout #edd_purchase_form input[type="password"],
.xt-edd-checkout #edd_purchase_form select,
.xt-edd-checkout #edd_purchase_form textarea,
.xt-edd-checkout #edd_purchase_form .edd-input,
.xt-edd-checkout #edd_purchase_form .edd-select {
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	font-size: 14px;
	color: var(--xt-heading);
	background: #fff;
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius-sm);
	box-shadow: none;
	transition: var(--xt-transition);
}
.xt-edd-checkout #edd_purchase_form input:focus,
.xt-edd-checkout #edd_purchase_form select:focus {
	outline: 0;
	border-color: var(--xt-brand);
	box-shadow: 0 0 0 3px var(--xt-brand-glow);
}

.xt-edd-checkout #edd_purchase_form .StripeElement,
.xt-edd-checkout #edd_purchase_form #edd-stripe-card-element,
.xt-edd-checkout #edd_purchase_form #edd-stripe-card-number-wrap > div,
.xt-edd-checkout #edd_purchase_form #edd-stripe-card-element-wrap > div {
	box-sizing: border-box;
	padding: 14px;
	background: #fff;
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius-sm);
}

/* ══════════════════════════════════════════════════════════════════════════
   PAYMENT METHOD LIST (Modern Grid Cards)
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd-payment-mode-wrap {
	margin: 0 0 28px;
}
.xt-edd-checkout #edd_payment_mode_select {
	border: 0;
	padding: 0;
	margin: 0 0 12px;
}

.xt-edd-checkout #edd-payment-mode-wrap #edd-payment-mode-wrap-ul,
.xt-edd-checkout #edd-payment-mode-wrap ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.xt-edd-checkout #edd-payment-mode-wrap li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.xt-edd-checkout #edd-payment-mode-wrap label {
	display: flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	min-height: 54px;
	margin: 0;
	padding: 14px 18px;
	font-size: 14.5px;
	font-weight: 600;
	border: 1.5px solid var(--xt-border);
	border-radius: var(--xt-radius);
	cursor: pointer;
	background: var(--xt-card-bg);
	transition: var(--xt-transition);
}
.xt-edd-checkout #edd-payment-mode-wrap label:hover {
	border-color: var(--xt-brand);
	box-shadow: var(--xt-shadow-sm);
	transform: translateY(-1px);
}
.xt-edd-checkout #edd-payment-mode-wrap input[type="radio"] {
	margin: 0;
	width: 17px;
	height: 17px;
	accent-color: var(--xt-brand);
	flex-shrink: 0;
}
.xt-edd-checkout #edd-payment-mode-wrap label:has(input:checked) {
	border-color: var(--xt-brand);
	background: var(--xt-brand-light);
	box-shadow: 0 0 0 3px var(--xt-brand-glow);
}

/* ══════════════════════════════════════════════════════════════════════════
   TERMS AGREEMENT (Clean checkbox card)
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd_terms_agreement {
	margin: 0 0 20px;
	padding: 14px 18px;
	background: var(--xt-card-bg);
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius);
	box-shadow: var(--xt-shadow-sm);
}
.xt-edd-checkout #edd_terms_agreement #edd_show_terms {
	margin-bottom: 8px;
	font-size: 13.5px;
}
.xt-edd-checkout #edd_terms_agreement #edd_show_terms a {
	color: var(--xt-brand);
	font-weight: 600;
	text-decoration: underline;
}
.xt-edd-checkout #edd_terms_agreement .edd-terms-agreement {
	display: flex;
	align-items: center;
	gap: 10px;
}
.xt-edd-checkout #edd_terms_agreement input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--xt-brand);
	cursor: pointer;
	flex-shrink: 0;
}
.xt-edd-checkout #edd_terms_agreement label {
	display: inline;
	font-size: 14px;
	font-weight: 500;
	color: var(--xt-heading);
	cursor: pointer;
	padding: 0;
	margin: 0;
}

/* ── Hide redundant Purchase Total at bottom (Order Summary has it sticky) ── */
.xt-edd-checkout #edd_final_total_wrap {
	display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   PURCHASE SUBMIT BUTTON
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd_purchase_submit {
	margin: 0;
}
.xt-edd-checkout #edd-purchase-button,
.xt-edd-checkout #edd_purchase_form input.edd-submit[type="submit"]#edd-purchase-button {
	display: block;
	width: 100%;
	height: auto;
	padding: 16px 24px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	border-radius: var(--xt-radius);
	background: var(--xt-brand);
	color: #fff;
	border: 0;
	box-shadow: var(--xt-shadow);
	transition: var(--xt-transition);
	cursor: pointer;
}
.xt-edd-checkout #edd-purchase-button:hover {
	background: var(--xt-brand-hover);
	transform: translateY(-1px);
	box-shadow: var(--xt-shadow-lg);
}

/* PayPal Button alignment & soft container */
.xt-edd-checkout #edd_purchase_submit .paypal-buttons,
.xt-edd-checkout #edd_purchase_submit [id^="paypal-button-container"] {
	margin-top: 10px;
	max-width: 100% !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   RIGHT SIDEBAR – ORDER SUMMARY (Both Traditional Table & Blocks Cart UI)
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd_checkout_cart_form {
	box-sizing: border-box;
	padding: 0;
	background: var(--xt-card-bg);
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius-lg);
	box-shadow: var(--xt-shadow);
	overflow: hidden;
}

/* Card Header */
.xt-edd-checkout #edd_checkout_cart_form::before {
	content: "Order Summary";
	display: block;
	padding: 18px 24px;
	font-size: 16px;
	font-weight: 700;
	color: var(--xt-heading);
	background: var(--xt-bg);
	border-bottom: 1px solid var(--xt-border);
}

/* ── Hide Save Cart Button and Container Row ─────────────────────────── */
.xt-edd-checkout .edd-cart-saving-button,
.xt-edd-checkout #edd-save-cart-button,
.xt-edd-checkout tr:has(#edd-save-cart-button),
.xt-edd-checkout tr:has(.edd-cart-saving-button) {
	display: none !important;
}

/* ── License Renewal Fieldset & Buttons (Clean, soft & modern) ────────── */
.xt-edd-checkout #edd_sl_renewal_form {
	margin: 0 0 20px 0;
	background: transparent;
	padding: 0;
}

.xt-edd-checkout #edd_checkout_form_wrap fieldset#edd_sl_renewal_fields,
#edd_checkout_wrap #edd_checkout_form_wrap fieldset#edd_sl_renewal_fields,
#content #edd_checkout_form_wrap fieldset#edd_sl_renewal_fields,
.xt-edd-checkout fieldset#edd_sl_renewal_fields {
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 0 16px 0 !important;
	background: transparent !important;
}

/* "Renew An Existing License" trigger button */
.xt-edd-checkout #edd_sl_show_renewal_form {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	background: #fff !important;
	color: var(--xt-brand) !important;
	border: 1.5px solid var(--xt-border) !important;
	border-radius: var(--xt-radius-sm) !important;
	padding: 10px 18px !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	box-shadow: var(--xt-shadow-sm) !important;
	cursor: pointer;
	transition: var(--xt-transition);
	margin-bottom: 12px;
}
.xt-edd-checkout #edd_sl_show_renewal_form:hover {
	border-color: var(--xt-brand) !important;
	background: var(--xt-brand-light) !important;
	color: var(--xt-brand-hover) !important;
}

/* When renewal form is expanded */
.xt-edd-checkout .edd-sl-renewal-form-fields {
	background: var(--xt-card-bg);
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius);
	padding: 20px 24px;
	margin-bottom: 20px;
	box-shadow: var(--xt-shadow-sm);
}
.xt-edd-checkout .edd-sl-renewal-form-fields #edd-license-key {
	height: 44px;
	border-radius: var(--xt-radius-sm);
	border: 1px solid var(--xt-border);
	padding: 0 14px;
	font-size: 14px;
	background: var(--xt-bg);
}
.xt-edd-checkout .edd-sl-renewal-form-fields #edd-license-key:focus {
	outline: none;
	border-color: var(--xt-brand);
	box-shadow: 0 0 0 3px var(--xt-brand-glow);
	background: #fff;
}
.xt-edd-checkout #edd-add-license-renewal {
	height: 40px;
	padding: 0 20px;
	border-radius: var(--xt-radius-sm);
	font-size: 13.5px;
	font-weight: 600;
	background: var(--xt-brand) !important;
	color: #fff !important;
	border: none;
	cursor: pointer;
}
.xt-edd-checkout #edd-cancel-license-renewal {
	color: var(--xt-muted);
	font-size: 13px;
	margin-left: 12px;
	text-decoration: underline;
	cursor: pointer;
}

/* "Cancel License Renewal" notice & button (when renewal is applied) */
.xt-edd-checkout #edd_sl_cancel_renewal_form {
	margin: 0 0 20px 0;
	padding: 0;
}
.xt-edd-checkout #edd_sl_cancel_renewal_form p {
	margin: 0;
	display: flex;
	align-items: center;
}
.xt-edd-checkout #edd_sl_cancel_renewal_form input[type="submit"] {
	display: inline-flex !important;
	align-items: center;
	background: #fef2f2 !important;
	color: var(--xt-danger) !important;
	border: 1px solid rgba(239, 68, 68, 0.25) !important;
	border-radius: var(--xt-radius-sm) !important;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: var(--xt-transition);
}
.xt-edd-checkout #edd_sl_cancel_renewal_form input[type="submit"]:hover {
	background: var(--xt-danger) !important;
	color: #fff !important;
	border-color: var(--xt-danger) !important;
}

/* ── License Renewal in Order Summary (Right Sidebar) ─────────────────── */
.xt-edd-checkout .edd_sl_renewal_row,
.xt-edd-checkout .edd-blocks-cart__row.edd_sl_renewal_row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	padding: 12px 24px !important;
	background: #ecfdf5 !important;
	border-top: 1px solid #d1fae5 !important;
	border-bottom: 1px solid #d1fae5 !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #065f46 !important;
}
.xt-edd-checkout .edd_sl_renewal_row td {
	padding: 0 !important;
	width: 100%;
	color: #065f46 !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
}

/* Renewing license key pill in cart item */
.xt-edd-checkout .edd-sl-renewal-details,
.xt-edd-checkout .edd_cart_item .edd_checkout_cart_item_title + span,
.xt-edd-checkout .edd_cart_item em:has(span) {
	font-style: normal;
}
.xt-edd-checkout .edd_cart_item .edd-sl-renewal-details,
.xt-edd-checkout .edd-blocks-cart__row-item .edd-sl-renewal-details {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--xt-text);
	background: var(--xt-bg);
	padding: 4px 8px;
	border-radius: 6px;
	border: 1px solid var(--xt-border);
	width: fit-content;
}

/* ── 1. EDD Traditional Table Cart Support ───────────────────────────────── */
.xt-edd-checkout #content table td.edd_cart_item_name,
.xt-edd-checkout #edd_checkout_cart td.edd_cart_item_name,
.xt-edd-checkout #edd_checkout_cart .edd_cart_item_name {
	max-width: none !important;
	width: auto !important;
}

.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart),
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) tbody,
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) tfoot {
	display: block;
	width: 100%;
	margin: 0; border: 0;
	background: none;
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) thead,
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) .edd_cart_header_row {
	display: none;
}

.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) tr {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) td,
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) th {
	display: block;
	padding: 0; border: 0;
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) tr.edd_cart_item {
	padding: 18px 24px;
	border-bottom: 1px solid var(--xt-border);
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) .edd_cart_item_name {
	flex: 1 1 auto;
	font-size: 14px;
	font-weight: 600;
	color: var(--xt-heading);
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) .edd_cart_item_price {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: 700;
	color: var(--xt-heading);
}
.xt-edd-checkout #edd_checkout_cart:not(.edd-blocks-cart) .edd_cart_actions {
	order: 3;
	flex: 0 0 auto;
}

/* ── 2. EDD Modern Blocks Cart Support (.edd-blocks-cart) ───────────────── */
.xt-edd-checkout .edd-blocks-cart {
	padding: 0;
	margin: 0;
}
.xt-edd-checkout .edd-blocks-cart__items {
	padding: 0;
	margin: 0;
}

/* Single Cart Item */
.xt-edd-checkout .edd-blocks-cart__row-item,
.xt-edd-checkout .edd_cart_item {
	display: flex !important;
	align-items: flex-start !important;
	justify-content: space-between !important;
	gap: 14px !important;
	padding: 20px 24px !important;
	border-bottom: 1px solid var(--xt-border) !important;
	background: #fff;
	transition: background 0.15s;
}
.xt-edd-checkout .edd_cart_item:hover {
	background: #fafbfc;
}

/* Item details container (Thumbnail + Title + License) */
.xt-edd-checkout .edd_cart_item .edd_cart_item_name {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.xt-edd-checkout .edd_checkout_cart_item_title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--xt-heading);
	line-height: 1.4;
}

/* Hide Cart Item Image */
.xt-edd-checkout .edd_cart_item_image,
.xt-edd-checkout #edd_checkout_cart .edd_cart_item_image {
	display: none !important;
}

/* Notice under title e.g. "Billed once per year until cancelled" */
.xt-edd-checkout .eddr-notice,
.xt-edd-checkout .eddr-cart-item-notice {
	margin: 2px 0 0 0 !important;
	font-size: 12px !important;
	color: var(--xt-muted) !important;
	font-style: normal !important;
}
.xt-edd-checkout .eddr-notice em {
	font-style: normal;
}

/* Item Price & Actions column */
.xt-edd-checkout .edd_cart_item .edd_cart_item_price {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--xt-heading);
	line-height: 1.3;
}

/* Remove button */
.xt-edd-checkout .edd-remove-from-cart,
.xt-edd-checkout .edd_cart_remove_item_btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	font-size: 0;
	color: var(--xt-muted);
	border-radius: 50%;
	transition: var(--xt-transition);
	text-decoration: none !important;
}
.xt-edd-checkout .edd-remove-from-cart::before,
.xt-edd-checkout .edd_cart_remove_item_btn::before {
	content: "\00D7";
	font-size: 18px;
	line-height: 1;
}
.xt-edd-checkout .edd-remove-from-cart:hover,
.xt-edd-checkout .edd_cart_remove_item_btn:hover {
	color: var(--xt-danger);
	background: #fef2f2;
}

/* ── Order Summary Footer / Totals ─────────────────────────────────────── */
.xt-edd-checkout .edd-blocks-cart__row-footer,
.xt-edd-checkout #edd_checkout_cart tfoot {
	margin: 0;
	padding: 16px 24px;
	background: var(--xt-bg);
}

.xt-edd-checkout .edd_cart_total,
.xt-edd-checkout #edd_checkout_cart .edd_cart_total {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	width: 100%;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--xt-heading) !important;
}
.xt-edd-checkout .edd_cart_amount {
	font-size: 18px;
	font-weight: 800;
	color: var(--xt-brand);
}

/* ── Discount Code in Sidebar ─────────────────────────────────────────── */
.xt-sidebar-discount {
	padding: 16px 24px;
	background: #fff;
	border-top: 1px solid var(--xt-border);
}
.xt-sidebar-discount .xt-discount-toggle-sidebar {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--xt-brand);
	cursor: pointer;
	text-decoration: none;
	padding: 6px 0;
	min-height: 44px;
	background: none;
	border: 0;
	transition: color 0.15s;
}
.xt-sidebar-discount .xt-discount-toggle-sidebar:hover {
	color: var(--xt-brand-hover);
}
.xt-sidebar-discount .xt-discount-toggle-sidebar svg { flex-shrink: 0; }
.xt-sidebar-discount .xt-sidebar-discount-form {
	display: none;
	margin-top: 12px;
}
.xt-sidebar-discount .xt-sidebar-discount-form.is-open { display: block; }
.xt-sidebar-discount .xt-sidebar-discount-row {
	display: flex;
	gap: 8px;
}
.xt-sidebar-discount .xt-sidebar-discount-row input {
	flex: 1 1 auto;
	height: 40px;
	padding: 0 12px;
	font-size: 13px;
	border: 1px solid var(--xt-border);
	border-radius: var(--xt-radius-sm);
	background: var(--xt-bg);
}
.xt-sidebar-discount .xt-sidebar-discount-row input:focus {
	outline: 0;
	border-color: var(--xt-brand);
	box-shadow: 0 0 0 3px var(--xt-brand-glow);
	background: #fff;
}
.xt-sidebar-discount .xt-sidebar-discount-row button {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 18px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: var(--xt-brand);
	border: 0;
	border-radius: var(--xt-radius-sm);
	cursor: pointer;
	transition: background 0.15s;
}
.xt-sidebar-discount .xt-sidebar-discount-row button:hover { background: var(--xt-brand-hover); }
.xt-sidebar-discount .xt-sidebar-discount-row button:disabled { opacity: 0.6; cursor: not-allowed; }
.xt-sidebar-discount .xt-sidebar-discount-msg {
	margin-top: 10px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	border-radius: var(--xt-radius-sm);
	display: none;
}
.xt-sidebar-discount .xt-sidebar-discount-msg.xt-discount-error {
	background: #fef2f2;
	color: var(--xt-danger);
	border: 1px solid rgba(239, 68, 68, 0.25);
	display: block;
}
.xt-sidebar-discount .xt-sidebar-discount-msg.xt-discount-success {
	background: #ecfdf5;
	color: var(--xt-success);
	border: 1px solid rgba(16, 185, 129, 0.25);
	display: block;
}

/* Completely hide original discount code in checkout form (only show in sidebar) */
.xt-edd-checkout #edd_discount_code,
.xt-edd-checkout #edd_purchase_form fieldset#edd_discount_code,
#edd_checkout_wrap #edd_discount_code,
#edd_discount_code,
#edd_show_discount {
	display: none !important;
}

/* ── Trust Badges under Order Summary ─────────────────────────────────── */
.xt-trust-badges {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 14px 20px;
	background: var(--xt-bg);
	border-top: 1px solid var(--xt-border);
	font-size: 11.5px;
	font-weight: 500;
	color: var(--xt-muted);
}
.xt-trust-badges svg { flex-shrink: 0; color: var(--xt-success); }
.xt-trust-badge-item {
	display: flex;
	align-items: center;
	gap: 5px;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
	.xt-edd-checkout #edd_checkout_wrap {
		display: flex;
		flex-direction: column;
		padding: 24px 16px 40px;
	}
	.xt-edd-checkout #edd_checkout_wrap > #edd_checkout_cart_form {
		position: static;
		width: 100%;
		box-sizing: border-box;
		order: -1;
		margin-bottom: 28px;
	}
	.xt-login-field-row {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 600px) {
	.xt-edd-checkout #edd_checkout_cart_form { border-radius: var(--xt-radius); }
	.xt-edd-checkout #edd_purchase_form fieldset { padding: 18px 16px; }
	.xt-edd-checkout #edd_purchase_form fieldset:not(#edd_discount_code):not(#edd_terms_agreement):not(#edd_purchase_submit):not(#edd_payment_mode_select) {
		grid-template-columns: 1fr;
	}
	.xt-checkout-login-box { padding: 16px; }
}

@keyframes xtSlideDown {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}
.xt-login-form-wrap[style*="block"],
.xt-sidebar-discount-form.is-open {
	animation: xtSlideDown 0.2s ease forwards;
}
tr.edd_cart_footer_row.edd_cart_discount_row {
    margin-bottom: 25px !important;
}

.xt-checkout-login-box.xt-logged-in {
    margin-top: 20px;
}

th.edd_cart_discount{
	width: 100%;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
}
.edd_discount_remove{
	margin-left: 20px;
}

div#edd-payment-mode-wrap {
    display: flex;
    gap: 20px;
}

th.edd_cart_total {
    background: transparent;
}

/* ══════════════════════════════════════════════════════════════════════════
   INLINE FORM VALIDATION ERRORS
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout .xt-field-error {
	border-color: var(--xt-danger) !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.xt-edd-checkout .xt-field-error-msg {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--xt-danger);
	line-height: 1.3;
}
/* Terms checkbox error styling */
.xt-edd-checkout #edd_terms_agreement .xt-field-error-msg {
	margin-top: 10px;
}
.xt-edd-checkout #edd_agree_to_terms.xt-field-error {
	outline: 2px solid var(--xt-danger);
	outline-offset: 2px;
	box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   DOUBLE-CLICK PROTECTION – Processing State
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd-purchase-button.xt-btn-processing,
.xt-edd-checkout #edd-purchase-button:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	pointer-events: none;
	transform: none !important;
	box-shadow: var(--xt-shadow-sm) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   HIDDEN DOM ELEMENTS – Screen Reader + Visual Cleanup
   ══════════════════════════════════════════════════════════════════════════ */
.xt-edd-checkout #edd-save-cart-button,
.xt-edd-checkout .edd-cart-saving-button,
.xt-edd-checkout #edd_next_button,
.xt-edd-checkout #edd-next-submit-wrap,
.xt-edd-checkout #edd_payment_mode_submit {
	display: none !important;
	visibility: hidden !important;
}

/* Hide duplicate discount code link in left column (only sidebar version shown) */
.xt-edd-checkout #edd_show_discount,
.xt-edd-checkout #edd_checkout_form_wrap > p > a[href*="discount"],
.xt-edd-checkout .edd-show-discount {
	display: none !important;
}