/*
 * My account: one design pattern for every endpoint (login/register, dashboard,
 * orders, view order, downloads, addresses, account details, lost password).
 * Mirrors the checkout look: white bordered cards, 2px radius, green primary.
 */

body.woocommerce-account .entry-content > .woocommerce {
	--za-primary: #109765;
	--za-primary-dark: #087d52;
	--za-border: #e9e3e0;
	--za-input-border: #ded8d4;
	--za-text: #252525;
	--za-muted: #89827e;
	--za-soft: #f8f6f5;
	color: var(--za-text);
	font-size: 13px;
	line-height: 1.55;
	margin-bottom: 40px;
}

body.woocommerce-account .entry-content > .woocommerce * {
	box-sizing: border-box;
}

body.woocommerce-account .entry-content > .woocommerce a {
	color: var(--za-primary);
	text-decoration: none;
}

body.woocommerce-account .entry-content > .woocommerce a:hover {
	color: var(--za-primary-dark);
}

/* ---------- Logged in: sidebar + content ---------- */

/* Clearfix pseudo-elements would become grid cells. */
body.woocommerce-account .entry-content > .woocommerce::before,
body.woocommerce-account .entry-content > .woocommerce::after,
body.woocommerce-account .entry-content > .woocommerce .col2-set::before,
body.woocommerce-account .entry-content > .woocommerce .col2-set::after,
body.woocommerce-account .entry-content > .woocommerce .u-columns::before,
body.woocommerce-account .entry-content > .woocommerce .u-columns::after {
	content: none !important;
	display: none !important;
}

body.woocommerce-account.logged-in .entry-content > .woocommerce {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	margin: 0;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content,
body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column1,
body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column2,
body.woocommerce-account .entry-content > .woocommerce > h2 + form.lost_reset_password,
body.woocommerce-account .entry-content > .woocommerce > form.lost_reset_password {
	background: #fff;
	border: 1px solid var(--za-border);
	border-radius: 2px;
	box-shadow: 0 2px 8px #00000005;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content {
	padding: 24px 22px;
	min-width: 0;
}

/* Navigation */
body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation {
	padding: 8px;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border: 0;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 10px 14px;
	color: var(--za-text);
	border-radius: 2px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	transition: background .15s ease, color .15s ease;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li a:hover {
	color: var(--za-primary);
	background: var(--za-soft);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
	color: #fff;
	background: var(--za-primary);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid var(--za-border);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: #b42318;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: #fef3f2;
}

/* ---------- Headings ---------- */

body.woocommerce-account .entry-content > .woocommerce h2,
body.woocommerce-account .entry-content > .woocommerce h3,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-column__title,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-order-details__title,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-Address-title h2 {
	margin: 0 0 18px;
	padding-bottom: 13px;
	color: var(--za-text);
	border-bottom: 1px solid var(--za-border);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content p {
	margin: 0 0 12px;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content > p:last-child {
	margin-bottom: 0;
}

/* ---------- Forms ---------- */

body.woocommerce-account .entry-content > .woocommerce form .form-row,
body.woocommerce-account .entry-content > .woocommerce form .woocommerce-form-row {
	margin: 0 0 14px;
	padding: 0;
}

body.woocommerce-account .entry-content > .woocommerce form .form-row label,
body.woocommerce-account .entry-content > .woocommerce form .woocommerce-form-row label {
	display: block;
	margin: 0 0 6px;
	color: var(--za-text);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

body.woocommerce-account .entry-content > .woocommerce form .required {
	color: #b42318;
	text-decoration: none;
}

body.woocommerce-account .entry-content > .woocommerce input.input-text,
body.woocommerce-account .entry-content > .woocommerce input[type="text"],
body.woocommerce-account .entry-content > .woocommerce input[type="email"],
body.woocommerce-account .entry-content > .woocommerce input[type="password"],
body.woocommerce-account .entry-content > .woocommerce input[type="tel"],
body.woocommerce-account .entry-content > .woocommerce input[type="number"],
body.woocommerce-account .entry-content > .woocommerce select,
body.woocommerce-account .entry-content > .woocommerce textarea,
body.woocommerce-account .entry-content > .woocommerce .select2-container--default .select2-selection--single {
	width: 100%;
	min-height: 38px;
	margin: 0;
	padding: 9px 12px;
	color: var(--za-text);
	background: #fff;
	border: 1px solid var(--za-input-border);
	border-radius: 2px;
	box-shadow: none;
	font-family: inherit;
	font-size: 12px;
}

body.woocommerce-account .entry-content > .woocommerce input:focus,
body.woocommerce-account .entry-content > .woocommerce select:focus,
body.woocommerce-account .entry-content > .woocommerce textarea:focus {
	border-color: var(--za-primary);
	outline: none;
	box-shadow: none;
}

body.woocommerce-account .entry-content > .woocommerce textarea {
	min-height: 75px;
	resize: vertical;
}

body.woocommerce-account .entry-content > .woocommerce .select2-container {
	width: 100% !important;
}

body.woocommerce-account .entry-content > .woocommerce .select2-container--default .select2-selection--single {
	display: flex;
	align-items: center;
	height: 38px;
}

body.woocommerce-account .entry-content > .woocommerce .select2-selection__rendered {
	padding-left: 0 !important;
	line-height: normal !important;
}

body.woocommerce-account .entry-content > .woocommerce .select2-selection__arrow {
	top: 0 !important;
	right: 8px !important;
	height: 100% !important;
}

/* Two-column rows (first/last name, etc.). */
body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-address-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 14px;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm > *,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-address-fields__field-wrapper > .form-row {
	grid-column: 1 / -1;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm > .form-row-first,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm > .form-row-last,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-address-fields__field-wrapper > .form-row-first,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-address-fields__field-wrapper > .form-row-last {
	grid-column: auto;
	float: none;
	width: auto;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm > .clear {
	display: none;
}

body.woocommerce-account .entry-content > .woocommerce form .form-row small,
body.woocommerce-account .entry-content > .woocommerce form span em {
	display: block;
	margin-top: 5px;
	color: var(--za-muted);
	font-size: 11px;
	font-style: normal;
}

body.woocommerce-account .entry-content > .woocommerce fieldset {
	margin: 6px 0 14px;
	padding: 18px 16px 4px;
	border: 1px solid var(--za-border);
	border-radius: 2px;
}

body.woocommerce-account .entry-content > .woocommerce fieldset legend {
	padding: 0 8px;
	color: var(--za-text);
	font-size: 13px;
	font-weight: 600;
}

body.woocommerce-account .entry-content > .woocommerce .password-input {
	display: block;
	position: relative;
}

body.woocommerce-account .entry-content > .woocommerce .password-input input {
	padding-right: 40px;
}

body.woocommerce-account .entry-content > .woocommerce .show-password-input {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

body.woocommerce-account .entry-content > .woocommerce input[type="checkbox"] {
	width: 16px;
	height: 16px;
	min-height: 0;
	margin: 0;
	accent-color: var(--za-primary);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-privacy-policy-text {
	margin: 0 0 14px;
	color: var(--za-muted);
	font-size: 11px;
	line-height: 1.7;
}

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

body.woocommerce-account .entry-content > .woocommerce .button,
body.woocommerce-account .entry-content > .woocommerce button.button,
body.woocommerce-account .entry-content > .woocommerce button[type="submit"],
body.woocommerce-account .entry-content > .woocommerce input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0;
	padding: 10px 22px;
	color: #fff;
	background: var(--za-primary);
	border: 1px solid var(--za-primary);
	border-radius: 2px;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

body.woocommerce-account .entry-content > .woocommerce .button:hover,
body.woocommerce-account .entry-content > .woocommerce button.button:hover,
body.woocommerce-account .entry-content > .woocommerce button[type="submit"]:hover,
body.woocommerce-account .entry-content > .woocommerce input[type="submit"]:hover {
	color: #fff;
	background: var(--za-primary-dark);
	border-color: var(--za-primary-dark);
}

/* Small secondary actions (View, Edit, Download...). */
body.woocommerce-account .entry-content > .woocommerce table .button,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-Address-title a.edit,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-pagination .button {
	min-height: 32px;
	padding: 6px 14px;
	color: var(--za-text);
	background: #fff;
	border: 1px solid var(--za-input-border);
	font-size: 12px;
	font-weight: 500;
}

body.woocommerce-account .entry-content > .woocommerce table .button:hover,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-Address-title a.edit:hover,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-pagination .button:hover {
	color: var(--za-primary);
	background: #fff;
	border-color: var(--za-primary);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-pagination {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

/* ---------- Notices ---------- */

body.woocommerce-account .entry-content > .woocommerce .woocommerce-message,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-info,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	padding: 12px 16px;
	color: #514b48;
	background: var(--za-soft);
	border: 1px solid var(--za-border);
	border-top: 2px solid var(--za-primary);
	border-radius: 2px;
	font-size: 12px;
	line-height: 1.6;
	list-style: none;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-error {
	border-top-color: #b42318;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-message::before,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-info::before,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-error::before {
	display: none;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-message .button,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-info .button {
	order: 2;
	margin-left: auto;
}

/* ---------- Tables (orders, order details, downloads) ---------- */

body.woocommerce-account .entry-content > .woocommerce table.shop_table,
body.woocommerce-account .entry-content > .woocommerce table.woocommerce-table {
	width: 100%;
	margin: 0 0 20px;
	border: 1px solid var(--za-border);
	border-radius: 2px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

body.woocommerce-account .entry-content > .woocommerce table.shop_table th,
body.woocommerce-account .entry-content > .woocommerce table.shop_table td {
	padding: 12px 14px;
	color: var(--za-text);
	background: #fff;
	border: 0;
	border-bottom: 1px solid var(--za-border);
	font-size: 12px;
	font-weight: 400;
	text-align: left;
	vertical-align: middle;
}

body.woocommerce-account .entry-content > .woocommerce table.shop_table thead th {
	color: var(--za-muted);
	background: var(--za-soft);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

body.woocommerce-account .entry-content > .woocommerce table.shop_table tbody tr:last-child th,
body.woocommerce-account .entry-content > .woocommerce table.shop_table tbody tr:last-child td,
body.woocommerce-account .entry-content > .woocommerce table.shop_table tfoot tr:last-child th,
body.woocommerce-account .entry-content > .woocommerce table.shop_table tfoot tr:last-child td {
	border-bottom: 0;
}

body.woocommerce-account .entry-content > .woocommerce table.shop_table tfoot th {
	font-weight: 600;
}

body.woocommerce-account .entry-content > .woocommerce table.shop_table .woocommerce-orders-table__cell-order-number a {
	font-weight: 600;
}

/* Status label in the orders table / view order. */
body.woocommerce-account .entry-content > .woocommerce .woocommerce-orders-table__cell-order-status {
	font-weight: 600;
}

body.woocommerce-account .entry-content > .woocommerce mark {
	padding: 2px 8px;
	color: var(--za-primary);
	background: #effbf5;
	border: 1px solid #b9efd4;
	border-radius: 2px;
	font-size: 11px;
	font-weight: 600;
}

/* ---------- Addresses ---------- */

body.woocommerce-account .entry-content > .woocommerce .woocommerce-Addresses,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-columns--addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-Addresses .col-1,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-Addresses .col-2,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-columns--addresses .col-1,
body.woocommerce-account .entry-content > .woocommerce .woocommerce-columns--addresses .col-2 {
	float: none;
	width: auto;
	margin: 0;
	padding: 18px 16px;
	background: #fff;
	border: 1px solid var(--za-border);
	border-radius: 2px;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 14px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--za-border);
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-Address-title h2 {
	margin: 0;
	padding: 0;
	border: 0;
}

body.woocommerce-account .entry-content > .woocommerce address {
	margin: 0;
	color: #514b48;
	font-style: normal;
	line-height: 1.7;
}

/* Order view: customer details columns. */
body.woocommerce-account .entry-content > .woocommerce .woocommerce-customer-details {
	margin-top: 8px;
}

/* ---------- Login / register / lost password ---------- */

body.woocommerce-account:not(.logged-in) .entry-content > .woocommerce {
	max-width: 880px;
	margin: 0 auto;
}

body.woocommerce-account .entry-content > .woocommerce #customer_login {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column1,
body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column2 {
	float: none;
	width: auto;
	margin: 0;
	padding: 24px 22px;
}

body.woocommerce-account .entry-content > .woocommerce #customer_login form.woocommerce-form {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

body.woocommerce-account .entry-content > .woocommerce form.woocommerce-form-login .form-row:last-of-type {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

body.woocommerce-account .entry-content > .woocommerce .woocommerce-LostPassword {
	margin: 4px 0 0;
}

body.woocommerce-account .entry-content > .woocommerce > form.lost_reset_password,
body.woocommerce-account .entry-content > .woocommerce > form.woocommerce-ResetPassword {
	max-width: 480px;
	margin: 0 auto;
	padding: 24px 22px;
	background: #fff;
	border: 1px solid var(--za-border);
	border-radius: 2px;
}

body.woocommerce-account .entry-content > .woocommerce form.lost_reset_password .form-row-first,
body.woocommerce-account .entry-content > .woocommerce form.lost_reset_password .form-row-last {
	float: none;
	width: 100%;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
	body.woocommerce-account.logged-in .entry-content > .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		gap: 6px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li a {
		white-space: nowrap;
	}

	body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
		margin: 0;
		padding: 0;
		border: 0;
	}

	body.woocommerce-account .entry-content > .woocommerce #customer_login {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	body.woocommerce-account .entry-content > .woocommerce .woocommerce-MyAccount-content,
	body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column1,
	body.woocommerce-account .entry-content > .woocommerce #customer_login .u-column2 {
		padding: 18px 14px;
	}

	body.woocommerce-account .entry-content > .woocommerce .woocommerce-EditAccountForm,
	body.woocommerce-account .entry-content > .woocommerce .woocommerce-address-fields__field-wrapper,
	body.woocommerce-account .entry-content > .woocommerce .woocommerce-Addresses,
	body.woocommerce-account .entry-content > .woocommerce .woocommerce-columns--addresses {
		grid-template-columns: minmax(0, 1fr);
	}

	/* WooCommerce's stacked table layout: label from data-title. */
	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive thead {
		display: none;
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive tr,
	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive td,
	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive th {
		display: block;
		width: 100%;
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive tr {
		border-bottom: 1px solid var(--za-border);
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive tr:last-child {
		border-bottom: 0;
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive td,
	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive th {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		border-bottom: 0;
		text-align: right;
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive td::before {
		content: attr(data-title);
		color: var(--za-muted);
		font-size: 11px;
		font-weight: 600;
		letter-spacing: .04em;
		text-transform: uppercase;
		text-align: left;
	}

	body.woocommerce-account .entry-content > .woocommerce table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions::before {
		display: none;
	}
}

/* Item meta (Color / Size) in order tables. */
body.woocommerce-account .entry-content > .woocommerce ul.wc-item-meta {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	color: var(--za-muted);
	font-size: 11px;
}

body.woocommerce-account .entry-content > .woocommerce ul.wc-item-meta li {
	display: flex;
	gap: 4px;
	margin: 0;
}

body.woocommerce-account .entry-content > .woocommerce ul.wc-item-meta li p {
	margin: 0;
}

/* Page title lines up with the content below it (same edges, even gap). */
body.woocommerce-account article.page .entry-header,
body.woocommerce-account article.page .entry-content {
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

body.woocommerce-account article.page .entry-header {
	margin-bottom: 20px;
	padding-top: 0;
	padding-bottom: 0;
}

body.woocommerce-account article.page .entry-title {
	margin: 0;
	padding: 0;
	line-height: 1.25;
}

body.woocommerce-account article.page .entry-content > .woocommerce {
	margin-left: 0;
	margin-right: 0;
}
