/*
 * LockerForge skin for Easy Digital Downloads 3.x: cart, checkout, confirmation, receipt, order history and purchase buttons.
 * Loads only on store pages, products and resources.
 */

.lf-store .lf-store-body {
	--lf-field-h: 48px;
}

/* Checkout layout: details on the left, order summary on the right. */
.lf-store #edd_checkout_form_wrap.edd-blocks__checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
	grid-template-areas: "form cart";
	align-items: start;
	gap: clamp(1.5rem, 1rem + 3vw, 4rem);
	max-width: none;
	margin: 0;
}

.lf-store .edd-blocks__checkout > .edd-blocks__cart {
	grid-area: cart;
	position: sticky;
	top: calc(var(--lf-header-h) + 1.5rem);
}

.lf-store .edd-blocks__checkout > .edd-blocks__purchase-form,
.lf-store .edd-blocks__checkout > #edd_purchase_form_wrap,
.lf-store .edd-blocks__checkout > form {
	grid-area: form;
	min-width: 0;
}

@media (max-width: 899px) {
	.lf-store #edd_checkout_form_wrap.edd-blocks__checkout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "cart" "form";
	}

	.lf-store .edd-blocks__checkout > .edd-blocks__cart {
		position: static;
	}
}

/* Cart card (checkout summary and the full cart block). */
.lf-store .edd-blocks-cart {
	overflow: hidden;
	margin: 0;
	border: 1px solid var(--lf-line);
	border-radius: var(--lf-r-xl);
	background: var(--lf-surface);
	box-shadow: var(--lf-card-shadow-hover);
	font-size: .9375rem;
}

.lf-store .edd-blocks__cart-full {
	max-width: 40rem;
}

.lf-store .edd-blocks-cart__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 1rem 1.25rem;
	border: 0;
	border-bottom: 1px solid var(--lf-line);
}

.lf-store .edd-blocks-cart__row-header {
	padding-block: .8rem;
	background: var(--lf-surface-2);
	color: var(--lf-text-3);
	font-size: .6875rem;
	font-weight: 650;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.lf-store .edd-blocks-cart__row-header > div {
	font-weight: inherit;
}

.lf-store .edd_cart_item_name {
	min-width: 0;
	font-weight: 650;
	letter-spacing: -.01em;
}

.lf-store .edd_checkout_cart_item_title {
	display: flex;
	align-items: center;
	gap: .85rem;
}

.lf-store .edd_cart_item_image {
	flex: none;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border: 1px solid var(--lf-line);
	border-radius: 10px;
	background: var(--lf-surface-2);
}

.lf-store .edd_cart_item_image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.lf-store .edd-blocks-cart__row-item .edd_cart_item_price {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.lf-store .edd_cart_actions {
	display: flex;
	margin: 0;
}

.lf-store .edd-blocks-cart__action-remove {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--lf-line);
	border-radius: 50%;
	color: var(--lf-text-3);
	text-decoration: none;
	transition: color .2s var(--lf-ease), border-color .2s var(--lf-ease);
}



.lf-store .edd-blocks-cart__action-remove:hover {
	border-color: #dc2626;
	color: #dc2626;
}

.lf-store .edd-blocks-cart__row-footer {
	justify-content: flex-end;
	border-bottom: 0;
	background: var(--lf-surface-2);
}

.lf-store .edd_cart_total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	width: 100%;
	color: var(--lf-text-2);
	font-weight: 600;
}

.lf-store .edd_cart_amount {
	color: var(--lf-text);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}

.lf-store .edd-blocks__cart-full > .edd-blocks__cart {
	margin: 0;
}

.lf-store a.edd-blocks__button,
.lf-store .edd-blocks__cart-full .edd-blocks__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	margin-top: 1.25rem;
	padding: 0 1.6rem;
	border: 0;
	border-radius: var(--lf-r);
	background: var(--lf-ember);
	color: var(--lf-ink-900);
	font-size: 1rem;
	font-weight: 650;
	text-decoration: none;
}

.lf-store a.edd-blocks__button:hover {
	background: var(--lf-ember-300);
}

/* Discount form */
.lf-store .edd-discount-code-field-wrap,
.lf-store #edd_discount_code {
	margin: 0;
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--lf-line);
}

/* Purchase form */
.lf-store #edd_purchase_form fieldset,
.lf-store #edd_purchase_form fieldset.edd-blocks-form,
.lf-store #edd_purchase_form .edd-blocks-form {
	margin: 0 0 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.lf-store #edd_purchase_form legend {
	display: block;
	width: 100%;
	margin-bottom: 1.1rem;
	padding: 0 0 .75rem;
	border-bottom: 1px solid var(--lf-line);
	font-size: var(--lf-step-2);
	font-weight: 700;
	letter-spacing: -.025em;
}

.lf-store .edd-blocks-form__group,
.lf-store #edd_purchase_form p:not(.edd-description) {
	margin: 0 0 1.1rem;
}

.lf-store .edd-label,
.lf-store #edd_purchase_form label {
	display: block;
	margin-bottom: .4rem;
	color: var(--lf-text);
	font-size: .875rem;
	font-weight: 650;
}

.lf-store .edd-required-indicator {
	margin-left: .2rem;
	color: var(--lf-accent-text);
}

.lf-store #edd_purchase_form input.edd-input,
.lf-store #edd_purchase_form select.edd-select,
.lf-store #edd_purchase_form input[type="text"],
.lf-store #edd_purchase_form input[type="email"],
.lf-store #edd_purchase_form input[type="password"],
.lf-store #edd_purchase_form input[type="tel"],
.lf-store #edd_purchase_form select {
	width: 100%;
	height: var(--lf-field-h);
	padding: 0 1rem;
	border: 1px solid var(--lf-line-strong);
	border-radius: var(--lf-r);
	background: var(--lf-surface);
	color: var(--lf-text);
	font-size: 1rem;
	box-shadow: none;
	transition: border-color .2s var(--lf-ease), box-shadow .2s var(--lf-ease);
}

.lf-store #edd_purchase_form input:focus,
.lf-store #edd_purchase_form select:focus {
	border-color: var(--lf-ember);
	outline: none;
	box-shadow: 0 0 0 4px rgba(255, 106, 43, .16);
}

.lf-store #edd_purchase_form .edd-description {
	margin: .4rem 0 0;
	color: var(--lf-text-3);
	font-size: .8125rem;
	line-height: 1.45;
}

.lf-store #edd_checkout_user_info {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 1rem;
}

.lf-store #edd_checkout_user_info > legend,
.lf-store #edd_checkout_user_info > #edd-email-wrap {
	grid-column: 1 / -1;
}

@media (max-width: 599px) {
	.lf-store #edd_checkout_user_info {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Payment and submit */
.lf-store .edd-blocks__payment-details,
.lf-store #edd_purchase_submit {
	margin: 0;
}

.lf-store #edd-purchase-button,
.lf-store #edd_purchase_form .edd-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	margin-top: .5rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: var(--lf-r);
	background: var(--lf-ember);
	color: var(--lf-ink-900);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: -.01em;
	cursor: pointer;
	transition: background-color .2s var(--lf-ease), transform .2s var(--lf-ease);
}

.lf-store #edd-purchase-button:hover {
	background: var(--lf-ember-300);
}

.lf-store #edd-purchase-button:active {
	transform: translateY(1px);
}

.lf-store #edd_final_total_wrap {
	margin: 0 0 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--lf-line);
	border-radius: var(--lf-r);
	background: var(--lf-surface-2);
	font-weight: 650;
}

.lf-store .edd_errors,
.lf-store .edd-alert {
	margin: 0 0 1.25rem;
	padding: .9rem 1.1rem;
	border: 1px solid rgba(220, 38, 38, .3);
	border-radius: var(--lf-r);
	background: rgba(220, 38, 38, .06);
	color: var(--lf-text);
	font-size: .9375rem;
}

.lf-store .edd-alert-success {
	border-color: rgba(22, 163, 74, .3);
	background: rgba(22, 163, 74, .06);
}

/* Gateway choices */
.lf-store #edd_payment_mode_select {
	display: grid;
	gap: .5rem;
}

.lf-store .edd-gateway-option {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .8rem 1rem;
	border: 1px solid var(--lf-line-strong);
	border-radius: var(--lf-r);
	cursor: pointer;
}

.lf-store .edd-gateway-option-selected {
	border-color: var(--lf-ember);
	box-shadow: 0 0 0 3px rgba(255, 106, 43, .12);
}

/* Empty cart */
.lf-store .edd_empty_cart,
.lf-store .edd-blocks-cart__empty {
	padding: 2rem;
	border: 1px dashed var(--lf-line-strong);
	border-radius: var(--lf-r-lg);
	color: var(--lf-text-2);
	text-align: center;
}

/* Receipt and order history tables */
.lf-store #edd_purchase_receipt,
.lf-store #edd_purchase_receipt_products,
.lf-store .edd-table,
.lf-store #edd_user_history {
	width: 100%;
	border-collapse: collapse;
	font-size: .9375rem;
}

.lf-store #edd_purchase_receipt th,
.lf-store #edd_purchase_receipt td,
.lf-store #edd_purchase_receipt_products th,
.lf-store #edd_purchase_receipt_products td,
.lf-store #edd_user_history th,
.lf-store #edd_user_history td {
	padding: .75rem .6rem;
	border-bottom: 1px solid var(--lf-line);
	text-align: left;
}

/* Purchase buttons on products and resources */
.lf-buybox .edd-add-to-cart.lf-btn,
.lf-buybox .edd_go_to_checkout.lf-btn {
	width: 100%;
}

.lf-buybox .edd-loading {
	margin-left: .5rem;
}

.lf-buybox .edd-cart-added-alert {
	display: block;
	margin-top: .6rem;
	color: #15803d;
	font-size: .875rem;
	font-weight: 600;
	text-align: center;
}

/* Keep cart rows split edge to edge at every width. */
.lf-store .edd-blocks-form__cart .edd-blocks-cart__row {
	flex-wrap: nowrap;
}

.lf-store .edd-blocks-form__cart .edd-blocks-cart__row > div:first-of-type {
	flex: 1 1 auto;
	min-width: 0;
}

.lf-store .edd-blocks-form__cart .edd-blocks-cart__row > div:last-of-type:not(:first-of-type) {
	flex: none;
	text-align: right;
}

@media (max-width: 599px) {
	.lf-steps-bar {
		gap: .5rem 1rem;
		font-size: .8125rem;
	}

	.lf-steps-bar li:not(.is-current) .lf-steps-bar__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* Outline button for light store pages */
.lf-btn--line {
	border: 1px solid var(--lf-line-strong);
	background: var(--lf-surface);
	color: var(--lf-text);
}

.lf-btn--line:hover {
	border-color: var(--lf-text-3);
	background: var(--lf-surface-2);
}

/* Header tone per store page */
.lf-store-head--failed .lf-store-head__secure {
	color: #b45309;
}

.lf-store-head--receipt .lf-store-head__secure {
	color: #15803d;
}

/* Next steps box (failed payment, receipt) */
.lf-store-next {
	max-width: 44rem;
	margin: 1.5rem 0 0;
	padding: 1.4rem 1.5rem;
	border: 1px solid var(--lf-line);
	border-radius: var(--lf-r-lg);
	background: var(--lf-surface);
	box-shadow: var(--lf-card-shadow);
}

.lf-store-next--plain {
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.lf-store-next__text {
	margin: 0 0 1.1rem;
	color: var(--lf-text-2);
}

.lf-store-next__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
}

/* Page text EDD adds above its blocks (for example "Thank you for your purchase!") */
.lf-store-body > p:not([class*="lf-"]):not(.edd-alert) {
	max-width: 44rem;
	color: var(--lf-text-2);
	font-size: 1.0625rem;
}

.lf-store-body > .edd-alert,
.lf-store-body > .edd_errors {
	max-width: 44rem;
}

/* Sign in card on Order History for visitors */
.lf-signin {
	max-width: 28rem;
	padding: clamp(1.4rem, 1rem + 1.5vw, 2rem);
	border: 1px solid var(--lf-line);
	border-radius: var(--lf-r-xl);
	background: var(--lf-surface);
	box-shadow: var(--lf-card-shadow-hover);
}

.lf-signin__title {
	margin: 0 0 .4rem;
	font-size: var(--lf-step-2);
	letter-spacing: -.025em;
}

.lf-signin__text {
	margin: 0 0 1.25rem;
	color: var(--lf-text-2);
	font-size: .9375rem;
}

.lf-signin form p {
	margin: 0 0 1rem;
}

.lf-signin label {
	display: block;
	margin-bottom: .4rem;
	font-size: .875rem;
	font-weight: 650;
}

.lf-signin .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-weight: 500;
}

.lf-signin input[type="text"],
.lf-signin input[type="password"] {
	width: 100%;
	height: 48px;
	padding: 0 1rem;
	border: 1px solid var(--lf-line-strong);
	border-radius: var(--lf-r);
	background: var(--lf-surface);
	color: var(--lf-text);
	font-size: 1rem;
}

.lf-signin input:focus {
	border-color: var(--lf-ember);
	outline: none;
	box-shadow: 0 0 0 4px rgba(255, 106, 43, .16);
}

.lf-signin input[type="submit"] {
	width: 100%;
	min-height: 50px;
	border: 0;
	border-radius: var(--lf-r);
	background: var(--lf-ember);
	color: var(--lf-ink-900);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.lf-signin input[type="submit"]:hover {
	background: var(--lf-ember-300);
}

.lf-signin__lost {
	margin: .25rem 0 0;
	font-size: .875rem;
}

/* EDD forms outside checkout (login, register, profile editor, order details) */
.lf-store .edd-blocks-form:not(#edd_purchase_form *) input[type="text"],
.lf-store .edd-blocks-form:not(#edd_purchase_form *) input[type="email"],
.lf-store .edd-blocks-form:not(#edd_purchase_form *) input[type="password"],
.lf-store .edd-blocks-form:not(#edd_purchase_form *) select {
	width: 100%;
	height: 48px;
	padding: 0 1rem;
	border: 1px solid var(--lf-line-strong);
	border-radius: var(--lf-r);
	background: var(--lf-surface);
	font-size: 1rem;
}

.lf-store .edd-blocks-form .edd-submit:not(#edd-purchase-button) {
	min-height: 48px;
	padding: 0 1.4rem;
	border: 0;
	border-radius: var(--lf-r);
	background: var(--lf-ember);
	color: var(--lf-ink-900);
	font-weight: 700;
	cursor: pointer;
}

/* Receipt, confirmation and order history blocks (EDD 3.x) */
.lf-store .edd-blocks__receipt,
.lf-store .edd-blocks__confirmation,
.lf-store .edd-blocks__orders,
.lf-store .wp-block-edd-receipt,
.lf-store .wp-block-edd-confirmation,
.lf-store .wp-block-edd-order-history {
	max-width: 52rem;
}

.lf-store .edd-blocks-receipt__totals,
.lf-store .edd-blocks-receipt__items,
.lf-store .edd-blocks__row-group,
.lf-store .edd-blocks-orders__order {
	overflow: hidden;
	margin: 0 0 1.25rem;
	border: 1px solid var(--lf-line);
	border-radius: var(--lf-r-lg);
	background: var(--lf-surface);
}

.lf-store .edd-blocks__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	margin: 0;
	padding: .85rem 1.25rem;
	border: 0;
	border-bottom: 1px solid var(--lf-line);
	font-size: .9375rem;
}

.lf-store .edd-blocks__row:last-child {
	border-bottom: 0;
}

.lf-store .edd-blocks__row-header {
	background: var(--lf-surface-2);
	color: var(--lf-text-3);
	font-size: .6875rem;
	font-weight: 650;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.lf-store .edd-blocks__row-label {
	color: var(--lf-text-2);
	font-weight: 600;
}

.lf-store .edd-blocks__row-value {
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.lf-store .edd_receipt_payment_status.complete,
.lf-store .edd-blocks__row-value.complete {
	color: #15803d;
	font-weight: 650;
}

.lf-store .edd_download_file_link,
.lf-store .edd-blocks-receipt__items a[href*="eddfile"] {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 40px;
	padding: 0 1rem;
	border-radius: var(--lf-r);
	background: var(--lf-ember);
	color: var(--lf-ink-900);
	font-size: .9375rem;
	font-weight: 650;
	text-decoration: none;
}

.lf-store .edd-blocks-orders__order-header,
.lf-store .edd-blocks-orders__order-data {
	padding: .9rem 1.25rem;
}

.lf-store .edd-blocks-orders__order-header {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	background: var(--lf-surface-2);
	font-weight: 650;
}

.lf-store .edd-blocks-orders__order-details a {
	color: var(--lf-accent-text);
	font-weight: 650;
}

/* Products page intro text above the grid */
.lf-shop-intro {
	margin-bottom: var(--lf-s-6);
}

/* Receipt and order history: our cards replace EDD's inner padding and borders. */
.lf-store .wp-block-edd-receipt .edd-blocks-receipt__totals,
.lf-store .wp-block-edd-confirmation .edd-blocks-receipt__totals,
.lf-store .edd-blocks-receipt__items {
	display: block;
	margin: 0 0 1.5rem;
	padding: 0;
}

.lf-store .edd-blocks-receipt__items .edd-blocks__row {
	padding: 1rem 1.25rem;
}

.lf-store .edd-blocks-receipt__item-details .edd-blocks__row-label {
	color: var(--lf-text);
	font-size: 1rem;
	font-weight: 650;
}

.lf-store .edd_purchase_receipt_files {
	margin: .6rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--lf-text-3);
	font-size: .875rem;
}

.lf-store .edd_purchase_receipt_files li + li {
	margin-top: .5rem;
}

.lf-store .edd-blocks-receipt__item-price {
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.lf-store .wp-block-edd-receipt h3,
.lf-store .wp-block-edd-confirmation h3 {
	margin: 2rem 0 .75rem;
	font-size: var(--lf-step-1);
	letter-spacing: -.02em;
}

.lf-store .wp-block-edd-confirmation > h3:first-child,
.lf-store .wp-block-edd-receipt > h3:first-child {
	margin-top: .5rem;
}

.lf-store .edd-blocks__confirmation-details a {
	display: inline-block;
	margin-top: .25rem;
	color: var(--lf-accent-text);
	font-weight: 650;
}

.lf-store--receipt .lf-store-body > p:first-child {
	margin: 0 0 1.25rem;
	color: var(--lf-text);
	font-size: var(--lf-step-1);
	font-weight: 650;
	letter-spacing: -.02em;
}

.lf-store .edd-blocks__orders-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1.25rem;
}

.lf-store .edd-blocks-orders__order {
	gap: 0;
	margin: 0;
	padding: 0;
	box-shadow: var(--lf-card-shadow);
}

.lf-store .edd-blocks-orders__order-header {
	padding: .9rem 1.25rem;
	border-bottom: 1px solid var(--lf-line);
}

.lf-store .edd-blocks-orders__order-status.complete {
	color: #15803d;
}

.lf-store .edd-blocks-orders__order-data {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem .5rem;
	color: var(--lf-text-2);
}

.lf-store .edd-blocks-orders__order-amount {
	color: var(--lf-text);
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.lf-store .edd-blocks-orders__order-details,
.lf-store .edd-blocks-orders__order-downloads-link {
	padding: .25rem 1.25rem 1.1rem;
}

.lf-store .edd-blocks-orders__order-downloads-link:empty {
	display: none;
}

.lf-store .edd-blocks-orders__order-details .edd-blocks-orders__order-downloads-link {
	padding: 0;
}

.lf-store .edd-blocks-orders__order-downloads-link a {
	color: var(--lf-accent-text);
	font-weight: 650;
}
