/**
 * Ajeez Signature - My Account
 *
 * Styling for the native WooCommerce account area only. Every rule is scoped to
 * body.woocommerce-account, so no other WooCommerce, Astra or checkout component
 * is affected. Presentation only - no account, order, payment, shipping or
 * checkout behaviour is altered.
 */

body.woocommerce-account {
	--aza-cream: #FAF7F0;
	--aza-sand: #F1EADD;
	--aza-line: #ded5c5;
	--aza-line-soft: #ebe3d5;
	--aza-ink: #1b2016;
	--aza-muted: #4c5546;
	--aza-green: #4D7524;
	--aza-green-dark: #3c5c1c;
	--aza-lime: #9ccb3b;
}

/* ---------- Page shell ---------- */

body.woocommerce-account .woocommerce {
	max-width: 1040px;
	margin-left: auto;
	margin-right: auto;
}

/* Breathing room under the sticky header on small screens. */
@media (max-width: 782px) {
	body.woocommerce-account #primary {
		padding-top: 24px;
	}
	body.woocommerce-account .entry-title {
		margin-top: 8px;
	}
}

/* ---------- Sign in / Create account ---------- */

body.woocommerce-account .u-columns.col2-set {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin: 0;
}

/* WooCommerce gives .col2-set a table-based clearfix. Inside a grid container
   those pseudo-elements become grid items and consume two cells, which pushes
   Login into column two and wraps Register onto a second row. */
body.woocommerce-account .u-columns.col2-set::before,
body.woocommerce-account .u-columns.col2-set::after {
	display: none;
}

body.woocommerce-account .u-columns.col2-set > .u-column1,
body.woocommerce-account .u-columns.col2-set > .u-column2 {
	width: auto;
	float: none;
	margin: 0;
	padding: 30px;
	border: 1px solid var(--aza-line-soft);
	border-radius: 16px;
	background: #ffffff;
}

/* The register card sits on cream so the two choices read as distinct. */
body.woocommerce-account .u-columns.col2-set > .u-column2 {
	background: var(--aza-cream);
}

/* WooCommerce frames form.login and form.register itself. The column card is
   already the frame, so drop the inner one rather than double-bordering. */
body.woocommerce-account .u-columns.col2-set form.login,
body.woocommerce-account .u-columns.col2-set form.register {
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
}

body.woocommerce-account .u-columns.col2-set > div > h2 {
	margin: 0 0 18px;
	color: var(--aza-ink);
}

body.woocommerce-account .u-columns.col2-set > div > h2::after {
	content: '';
	display: block;
	width: 38px;
	height: 2px;
	margin-top: 10px;
	background: var(--aza-green);
}

@media (max-width: 782px) {
	body.woocommerce-account .u-columns.col2-set {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	body.woocommerce-account .u-columns.col2-set > .u-column1,
	body.woocommerce-account .u-columns.col2-set > .u-column2 {
		padding: 22px 20px;
	}
}

/* ---------- Form controls ---------- */

body.woocommerce-account form .form-row {
	margin: 0 0 18px;
	padding: 0;
}

body.woocommerce-account form .form-row label,
body.woocommerce-account .woocommerce-form__label-for-checkbox {
	display: block;
	margin-bottom: 6px;
	color: var(--aza-muted);
	font-size: 0.86rem;
	letter-spacing: 0.02em;
}

body.woocommerce-account abbr.required {
	color: var(--aza-green);
	border: none;
	text-decoration: none;
}

body.woocommerce-account input[type=text],
body.woocommerce-account input[type=email],
body.woocommerce-account input[type=password],
body.woocommerce-account input[type=tel] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--aza-line);
	border-radius: 10px;
	background: #ffffff;
	color: var(--aza-ink);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color .18s ease, box-shadow .18s ease;
}

body.woocommerce-account input[type=text]:focus,
body.woocommerce-account input[type=email]:focus,
body.woocommerce-account input[type=password]:focus,
body.woocommerce-account input[type=tel]:focus {
	outline: none;
	border-color: var(--aza-green);
	box-shadow: 0 0 0 3px rgba(77, 117, 36, 0.14);
}

body.woocommerce-account .woocommerce-password-hint,
body.woocommerce-account form .form-row em,
body.woocommerce-account .woocommerce-privacy-policy-text p {
	color: var(--aza-muted);
	font-size: 0.85rem;
	line-height: 1.6;
}

/* ---------- Checkbox ---------- */

body.woocommerce-account input[type=checkbox] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	border: 1.5px solid var(--aza-line);
	border-radius: 5px;
	background: #ffffff;
	vertical-align: -4px;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

body.woocommerce-account input[type=checkbox]:checked {
	background: var(--aza-green);
	border-color: var(--aza-green);
}

body.woocommerce-account input[type=checkbox]:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 1px;
	width: 4px;
	height: 9px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

body.woocommerce-account input[type=checkbox]:focus-visible {
	outline: 2px solid var(--aza-lime);
	outline-offset: 2px;
}

body.woocommerce-account .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	color: var(--aza-muted);
	font-size: 0.9rem;
	margin-bottom: 4px;
}

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

body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce input.button,
body.woocommerce-account .woocommerce a.button,
body.woocommerce-account button.woocommerce-button,
body.woocommerce-account button.woocommerce-Button {
	background-color: var(--aza-green) !important;
	border: 1px solid var(--aza-green) !important;
	color: #ffffff !important;
	border-radius: 999px;
	padding: 13px 30px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	transition: background-color .18s ease, border-color .18s ease;
}

body.woocommerce-account .woocommerce button.button:hover,
body.woocommerce-account .woocommerce input.button:hover,
body.woocommerce-account .woocommerce a.button:hover,
body.woocommerce-account button.woocommerce-button:hover,
body.woocommerce-account button.woocommerce-Button:hover {
	background-color: var(--aza-green-dark) !important;
	border-color: var(--aza-green-dark) !important;
}

body.woocommerce-account .woocommerce button.button:focus-visible,
body.woocommerce-account .woocommerce a.button:focus-visible,
body.woocommerce-account button.woocommerce-button:focus-visible {
	outline: 2px solid var(--aza-lime);
	outline-offset: 2px;
}

body.woocommerce-account .woocommerce-LostPassword a {
	color: var(--aza-green);
	text-decoration: none;
	border-bottom: 1px solid rgba(77, 117, 36, 0.3);
}

body.woocommerce-account .woocommerce-LostPassword a:hover {
	border-bottom-color: var(--aza-green);
}

/* ---------- Dashboard navigation ---------- */

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0 0 6px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 16px;
	border-radius: 10px;
	border: 1px solid transparent;
	color: var(--aza-muted);
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--aza-sand);
	color: var(--aza-ink);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a {
	background: var(--aza-green);
	color: #ffffff;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:focus-visible {
	outline: 2px solid var(--aza-lime);
	outline-offset: 2px;
}

@media (min-width: 783px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		float: left;
		width: 26%;
	}
	body.woocommerce-account .woocommerce-MyAccount-content {
		float: right;
		width: 70%;
	}
}

@media (max-width: 782px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation,
	body.woocommerce-account .woocommerce-MyAccount-content {
		float: none;
		width: 100%;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		margin-bottom: 22px;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation li {
		margin: 0;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation li a {
		padding: 10px 14px;
		font-size: 0.92rem;
	}
}

/* ---------- Account details ---------- */

body.woocommerce-account .woocommerce-EditAccountForm fieldset {
	margin: 26px 0 0;
	padding: 22px;
	border: 1px solid var(--aza-line-soft);
	border-radius: 14px;
	background: var(--aza-cream);
}

body.woocommerce-account .woocommerce-EditAccountForm legend {
	padding: 0 8px;
	color: var(--aza-ink);
	font-size: 1rem;
}

/* ---------- Orders ---------- */

body.woocommerce-account table.shop_table {
	width: 100%;
	border: 1px solid var(--aza-line-soft);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

body.woocommerce-account table.shop_table th,
body.woocommerce-account table.shop_table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--aza-line-soft);
	text-align: left;
}

body.woocommerce-account table.shop_table th {
	background: var(--aza-cream);
	color: var(--aza-muted);
	font-weight: 500;
	font-size: 0.86rem;
	letter-spacing: 0.03em;
}

body.woocommerce-account table.shop_table tr:last-child td {
	border-bottom: none;
}

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

body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
	margin-bottom: 22px;
	padding: 14px 18px;
	border: 1px solid var(--aza-line-soft);
	border-top-width: 1px;
	border-radius: 12px;
	background: var(--aza-cream);
	color: var(--aza-ink);
	list-style: none;
}

body.woocommerce-account .woocommerce-message {
	border-left: 3px solid var(--aza-green);
}

body.woocommerce-account .woocommerce-error {
	border-color: #dcc0bc;
	border-left: 3px solid #a4442f;
	background: #fdf6f4;
}