/**
 * My Account section styles (all endpoints: dashboard, orders, downloads,
 * addresses, account details, Sparks wish list). Enqueued only on account
 * pages via functions.php -> apex_child_enqueue_assets().
 */

/* === layout === */

.woocommerce-MyAccount-navigation {
	width: 30%;
}

.woocommerce-MyAccount-content {
	width: 66%;
	min-height: 360px;
}

/* === navigation card === */

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-radius: 2px;
}

.woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--apex-line);
}

.woocommerce-MyAccount-navigation li:last-child {
	border-bottom: none;
}

.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.85rem 1.1rem;
	font-family: var(--apex-ff-mono), monospace;
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--apex-ink);
	text-decoration: none;
	border-left: 4px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.woocommerce-MyAccount-navigation li a:hover,
.woocommerce-MyAccount-navigation li a:focus {
	background: var(--apex-bg);
	border-left-color: var(--apex-amber);
	color: var(--apex-ink);
}

.woocommerce-MyAccount-navigation li.is-active a {
	background: var(--apex-ink);
	color: #FFFFFF;
	border-left-color: var(--apex-amber);
}

.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--apex-red);
}

.woocommerce-MyAccount-navigation li a:focus-visible {
	outline: 3px solid var(--apex-amber);
	outline-offset: -3px;
}

/* === content area === */

.woocommerce-MyAccount-content > h2,
.woocommerce-MyAccount-content h3 {
	margin-top: 0;
}

.woocommerce-MyAccount-content fieldset legend {
	font-family: var(--apex-ff-display), sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 700;
}

/* Empty states (downloads, wish list) read as a quiet notice, not a lost
   paragraph in a big white void. */
.woocommerce-MyAccount-content .woocommerce-Message,
.woocommerce-MyAccount-content > p:only-of-type {
	background: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-left: 6px solid var(--apex-amber);
	border-radius: 2px;
	padding: 1rem 1.25rem;
}

/* === orders table status === */

.woocommerce-orders-table__cell-order-status {
	font-family: var(--apex-ff-mono), monospace;
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
}

.woocommerce-orders-table__cell-order-number a {
	font-family: var(--apex-ff-mono), monospace;
	font-weight: 600;
}

/* === address cards === */

.woocommerce-Addresses .woocommerce-Address {
	background: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-radius: 2px;
	padding: 1.25rem;
}

/* Heading and its edit link share one row: heading left, link right.
   (Woo floats them by default, which drops the link to a second line.) */
.woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 2px solid var(--apex-ink);
	padding-bottom: 0.5rem;
	margin-bottom: 0.85rem;
}

.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
	font-size: 1.1rem;
	margin: 0;
	float: none;
}

.woocommerce-Address-title .edit {
	float: none;
	white-space: nowrap;
	font-family: var(--apex-ff-mono), monospace;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.woocommerce-Address address {
	font-style: normal;
	font-family: var(--apex-ff-mono), monospace;
	font-size: 0.9rem;
	line-height: 1.7;
}

/* === account forms (edit-account, edit-address) ===
   Neve styles these inputs harder than our global style.css (8px radius,
   53px height, grey fill) — force the store's 2px squared language. */

.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
	border: 2px solid var(--apex-line) !important;
	border-radius: 2px !important;
	background: var(--apex-card) !important;
	height: auto !important;
	padding: 0.65em 0.85em !important;
	font-family: var(--apex-ff-body), sans-serif;
	font-size: 1rem;
}

.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
	border-color: var(--apex-ink) !important;
	outline: 3px solid var(--apex-amber);
	outline-offset: 2px;
}

.woocommerce-MyAccount-content .form-row label {
	font-family: var(--apex-ff-body), sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.35rem;
}

.woocommerce-MyAccount-content fieldset {
	border: 2px solid var(--apex-line);
	border-radius: 2px;
	padding: 1.25rem 1.25rem 0.5rem;
	margin: 2rem 0 1.5rem;
}

.woocommerce-MyAccount-content fieldset legend {
	padding: 0 0.5rem;
	font-size: 1rem;
}

/* Woo's password-reveal eye button */
.woocommerce-MyAccount-content .show-password-input {
	top: 50%;
	transform: translateY(-50%);
	right: 0.85em;
}

.woocommerce-MyAccount-content button[type="submit"] {
	margin-top: 0.75rem;
}

/* === logged-out login / register (#customer_login is outside
   .woocommerce-MyAccount-content, so it gets its own scope) === */

.woocommerce-page #customer_login .u-column1,
.woocommerce-page #customer_login .u-column2 {
	background: var(--apex-card);
	border: 2px solid var(--apex-line);
	border-radius: 2px;
	padding: 1.5rem;
}

.woocommerce-page #customer_login h2 {
	margin-top: 0;
	font-size: 1.3rem;
}

.woocommerce-page #customer_login input[type="text"],
.woocommerce-page #customer_login input[type="email"],
.woocommerce-page #customer_login input[type="password"] {
	border: 2px solid var(--apex-line) !important;
	border-radius: 2px !important;
	background: var(--apex-card) !important;
	height: auto !important;
	padding: 0.65em 0.85em !important;
	width: 100%;
}

.woocommerce-page #customer_login input:focus {
	border-color: var(--apex-ink) !important;
	outline: 3px solid var(--apex-amber);
	outline-offset: 2px;
}

.woocommerce-page #customer_login .woocommerce-privacy-policy-text {
	font-size: 0.85rem;
	opacity: 0.8;
}

/* === mobile === */

@media (max-width: 768px) {
	.woocommerce-MyAccount-navigation,
	.woocommerce-MyAccount-content {
		width: 100%;
		float: none;
	}

	.woocommerce-MyAccount-navigation {
		margin-bottom: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce-MyAccount-navigation li a {
		transition: none;
	}
}
