/* Phoenix Circle - scoped to My Account pages only (body.woocommerce-account) */

body.woocommerce-account {
	background-color: #0c0c0c;
	--phxc-surface-1: #161616;
	--phxc-surface-2: #1c1c1c;
	--phxc-surface-hover: #232323;
	--phxc-border: rgba(255,255,255,0.08);
	--phxc-border-strong: rgba(255,255,255,0.14);
	--phxc-text-primary: #f5f3ef;
	--phxc-text-secondary: #a8a49c;
	--phxc-text-muted: #6f6b64;

	/* Brand ember (shared with trade) */
	--phxc-ember: #e2451f;
	--phxc-ember-bright: #ff5a2e;

	/* Status colours */
	--phxc-amber: #d99a3d;
	--phxc-green: #4f9e6b;
	--phxc-red: #d64545;

	/* Phoenix Circle tier palette (quiet-luxury, dark-first) */
	--phxc-tier-ember: #e2451f;
	--phxc-tier-silver: #b8bcc2;
	--phxc-tier-gold: #d4af5a;
	--phxc-tier-inferno: #ff2e5a;
}

body.woocommerce-account .phxc-mono,
body.woocommerce-account .woocommerce-MyAccount-content .phxc-mono {
	font-family: 'JetBrains Mono', monospace;
}

/* Lay the WooCommerce nav + content out as sidebar + main */
body.woocommerce-account .woocommerce {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	width: 220px;
	flex-shrink: 0;
	background: #0a0a0a;
	border: 1px solid var(--phxc-border);
	border-radius: 10px;
	padding: 12px;
}

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

body.woocommerce-account .woocommerce-MyAccount-navigation-link a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--phxc-text-secondary);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link a:hover {
	background: var(--phxc-surface-hover);
	color: var(--phxc-text-primary);
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a {
	color: #fff;
	background: radial-gradient(120% 140% at 0% 50%, rgba(226,69,31,0.35), rgba(226,69,31,0.08) 60%, transparent 100%);
	position: relative;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a::before {
	content: "";
	position: absolute;
	left: -12px;
	top: 8px;
	bottom: 8px;
	width: 3px;
	background: var(--phxc-ember-bright);
	border-radius: 0 3px 3px 0;
}

/* Icons per nav item (unicode - no icon font dependency) */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before { content: "\25CF"; font-size: 10px; }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before { content: "\1F4E6"; }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before { content: "\1F464"; }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before { content: "\1F4CD"; }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "\21AA"; }

body.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1;
	min-width: 0;
	color: var(--phxc-text-primary);
}

/* Dashboard */
.phxc-topbar { margin-bottom: 24px; }
.phxc-greeting { font-size: 22px; font-weight: 600; color: var(--phxc-text-primary); }
.phxc-greeting-sub { font-size: 13px; color: var(--phxc-text-secondary); margin-top: 4px; }

.phxc-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}
.phxc-metrics-single { grid-template-columns: minmax(0, 1fr); max-width: 320px; }

.phxc-metric-card {
	background: var(--phxc-surface-1);
	border: 1px solid var(--phxc-border);
	border-radius: 10px;
	padding: 18px 20px;
}
.phxc-metric-label {
	font-size: 12px;
	color: var(--phxc-text-secondary);
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.phxc-metric-value { font-size: 26px; font-weight: 600; color: var(--phxc-text-primary); }
.phxc-metric-foot { font-size: 12px; color: var(--phxc-text-muted); margin-top: 6px; }
.phxc-metric-foot a { color: var(--phxc-ember-bright); text-decoration: none; }

.phxc-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.phxc-badge-amber { background: rgba(217,154,61,0.15); color: var(--phxc-amber); }
.phxc-badge-green { background: rgba(79,158,107,0.15); color: var(--phxc-green); }
.phxc-badge-ember { background: rgba(226,69,31,0.15); color: var(--phxc-ember-bright); }

/* Tier badges (reserved for Phase 2, defined now so palette is settled) */
.phxc-badge-tier-ember { background: rgba(226,69,31,0.15); color: var(--phxc-tier-ember); }
.phxc-badge-tier-silver { background: rgba(184,188,194,0.15); color: var(--phxc-tier-silver); }
.phxc-badge-tier-gold { background: rgba(212,175,90,0.15); color: var(--phxc-tier-gold); }
.phxc-badge-tier-inferno { background: rgba(255,46,90,0.15); color: var(--phxc-tier-inferno); }

.phxc-section {
	background: var(--phxc-surface-1);
	border: 1px solid var(--phxc-border);
	border-radius: 10px;
	margin-bottom: 24px;
	overflow: hidden;
}
.phxc-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--phxc-border);
}
.phxc-section-title { font-size: 15px; font-weight: 600; color: var(--phxc-text-primary); }
.phxc-section-link { font-size: 13px; color: var(--phxc-ember-bright); text-decoration: none; font-weight: 500; }
.phxc-empty { padding: 24px 20px; color: var(--phxc-text-muted); font-size: 13px; }

.phxc-table { width: 100%; border-collapse: collapse; }
.phxc-table th {
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--phxc-text-muted);
	font-weight: 600;
	padding: 10px 20px;
	border-bottom: 1px solid var(--phxc-border);
}
.phxc-table td {
	padding: 14px 20px;
	font-size: 13px;
	border-bottom: 1px solid var(--phxc-border);
	color: var(--phxc-text-primary);
}
.phxc-table tr:last-child td { border-bottom: none; }
.phxc-table tr:hover { background: var(--phxc-surface-hover); }
.phxc-table a { color: var(--phxc-text-primary); }
.phxc-amount { font-weight: 600; }
.phxc-items { color: var(--phxc-text-secondary); }

.phxc-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 999px;
}
.phxc-dot { width: 6px; height: 6px; border-radius: 50%; }
.phxc-status-paid { background: rgba(79,158,107,0.12); color: var(--phxc-green); }
.phxc-status-paid .phxc-dot { background: var(--phxc-green); }
.phxc-status-processing { background: rgba(217,154,61,0.12); color: var(--phxc-amber); }
.phxc-status-processing .phxc-dot { background: var(--phxc-amber); }
.phxc-status-cancelled { background: rgba(214,69,69,0.12); color: var(--phxc-red); }
.phxc-status-cancelled .phxc-dot { background: var(--phxc-red); }

.phxc-btn-ghost {
	display: inline-block;
	font-size: 12px;
	font-weight: 500;
	color: var(--phxc-text-secondary);
	background: var(--phxc-surface-2);
	border: 1px solid var(--phxc-border);
	padding: 6px 12px;
	border-radius: 6px;
	text-decoration: none;
	margin-right: 6px;
}
.phxc-btn-ghost:hover { color: var(--phxc-text-primary); border-color: var(--phxc-border-strong); }

/* Native "My Orders" table (orders tab) - restyled without overriding the template */
body.woocommerce-account .woocommerce-orders-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--phxc-surface-1);
	border: 1px solid var(--phxc-border);
	border-radius: 10px;
	overflow: hidden;
}
body.woocommerce-account .woocommerce-orders-table th {
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--phxc-text-muted);
	font-weight: 600;
	padding: 10px 20px;
	border-bottom: 1px solid var(--phxc-border);
}
body.woocommerce-account .woocommerce-orders-table td {
	padding: 14px 20px;
	font-size: 13px;
	border-bottom: 1px solid var(--phxc-border);
	color: var(--phxc-text-primary);
}
body.woocommerce-account .woocommerce-orders-table tr:hover { background: var(--phxc-surface-hover); }
body.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a { color: var(--phxc-text-primary); font-family: 'JetBrains Mono', monospace; }
body.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-total { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
body.woocommerce-account .woocommerce-orders-table .button {
	background: var(--phxc-surface-2);
	border: 1px solid var(--phxc-border);
	color: var(--phxc-text-secondary);
	border-radius: 6px;
	font-size: 12px;
	padding: 6px 12px;
}
body.woocommerce-account .woocommerce-orders-table .button:hover { color: var(--phxc-text-primary); border-color: var(--phxc-border-strong); }

/* Generic account content (Account details, Addresses) headings and text */
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
	color: var(--phxc-text-primary);
}
body.woocommerce-account .woocommerce-MyAccount-content p,
body.woocommerce-account .woocommerce-MyAccount-content label {
	color: var(--phxc-text-secondary);
}
body.woocommerce-account .woocommerce-Address {
	background: var(--phxc-surface-1);
	border: 1px solid var(--phxc-border);
	border-radius: 10px;
	padding: 18px 20px;
}
body.woocommerce-account .woocommerce-Address-title a { color: var(--phxc-ember-bright); }

/* Restyle the default edit-account / edit-address forms to match */
body.woocommerce-account .woocommerce-MyAccount-content form input.input-text,
body.woocommerce-account .woocommerce-MyAccount-content form select,
body.woocommerce-account .woocommerce-MyAccount-content form textarea {
	background: var(--phxc-surface-1);
	border: 1px solid var(--phxc-border);
	color: var(--phxc-text-primary);
	border-radius: 6px;
	padding: 10px 12px;
}
body.woocommerce-account .woocommerce-MyAccount-content form .button {
	background: var(--phxc-ember);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-weight: 600;
}
body.woocommerce-account .woocommerce-MyAccount-content form .button:hover { background: var(--phxc-ember-bright); }

/* Responsive: stack sidebar above content on narrow screens */
@media (max-width: 768px) {
	body.woocommerce-account .woocommerce { flex-direction: column; }
	body.woocommerce-account .woocommerce-MyAccount-navigation { width: 100%; }
	.phxc-metrics { grid-template-columns: 1fr; }
	.phxc-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ------------------------------------------------------------------
   Hide the WPBakery/Impreza page-title band (the big "My account"
   heading + "Home > My account" breadcrumb) on account pages.
   It's a self-contained section that sits ABOVE the account content;
   the account content lives in a separate section, so hiding this one
   is safe. Being phased out with the WPBakery -> Elementor migration.
   The :has() rules target the band semantically; the class-based rule
   is a fallback that also collapses the whole band.
   ------------------------------------------------------------------ */
body.woocommerce-account .l-section.color_primary.parallax_fixed,
body.woocommerce-account .l-section:has(> .l-section-h .g-breadcrumbs),
body.woocommerce-account .l-section:has(> .l-section-h .post_title) {
	display: none !important;
}

/* ------------------------------------------------------------------
   Logged-out Login / Register screen  (full-background, centred card)
   Rendered by our templates/myaccount/form-login.php override:
   a full-width background image with a dark scrim, and a single centred
   card floating on top. Registration is tucked behind a "Create an
   account" link. Background image is set in Settings -> Phoenix Circle.
   ------------------------------------------------------------------ */

/* Neutralise the dashboard's sidebar flex layout on the login screen,
   so the background band can span the full content width. */
body.woocommerce-account .woocommerce:has(.phxc-login-bg) { display: block; }

body.woocommerce-account .phxc-login-bg {
	position: relative;
	padding: 56px 20px;
	background-color: #0e0d0d;
	background-size: cover;
	background-position: center;
	border-radius: 12px;
	overflow: hidden;
}
/* Dark scrim keeps the card and text readable over any image. */
body.woocommerce-account .phxc-login-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(8,8,8,0.62);
}
body.woocommerce-account .phxc-login-center {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
}
body.woocommerce-account .phxc-login-bg .phxc-login-panel {
	width: 100%;
	max-width: 380px;
	background: rgba(20,20,20,0.88);
	border: 1px solid var(--phxc-border);
	border-radius: 12px;
	padding: 30px 28px;
	box-shadow: 0 18px 48px rgba(0,0,0,0.45);
}
body.woocommerce-account .phxc-login-brand { text-align: center; margin-bottom: 18px; }
body.woocommerce-account .phxc-login-crest { line-height: 0; margin-bottom: 8px; }
body.woocommerce-account .phxc-login-wordmark {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	color: var(--phxc-text-primary);
	line-height: 1.1;
}
body.woocommerce-account .phxc-login-bg .phxc-login-panel h2 {
	font-size: 15px;
	font-weight: 600;
	color: var(--phxc-text-secondary);
	text-align: center;
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--phxc-border);
}
/* Full-width submit buttons inside the floating card */
body.woocommerce-account .phxc-login-bg .woocommerce-form-login__submit,
body.woocommerce-account .phxc-login-bg .woocommerce-form-register__submit { width: 100%; }
body.woocommerce-account .phxc-login-switch { margin: 16px 0 0; font-size: 13px; color: var(--phxc-text-muted); text-align: center; }
body.woocommerce-account .phxc-login-switch a { color: var(--phxc-tier-gold); text-decoration: none; font-weight: 500; }
body.woocommerce-account .phxc-login-switch a:hover { text-decoration: underline; }

/* Registration is hidden until the "Create an account" link targets it
   (or after a failed register submit, via .phxc-force-open). :has() hides
   the login card while register is showing so only one form is visible. */
body.woocommerce-account .phxc-register-panel { display: none; }
body.woocommerce-account .phxc-register-panel:target,
body.woocommerce-account .phxc-register-panel.phxc-force-open { display: block; }
body.woocommerce-account #customer_login:has(.phxc-register-panel:target) #phxc-login,
body.woocommerce-account #customer_login:has(.phxc-register-panel.phxc-force-open) #phxc-login { display: none; }

/* Native #customer_login fallback (if the template override is ever bypassed) */
body.woocommerce-account #customer_login h2 {
	font-size: 18px;
	font-weight: 600;
	color: var(--phxc-text-primary);
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--phxc-border);
}
body.woocommerce-account .woocommerce-form-login label,
body.woocommerce-account .woocommerce-form-register label {
	display: block;
	font-size: 13px;
	color: var(--phxc-text-secondary);
	margin-bottom: 6px;
}
body.woocommerce-account .woocommerce-form-login .woocommerce-form-row,
body.woocommerce-account .woocommerce-form-register .woocommerce-form-row,
body.woocommerce-account .woocommerce-form-login > p,
body.woocommerce-account .woocommerce-form-register > p {
	margin-bottom: 16px;
}
body.woocommerce-account #customer_login .password-input { position: relative; display: block; width: 100%; }
body.woocommerce-account #customer_login input.input-text,
body.woocommerce-account #customer_login input[type="text"],
body.woocommerce-account #customer_login input[type="email"],
body.woocommerce-account #customer_login input[type="password"] {
	width: 100%;
	background: var(--phxc-surface-2);
	border: 1px solid var(--phxc-border);
	color: var(--phxc-text-primary);
	border-radius: 6px;
	padding: 11px 12px;
	font-size: 14px;
	box-sizing: border-box;
}
body.woocommerce-account #customer_login input.input-text:focus {
	outline: none;
	border-color: var(--phxc-ember);
	box-shadow: 0 0 0 2px rgba(226,69,31,0.2);
}
body.woocommerce-account #customer_login .show-password-input {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--phxc-text-muted);
}
body.woocommerce-account #customer_login .required {
	color: var(--phxc-ember-bright);
	border: none;
	text-decoration: none;
}
body.woocommerce-account #customer_login .woocommerce-button.button,
body.woocommerce-account #customer_login button.button,
body.woocommerce-account #customer_login button[type="submit"] {
	background: var(--phxc-ember);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 11px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
body.woocommerce-account #customer_login .woocommerce-button.button:hover,
body.woocommerce-account #customer_login button.button:hover,
body.woocommerce-account #customer_login button[type="submit"]:hover {
	background: var(--phxc-ember-bright);
}
body.woocommerce-account .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--phxc-text-secondary);
	font-size: 13px;
	margin-bottom: 16px;
}
body.woocommerce-account .woocommerce-form-login__rememberme input { width: auto; margin: 0; }
body.woocommerce-account .woocommerce-LostPassword a {
	color: var(--phxc-ember-bright);
	font-size: 13px;
	text-decoration: none;
}
body.woocommerce-account .woocommerce-LostPassword a:hover { text-decoration: underline; }
body.woocommerce-account #customer_login .woocommerce-privacy-policy-text p {
	color: var(--phxc-text-muted);
	font-size: 12px;
}

/* WooCommerce notices (login errors, password-reset confirmations, etc.)
   made readable on the dark theme, wherever they appear on account pages. */
body.woocommerce-account .woocommerce-error,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-message {
	background: var(--phxc-surface-2);
	border-left: 3px solid var(--phxc-ember);
	color: var(--phxc-text-primary);
	list-style: none;
	padding: 12px 16px;
	border-radius: 6px;
	margin: 0 0 16px;
	font-size: 13px;
}
body.woocommerce-account .woocommerce-error { border-left-color: var(--phxc-red); }
body.woocommerce-account .woocommerce-message { border-left-color: var(--phxc-green); }
body.woocommerce-account .woocommerce-error a,
body.woocommerce-account .woocommerce-info a,
body.woocommerce-account .woocommerce-message a { color: var(--phxc-ember-bright); }

@media (max-width: 768px) {
	body.woocommerce-account .phxc-login-bg { padding: 32px 14px; }
	body.woocommerce-account .phxc-login-bg .phxc-login-panel { padding: 26px 22px; }
}
