/*** LOGIN ***/

/* Page fills the viewport below the fixed header */
#login-page,
#lost-password {
	min-height: calc(100vh - var(--header-height));
	min-height: calc(100dvh - var(--header-height));
}

/** Password toggle **/
#login-page .dy-password-toggle,
#lost-password .dy-password-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 21px;
	height: 21px;
	display: inline-flex;
	cursor: pointer;
	color: var(--ground);
	user-select: none;
	line-height: var(--e-global-typography-accent-line-height);
}

#login-page .dy-password-toggle svg,
#lost-password .dy-password-toggle svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Positioning context for the toggle */
#login-page .elementor-login .elementor-field-group,
#lost-password .elementor-field-group {
	position: relative;
}

/** Text links **/
#login-page a.elementor-lost-password,
#lost-password a.elementor-lost-password {
	display: block;
	width: 100%;
	font-size: 1rem;
	text-align: center;
	color: var(--ground-60);
	transition: color 0.3s ease;
}

#login-page a.elementor-lost-password:hover,
#lost-password a.elementor-lost-password:hover {
	color: var(--ground);
}

/** Error notice **/
#login-page .dy-login-error {
	background-color: var(--ground-10);
	color: var(--text);
	border-left: 8px solid var(--error);
	padding: 12px 16px;
	margin-bottom: 16px;
	border-radius: 4px;
	font-size: 1rem;
}

/** Remember me toggle **/
#login-page .elementor-remember-me {
	height: 24px;
}

#login-page .elementor-remember-me label {
	display: inline-flex;
	align-items: center;
	position: relative;
	padding-left: 52px;
	cursor: pointer;
	user-select: none;
}

/* The native checkbox stays in the accessibility tree but is visually
   replaced by the track and knob below */
#login-page .elementor-remember-me input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

#login-page .elementor-remember-me label::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 24px;
	background-color: var(--ground-30);
	border-radius: 999px;
	transition: background-color 0.3s ease;
}

#login-page .elementor-remember-me label::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	background-color: var(--white);
	border-radius: 50%;
	transition: left 0.3s ease;
}

#login-page .elementor-remember-me label:has(input:checked)::before {
	background-color: var(--ground);
}

#login-page .elementor-remember-me label:has(input:checked)::after {
	left: 19px;
}



/*** LOST PASSWORD ***/

#lost-password {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#lost-password > * {
	width: 100%;
	max-width: 380px;
}

/* Hide the default My Account intro copy */
.woocommerce-lost-password #my-account-page .e-con-inner {
	padding: 0;
}

.woocommerce-lost-password #my-account-page .my-account-intro {
	display: none;
}

/** Intro **/
#lost-password .dy-lost-password__intro {
	margin-bottom: 40px;
}

#lost-password .dy-lost-password__intro h1 {
	margin: 0 0 16px;
}

#lost-password .dy-lost-password__intro p {
	margin: 0;
	font-family: var(--e-global-typography-text-font-family);
	font-weight: var(--e-global-typography-text-font-weight);
	color: var(--ground);
}

/** Form **/
#lost-password .elementor-form-fields-wrapper {
	display: flex;
	flex-direction: column;
	row-gap: 12px;
}

#lost-password .elementor-field-group {
	width: 100%;
	margin: 0;
	padding: 0;
}

#lost-password .elementor-field-textual {
	width: 100%;
}

#lost-password .elementor-button {
	width: 100%;
	background-color: var(--ground);
	color: var(--white);
	transition: background-color 0.2s ease;
}

#lost-password .elementor-button:hover,
#lost-password .elementor-button:focus-visible {
	background-color: var(--ground-70);
	color: var(--white);
}

#lost-password .woocommerce-notices-wrapper > ul {
	margin-bottom: 16px;
}



/*** MY ACCOUNT ***/

/** Navigation tabs **/
#my-account-page .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

#my-account-page .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
	display: none;
}

#my-account-page .woocommerce-MyAccount-navigation-link {
	padding: 0;
	flex: 0 0 auto;
	white-space: nowrap;
}

#my-account-page .woocommerce-MyAccount-navigation-link.is-active a {
	color: var(--white);
}

#my-account-page .woocommerce-MyAccount-navigation-link--edit-account {
	order: 1;
}

#my-account-page .woocommerce-MyAccount-navigation-link--orders {
	order: 2;
}

#my-account-page .woocommerce-MyAccount-navigation-link--edit-address {
	order: 3;
}

/** Section headings **/
#my-account-page .woocommerce-EditAccountForm legend,
#my-account-page .woocommerce-MyAccount-content-wrapper form > h2,
#my-account-page .woocommerce-Address .woocommerce-Address-title h2,
#my-account-page .woocommerce-order-details__title,
#my-account-page .woocommerce-customer-details .woocommerce-column__title {
	margin: 0;
	padding: 0;
	font-family: var(--e-global-typography-primary-font-family);
	font-size: clamp(1.75rem, 2.5vw + 1rem, 2.33rem);
	color: var(--ground);
}

/** Account details **/
#my-account-page .woocommerce-EditAccountForm {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	align-items: start;
}

#my-account-page .woocommerce-EditAccountForm > *:not(.form-row-first):not(.form-row-last) {
	grid-column: 1 / -1;
}

#my-account-page .woocommerce-EditAccountForm .woocommerce-form-row:has(#account_display_name),
#my-account-page .woocommerce-EditAccountForm .woocommerce-form-row:has(#account_email) {
	grid-column: span 1;
}

#my-account-page .woocommerce-EditAccountForm .clear {
	display: none;
}

#my-account-page .woocommerce-EditAccountForm .form-row {
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
}

#my-account-page .woocommerce-EditAccountForm fieldset {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

/* Current password sits alone on its row; the new password fields start a
   new one so the empty cell falls beside it */
#my-account-page .woocommerce-EditAccountForm .woocommerce-form-row:has(#password_1) {
	grid-column-start: 1;
}

#my-account-page .woocommerce-EditAccountForm legend {
	grid-column: 1 / -1;
	padding: 24px 0 16px 0;
}

#my-account-page .woocommerce-EditAccountForm .input-text {
	font-size: 1rem;
}

#my-account-page .woocommerce-EditAccountForm .dy-password-note {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 1rem;
	font-family: var(--e-global-typography-accent-font-family);
	font-weight: var(--e-global-typography-text-font-weight);
	color: var(--ground);
}

#my-account-page .woocommerce-EditAccountForm #account_display_name_description em {
	display: block;
	margin-top: 4px;
	font-size: 0.85rem;
	color: var(--ground);
}

#my-account-page .woocommerce-EditAccountForm .show-password-input,
#my-account-page .woocommerce-EditAccountForm .show-password-input:hover,
#my-account-page .woocommerce-EditAccountForm .show-password-input:focus,
#my-account-page .woocommerce-EditAccountForm .show-password-input:active {
	background-color: transparent;
	color: var(--ground);
}

#my-account-page .woocommerce-EditAccountForm button.woocommerce-Button {
	margin: 0;
}

/** Orders **/
#my-account-page .woocommerce-MyAccount-orders *:not(h2),
#my-account-page .woocommerce-order-details *:not(h2),
#my-account-page .woocommerce-customer-details *:not(h2) {
	font-size: 1rem;
}

/* Footer cells are th elements and fall outside the default td rules of
   both WooCommerce and Elementor */
#my-account-page .woocommerce-table--order-details th,
#my-account-page .woocommerce-table--order-details td {
	padding: 12px 12px 12px 0;
	line-height: var(--e-global-typography-text-line-height);
}

#my-account-page .woocommerce-table--order-details ul.wc-item-meta {
	padding: 0;
}

#my-account-page .woocommerce-table--order-details ul.wc-item-meta li {
	margin-top: 4px;
	display: flex;
	flex-direction: column;
}

#my-account-page .woocommerce-table--order-details ul.wc-item-meta li strong {
	font-size: 0.875rem;
	font-weight: var(--e-global-typography-accent-font-weight);
}

#my-account-page .woocommerce-table--order-details ul.wc-item-meta li p {
	font-size: 0.875rem;
}

/* The actions cell has its own class in the order list; on the detail page
   it is the cell next to the heading */
#my-account-page .woocommerce-orders-table__cell-order-actions,
#my-account-page .woocommerce-table--order-details .order-actions--heading + td {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#my-account-page .woocommerce-table--order-details .woocommerce-button {
	margin: 0;
}

#my-account-page .woocommerce-order-details.mollie-instructions {
	margin-top: 40px;
}

#my-account-page .woocommerce-order-details__title,
#my-account-page .woocommerce-customer-details .woocommerce-column__title {
	margin: 40px 0 24px 0;
}

#my-account-page .woocommerce-customer-details:last-child {
	margin-bottom: 0;
}

#my-account-page .woocommerce-customer-details address {
	font-style: italic;
}

/* Phone and email follow on from the address lines; WooCommerce puts them
   in separate paragraphs with their own margin and icon */
#my-account-page .woocommerce-customer-details--phone,
#my-account-page .woocommerce-customer-details--email {
	margin: 0;
	padding-left: 0;
}

#my-account-page .woocommerce-customer-details--phone::before,
#my-account-page .woocommerce-customer-details--email::before {
	content: none;
}

/** Address **/
#my-account-page .woocommerce-Addresses {
	margin: 0;
}

#my-account-page .woocommerce-Addresses address {
	padding-top: 16px;
}

#my-account-page .woocommerce-Address a {
	font-size: 1rem;
}

#my-account-page .woocommerce-MyAccount-content-wrapper form > h2 {
	padding-bottom: 24px;
}

/* Title and button as regular flex items; the absolute positioning applied
   by WooCommerce would otherwise take the button out of the flow */
#my-account-page .woocommerce-Address .woocommerce-Address-title {
	position: static;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin-top: 40px;
}

#my-account-page .woocommerce-Address .woocommerce-Address-title a.edit {
	position: static;
	display: inline-flex;
	padding: 8px 12px;
	font-weight: var(--e-global-typography-accent-font-weight);
	color: var(--text);
	border-radius: 4px;
	background-color: var(--home);
}

#my-account-page .woocommerce-Address .woocommerce-Address-title a.edit:hover {
	background-color: var(--home-dark);
}

/* Address form */
#my-account-page .woocommerce-address-fields {
	display: grid;
	gap: 16px;
}

#my-account-page .woocommerce-address-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	align-items: start;
}

#my-account-page .woocommerce-address-fields__field-wrapper > .form-row {
	grid-column: span 1;
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
}

#my-account-page .woocommerce-address-fields .input-text,
#my-account-page .woocommerce-address-fields select {
	font-size: 1rem;
}

#my-account-page .woocommerce-address-fields p:has(button[name="save_address"]),
#my-account-page .woocommerce-address-fields button[name="save_address"] {
	margin: 0;
}



/*** CHECKOUT ***/

#checkout .e-checkout__container {
	gap: 40px;
}

/** Login **/
#checkout .woocommerce-form-login-toggle a.e-show-login {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

#checkout .woocommerce-form-login-toggle a.e-show-login:hover {
	text-decoration: none;
}

#checkout .e-woocommerce-login-nudge {
	padding-bottom: 0;
	font-size: 1rem;
}

/* The submit button sits in its own container beside the fields; it gets
   the same spacing and aligns with the bottom of the inputs */
#checkout .e-login-wrap {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

#checkout .e-login-wrap-start {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

#checkout .e-login-wrap-start > .form-row {
	flex: 1 1 200px;
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
}

#checkout .e-login-wrap-start .clear {
	display: none;
}

#checkout .e-login-wrap-end .form-row {
	margin: 0;
	padding: 0;
}

/* Empty label Elementor uses to align the button; redundant now the
   wrapper aligns to its baseline */
#checkout .e-login-wrap-end .e-login-label {
	display: none;
}

#checkout .e-login-actions-wrap {
	margin-top: 16px;
}

#checkout .lost_password a {
	font-size: 1rem;
}

/* Remember me toggle */
#checkout .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	position: relative;
	padding-left: 52px;
	height: 24px;
	cursor: pointer;
	user-select: none;
}

#checkout .woocommerce-form-login__rememberme span {
	font-weight: var(--e-global-typography-accent-font-weight);
}

#checkout .woocommerce-form-login__rememberme input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

#checkout .woocommerce-form-login__rememberme::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 24px;
	background-color: var(--ground-30);
	border-radius: 999px;
	transition: background-color 0.3s ease;
}

#checkout .woocommerce-form-login__rememberme::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	background-color: var(--white);
	border-radius: 50%;
	transition: left 0.3s ease;
}

#checkout .woocommerce-form-login__rememberme:has(input:checked)::before {
	background-color: var(--ground);
}

#checkout .woocommerce-form-login__rememberme:has(input:checked)::after {
	left: 19px;
}

/** Customer details **/
#checkout .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	align-items: start;
}

#checkout .woocommerce-billing-fields__field-wrapper > .form-row {
	grid-column: span 1;
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
}

/** Order review **/
#checkout .woocommerce-checkout-review-order-table {
	table-layout: fixed;
}

#checkout .woocommerce-checkout-review-order-table th,
#checkout .woocommerce-checkout-review-order-table td {
	width: 50%;
	padding: 12px 12px 12px 0;
	line-height: var(--e-global-typography-text-line-height);
}

/* Elementor puts a top border on every row; it is replaced by a single
   bottom border so separators do not double up */
#checkout .woocommerce-checkout-review-order-table thead th,
#checkout .woocommerce-checkout-review-order-table tbody th,
#checkout .woocommerce-checkout-review-order-table tbody td,
#checkout .woocommerce-checkout-review-order-table tfoot th,
#checkout .woocommerce-checkout-review-order-table tfoot td {
	border-top: none;
	border-bottom: 1px solid var(--home);
}

#checkout .woocommerce-checkout-review-order-table .order-total th,
#checkout .woocommerce-checkout-review-order-table .order-total td {
	border-bottom: none;
}

#checkout .woocommerce-checkout-review-order-table .includes_tax {
	display: block;
	margin-top: 4px;
	font-size: 1rem;
}

#checkout .variation {
	font-size: 0.875rem;
	display: flex;
	flex-direction: column;
}

#checkout .variation dt {
	margin-top: 4px;
	font-weight: var(--e-global-typography-accent-font-weight);
}

#checkout del.dy-price__regular {
	opacity: 0.5;
}

/** Coupon **/
#checkout .e-coupon-anchor-description {
	display: none;
}

#checkout .coupon-container-grid {
	gap: 16px;
}

#checkout .coupon-col-1 .input-text {
	height: 48px;
}

#checkout .button {
	width: 100%;
}

/** Payment methods **/
#checkout #payment .wc_payment_methods {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	border-bottom: none;
	list-style: none;
}

#checkout #payment .wc_payment_methods::before,
#checkout #payment .wc_payment_methods::after,
#checkout #payment .wc_payment_method::before,
#checkout #payment .wc_payment_method::after {
	content: none;
	display: none;
}

#checkout #payment li.wc_payment_method {
	display: contents;
}

#checkout #payment .wc_payment_methods > li > input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

#checkout #payment .wc_payment_methods > li > label {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px 12px;
	border: 1px solid var(--ground-40);
	border-radius: 4px;
	background-color: var(--white);
	color: var(--text);
	font-family: var(--e-global-typography-text-font-family);
	font-size: 1rem;
	font-weight: var(--e-global-typography-text-font-weight);
	line-height: var(--e-global-typography-text-line-height);
	text-align: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#checkout #payment .wc_payment_methods > li > label .mollie-gateway-icon {
	position: static;
	width: auto;
	height: 24px;
	max-width: 100%;
	margin: 0;
	object-fit: contain;
}

#checkout #payment .wc_payment_methods > li > input[type="radio"]:checked + label {
	outline: 1px solid var(--ground-40);
	outline-offset: 0;
	background-color: var(--ground-10);
	font-weight: var(--e-global-typography-accent-font-weight);
}

#checkout #payment .wc_payment_methods > li > .payment_box {
	grid-column: 1 / -1;
	order: 1;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
}

#checkout #payment .wc_payment_methods > li > .payment_box::before {
	content: none;
}

#checkout #payment .payment_box > .form-row {
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
}

#checkout #payment .payment_box label {
	display: block;
	margin-bottom: 4px;
	color: var(--text);
	font-family: var(--e-global-typography-text-font-family);
	font-size: 1rem;
	font-weight: var(--e-global-typography-accent-font-weight);
}

#checkout #payment .payment_box .input-text {
	width: 100%;
	height: 48px;
	border: 1px solid var(--ground-40);
	border-radius: 4px;
	background-color: var(--white);
	color: var(--text);
	font-family: var(--e-global-typography-text-font-family);
	font-size: 1rem;
}

#checkout #payment .payment_box .input-text:focus {
	border-color: var(--ground-50);
	outline: var(--ground-50) 1px solid !important;
	outline-offset: 0 !important;
}

#checkout #payment .payment_box .input-text::placeholder {
	color: color-mix(in srgb, var(--text) 50%, transparent);
	opacity: 1;
}

/** Terms and conditions **/
#checkout .woocommerce-terms-and-conditions {
	padding: 16px;
	border: 1px solid var(--home);
	border-radius: 4px;
	background-color: var(--white);
	color: var(--text);
	font-size: 0.85rem;
	font-weight: var(--e-global-typography-text-font-weight);
	font-family: var(--e-global-typography-text-font-family);
}

/* Headings come from the source page and need to scale down inside the box */
#checkout .woocommerce-terms-and-conditions h1 { margin-top: 0; font-size: 2rem; }
#checkout .woocommerce-terms-and-conditions h2 { margin-top: 0; font-size: 1.8rem; }
#checkout .woocommerce-terms-and-conditions h3 { margin-top: 0; font-size: 1.6rem; }
#checkout .woocommerce-terms-and-conditions h4 { margin-top: 0; font-size: 1.5rem; }

#checkout .woocommerce-terms-and-conditions :last-child {
	margin-bottom: 0;
}

/* Consent row */
#checkout .woocommerce-terms-and-conditions-wrapper .form-row {
	margin: 16px 0 0 0;
	padding: 0;
}

/* No grid or flex here: the stray text nodes WooCommerce places between the
   elements would each claim a row or column of their own */
#checkout .woocommerce-terms-and-conditions-wrapper .checkbox {
	display: block;
	cursor: pointer;
}

#checkout .woocommerce-terms-and-conditions-wrapper label {
	line-height: 24px;
}

#checkout .woocommerce-terms-and-conditions-wrapper input#terms {
	margin: 0 4px 0 0;
	padding: 0;
	width: 24px;
	min-width: 24px;
	height: 24px;
	min-height: 24px;
	border: 1px solid var(--ground-40);
	border-radius: 4px;
	background-color: var(--white);
	cursor: pointer;
	display: inline-block;
	transition: none;
}

#checkout input#terms:focus,
#checkout input#terms:focus-visible,
#checkout .woocommerce-invalid input#terms {
	outline: none;
}

/* The tick is a background image, so its colour cannot come from a custom
   property; it is hard-coded to match --white */
#checkout input#terms:checked {
	border-color: var(--ground-50);
	background-color: var(--ground-50);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 6L9 17L4 12' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 21px 21px;
}

#checkout .woocommerce-terms-and-conditions-checkbox-text {
	line-height: 24px;
	font-weight: var(--e-global-typography-accent-font-weight);
}

#checkout .woocommerce-terms-and-conditions-wrapper .required {
	display: none;
}

/** Place order **/
#checkout #payment .place-order {
	--purchase-button-width: 100%;
}

#checkout #payment #place_order {
	width: 100%;
	margin: 16px 0 0 0;
}

#checkout .dy-checkout-usp {
	width: 100%;
	margin: 16px 0 0 0;
	padding: 0;
	color: var(--ground);
	font-weight: var(--e-global-typography-text-font-weight);
	font-family: var(--e-global-typography-text-font-family);
	text-align: center;
}

/** Validation **/
#checkout .woocommerce-error,
#checkout .woocommerce-error li,
#checkout .woocommerce-error strong,
#checkout .woocommerce-error a {
	color: var(--text);
	font-weight: var(--e-global-typography-text-font-weight);
}

#checkout .checkout-inline-error-message {
	margin: 4px 0 0 0;
	color: var(--error);
	font-size: 0.8125rem;
	font-weight: var(--e-global-typography-text-font-weight);
	font-family: var(--e-global-typography-text-font-family);
	line-height: 1.33;
}

.dy-hidden-field {
	display: none;
}


/*** ERROR ON CHECKOUT ***/
body.e-wc-error-notice #checkout .woocommerce p {
	font-size: 1rem;
	color: var(--text);
	line-height: var(--e-global-typography-text-line-height);
	font-weight: var(--e-global-typography-text-font-weight);
	font-family: var(--e-global-typography-text-font-family);
}

body.e-wc-error-notice #checkout .woocommerce a.button {
    display: inline-flex;
	width: auto;
    padding: 12px 24px;
    font-weight: var(--e-global-typography-accent-font-weight);
	line-height: var(--e-global-typography-accent-line-height);
    color: var(--text);
    border-radius: 4px;
    background-color: var(--home);
}

body.e-wc-error-notice #checkout .woocommerce a:hover.button {
    background-color: var(--home-dark);
}



/*** (RE)PAY ORDER ***/

/* The order-pay endpoint renders inside the checkout page (#checkout) but
   through form#order_review instead of form.woocommerce-checkout. Elementor's
   widget styling keys on that class, so the order table, the payment box and
   the purchase button fall back to WooCommerce core here and are restated. */

/* .e-con-inner keeps its 1280px limit so the left edge stays aligned with the
   rest of the site; the form is narrowed inside it instead */
.woocommerce-order-pay #checkout .elementor-widget-woocommerce-checkout-page {
	max-width: 720px;
	margin-inline: 0;
}

/** Order table **/
.woocommerce-order-pay #order_review .shop_table {
	width: 100%;
	table-layout: fixed;
	margin: 0;
	color: var(--text);
	font-family: var(--e-global-typography-text-font-family);
	font-size: 1rem;
	font-weight: var(--e-global-typography-text-font-weight);
}

.woocommerce-order-pay #order_review .shop_table th,
.woocommerce-order-pay #order_review .shop_table td {
	padding: 12px 12px 12px 0;
	border-top: none;
	border-bottom: 1px solid var(--home);
	color: var(--text);
	font-size: 1rem;
	line-height: var(--e-global-typography-text-line-height);
	text-align: left;
	vertical-align: top;
}

.woocommerce-order-pay #order_review .shop_table th {
	font-weight: var(--e-global-typography-accent-font-weight);
}

/* Widths are taken from the header row because the table is fixed; the
   product column fills whatever the other two leave over */
.woocommerce-order-pay #order_review .shop_table thead .product-quantity {
	width: 20%;
}

.woocommerce-order-pay #order_review .shop_table thead .product-total {
	width: 30%;
}

.woocommerce-order-pay #order_review .shop_table tbody .product-quantity {
	font-weight: var(--e-global-typography-text-font-weight);
}

.woocommerce-order-pay #order_review .shop_table .includes_tax {
	display: block;
	margin-top: 4px;
	font-size: 1rem;
}

.woocommerce-order-pay #order_review .shop_table tfoot tr:last-child th,
.woocommerce-order-pay #order_review .shop_table tfoot tr:last-child td {
	border-bottom: none;
}

/** Payment **/
/* Core gives #payment a grey panel and pads the row below the payment methods;
   both are removed so the row lines up with the methods above it */
.woocommerce-order-pay #checkout #payment,
.woocommerce-order-pay #checkout #payment > .form-row {
	padding: 0;
	background: none;
	border-radius: 0;
}

.woocommerce-order-pay #checkout #payment {
	margin: 24px 0 0 0;
}

.woocommerce-order-pay #checkout #payment #place_order {
	padding: var(--purchase-button-padding, 16px 24px);
}



@media (max-width: 1023px) {

	/*** CHECKOUT ***/
	#checkout .dy-reviews--compact {
		display: none;
	}
}



@media (max-width: 767px) {

	/*** MY ACCOUNT ***/
	#my-account-page .woocommerce-EditAccountForm,
	#my-account-page .woocommerce-EditAccountForm fieldset,
	#my-account-page .woocommerce-address-fields__field-wrapper {
		grid-template-columns: 1fr;
	}

	#my-account-page .woocommerce-EditAccountForm button.woocommerce-Button,
	#my-account-page .woocommerce-address-fields button[name="save_address"] {
		width: 100%;
	}

	/** Orders **/
	#my-account-page .woocommerce-orders-table__row {
		display: block;
		padding-bottom: 24px;
	}

	#my-account-page .woocommerce-orders-table__row:last-child {
		padding-bottom: 0;
	}

	#my-account-page .woocommerce-orders-table__cell-order-actions {
		justify-content: flex-end;
	}

	#my-account-page .woocommerce-orders-table__cell-order-actions::before {
		margin-right: auto;
	}



	/*** CHECKOUT ***/
	#checkout .woocommerce-billing-fields__field-wrapper {
		grid-template-columns: 1fr;
	}

	/** Login **/
	#checkout .e-login-wrap {
		flex-direction: column;
		align-items: stretch;
	}

	#checkout .e-login-wrap-end {
		margin: 0;
	}

	#checkout .e-login-wrap-start > .form-row {
		flex: 1 1 100%;
	}

	#checkout .e-login-wrap-end .button {
		width: 100%;
	}

	#checkout .e-login-actions-wrap {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	/** Payment methods **/
	#checkout #payment .wc_payment_methods,
	#checkout #payment .wc_payment_methods > li > .payment_box {
		grid-template-columns: 1fr;
	}
}