/*
 * Lumini — My Account skin.
 *
 * Styles the WooCommerce-generated internals of the bespoke My Account
 * templates (woocommerce/myaccount/*) that the Tailwind utilities in the
 * markup can't reach: endpoint-navigation states, the orders / downloads /
 * payment-methods tables, order-status pills, the account forms and the
 * login / password-reset controls. Page STRUCTURE (the sidebar grid, panels,
 * cards) lives as utilities in the templates.
 *
 * Standalone module, enqueued only on is_account_page() via the stylesheet
 * manifest in inc/enqueue.php (handle lumini-woo-account), cascading after
 * the shared woo-pages.css base skin (form fields, buttons, notices), which
 * also loads on this surface. Hand-authored plain CSS (no build step),
 * relying on the design tokens main.css exposes on :root.
 *
 * Everything is scoped under `.lumini-account` — the wrapper page.php adds
 * around the account content (alongside `.lumini-woo`).
 */

/* ------------------------------------------------------ Endpoint navigation */

/*
 * Horizontal scrollable pill row on mobile, vertical rail (sticky panel) from
 * the lg breakpoint — matching the grid in myaccount/my-account.php.
 */
.lumini-account .lumini-account-nav {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.lumini-account .lumini-account-nav::-webkit-scrollbar {
	display: none;
}

@media (min-width: 1024px) {
	.lumini-account .lumini-account-nav {
		display: grid;
		gap: 2px;
		overflow: visible;
	}
}

.lumini-account .lumini-account-nav a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--color-ink-2);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s var(--ease-standard), color 0.15s var(--ease-standard);
}

.lumini-account .lumini-account-nav a svg {
	color: var(--color-ink-3);
	transition: color 0.15s var(--ease-standard);
}

.lumini-account .lumini-account-nav a:hover {
	background: var(--color-bg);
	color: var(--color-ink);
}

/* Active endpoint — white card on the grey panel, turquoise icon. */
.lumini-account .lumini-account-nav .is-active a {
	background: var(--color-bg);
	color: var(--color-ink);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.lumini-account .lumini-account-nav .is-active a svg,
.lumini-account .lumini-account-nav a:hover svg {
	color: var(--color-turquoise);
}

/* Logout sits visually apart at the bottom of the desktop rail. */
@media (min-width: 1024px) {
	.lumini-account .lumini-account-nav .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 8px;
		padding-top: 8px;
		border-top: 1px solid var(--color-line);
	}
}

/* ------------------------------------------------------------- Shop tables */

/*
 * Generic skin for every table WooCommerce prints in the content column —
 * orders (bespoke template), downloads and payment methods (stock templates).
 * Same vocabulary as the cart table: mono uppercase header row, hairline rows.
 */
.lumini-account table.shop_table {
	width: 100%;
	border-collapse: collapse;
}

.lumini-account table.shop_table thead th {
	padding: 0 14px 12px 0;
	border-bottom: 1px solid var(--color-line);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	color: var(--color-ink-3);
}

.lumini-account table.shop_table tbody td,
.lumini-account table.shop_table tbody th {
	padding: 16px 14px 16px 0;
	border-bottom: 1px solid var(--color-line);
	font-size: 14px;
	text-align: left;
	vertical-align: middle;
	color: var(--color-ink-2);
}

.lumini-account table.shop_table thead th:last-child,
.lumini-account table.shop_table tbody td:last-child {
	padding-right: 0;
	text-align: right;
}

.lumini-account table.shop_table .woocommerce-Price-amount {
	font-family: var(--font-mono);
	font-weight: 600;
	color: var(--color-ink);
}

/* Order number — mono link, like the SKU/price accents elsewhere. */
.lumini-account .woocommerce-orders-table__cell-order-number a {
	font-family: var(--font-mono);
	font-weight: 600;
	color: var(--color-ink);
	text-decoration: none;
	transition: color 0.15s var(--ease-standard);
}

.lumini-account .woocommerce-orders-table__cell-order-number a:hover {
	color: var(--color-turquoise);
}

/* Compact row actions — the 48px .button from woo-pages is too tall here. */
.lumini-account table.shop_table .button {
	height: 36px;
	padding: 0 14px;
	font-size: 13px;
}

.lumini-account table.shop_table .button + .button {
	margin-left: 6px;
}

/* --------------------------------------------------- Stacked tables <768px */

/*
 * Rows re-flow into label/value pairs driven by the data-title attributes
 * (the stock shop_table_responsive contract; WooCommerce's own smallscreen
 * sheet that used to do this is dequeued).
 */
@media (max-width: 767px) {
	.lumini-account table.shop_table_responsive,
	.lumini-account table.shop_table_responsive tbody,
	.lumini-account table.shop_table_responsive tr,
	.lumini-account table.shop_table_responsive td {
		display: block;
		width: 100%;
	}

	.lumini-account table.shop_table_responsive thead {
		display: none;
	}

	.lumini-account table.shop_table_responsive tr {
		padding: 6px 0;
		border-bottom: 1px solid var(--color-line);
	}

	.lumini-account table.shop_table_responsive td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 8px 0;
		border: 0;
		text-align: right;
	}

	.lumini-account table.shop_table_responsive td::before {
		content: attr(data-title);
		flex-shrink: 0;
		font-family: var(--font-mono);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		text-align: left;
		color: var(--color-ink-3);
	}
}

/* ------------------------------------------------------ Order status pills */

.lumini-account .lumini-order-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 11px;
	border: 1px solid var(--color-line-2);
	border-radius: 999px;
	background: var(--color-bg-2);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	color: var(--color-ink-2);
}

.lumini-account .lumini-order-status::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
	opacity: 0.7;
}

.lumini-account .lumini-order-status--completed {
	background: var(--color-turquoise-soft);
	border-color: var(--color-turquoise);
	color: var(--color-turquoise-hot);
}

.lumini-account .lumini-order-status--processing {
	background: var(--color-amber-soft);
	border-color: var(--color-amber);
	color: #8a6400; /* darkened amber for contrast on the soft tint — one-off, like the reds below */
}

/* No danger token exists yet — same one-off reds as the notices in
 * woo-pages.css. Promote to @theme tokens if a third surface needs them. */
.lumini-account .lumini-order-status--cancelled,
.lumini-account .lumini-order-status--failed {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

/* pending / on-hold / refunded / plugin statuses keep the neutral base. */

/* ----------------------------------------------------------- Account forms */

/*
 * Edit account + edit address. Field skins (input-text, labels, .form-row)
 * come from woo-pages.css; here: the column width, the two-column row grid
 * and the password fieldset.
 */
.lumini-account .woocommerce-EditAccountForm,
.lumini-account .woocommerce-MyAccount-content > form {
	max-width: 680px;
}

@media (min-width: 640px) {
	.lumini-account .woocommerce-EditAccountForm,
	.lumini-account .woocommerce-address-fields__field-wrapper {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
	}

	.lumini-account .woocommerce-EditAccountForm > .form-row-wide,
	.lumini-account .woocommerce-EditAccountForm > fieldset,
	.lumini-account .woocommerce-EditAccountForm > p:not(.form-row),
	.lumini-account .woocommerce-address-fields__field-wrapper .form-row-wide,
	.lumini-account .woocommerce-address-fields__field-wrapper .notes {
		grid-column: 1 / -1;
	}
}

.lumini-account .woocommerce-EditAccountForm .clear {
	display: none;
}

/* Edit-address heading printed by the stock form template. */
.lumini-account .woocommerce-MyAccount-content > form > h3 {
	grid-column: 1 / -1;
	margin: 0 0 18px;
	font-size: 24px;
	font-weight: 600;
	color: var(--color-ink);
}

/* Password-change fieldset on the edit-account form. */
.lumini-account .woocommerce-EditAccountForm fieldset {
	margin: 10px 0 16px;
	padding: 18px;
	border: 1px dashed var(--color-line-2);
	border-radius: 12px;
}

.lumini-account .woocommerce-EditAccountForm legend {
	padding: 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--color-ink);
}

/* Inline helper copy ("Așa va apărea numele tău…") under the fields. */
.lumini-account .woocommerce-EditAccountForm .form-row span em {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	font-style: normal;
	color: var(--color-ink-3);
}

/* --------------------------------------------------------- Primary submits */

/*
 * Save / login / register / reset — the surface's primary CTAs get the amber
 * treatment (same as #place_order in woo-pages.css), outranking the bordered
 * .button skin they also carry.
 */
.lumini-account button[name="save_account_details"],
.lumini-account button[name="save_address"],
.lumini-account .woocommerce-form-login__submit,
.lumini-account .woocommerce-form-register__submit,
.lumini-account .woocommerce-ResetPassword button[type="submit"] {
	height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: 6px;
	background: var(--color-amber);
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	transition: background-color 0.2s var(--ease-standard);
}

.lumini-account button[name="save_account_details"]:hover,
.lumini-account button[name="save_address"]:hover,
.lumini-account .woocommerce-form-login__submit:hover,
.lumini-account .woocommerce-form-register__submit:hover,
.lumini-account .woocommerce-ResetPassword button[type="submit"]:hover {
	background: #2b2b2b;
	color: #ffffff;
}

.lumini-account .woocommerce-form-login__submit,
.lumini-account .woocommerce-form-register__submit {
	width: 100%;
}

/* ---------------------------------------------------------- Login extras */

.lumini-account .lost_password a {
	color: var(--color-turquoise);
	font-weight: 600;
}

/*
 * Show/hide-password toggle — woocommerce.js wraps password inputs in
 * .password-input and appends the .show-password-input span; its eye icon
 * lived in the dequeued woocommerce-general sheet, so it is redrawn here as
 * a mask so it inherits color.
 */
.lumini-account .password-input {
	position: relative;
	display: block;
}

.lumini-account .show-password-input {
	position: absolute;
	top: 50%;
	right: 14px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	cursor: pointer;
	background: var(--color-ink-3);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 20 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 20 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

.lumini-account .show-password-input.display-password {
	background: var(--color-turquoise);
}

/* Password strength meter (wp-includes zxcvbn output, markup from WC). */
.lumini-account .woocommerce-password-strength {
	margin-top: 8px;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 600;
	background: var(--color-bg-2);
	color: var(--color-ink-2);
}

.lumini-account .woocommerce-password-strength.short,
.lumini-account .woocommerce-password-strength.bad {
	background: #fef2f2;
	color: #b91c1c;
}

.lumini-account .woocommerce-password-strength.good {
	background: var(--color-amber-soft);
	color: #8a6400;
}

.lumini-account .woocommerce-password-strength.strong {
	background: var(--color-turquoise-soft);
	color: var(--color-turquoise-hot);
}

.lumini-account .woocommerce-password-hint {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--color-ink-3);
}

/* --------------------------------------------------- Lost / reset password */

.lumini-account .woocommerce-ResetPassword {
	max-width: 480px;
	padding: 24px;
	border: 1px solid var(--color-line);
	border-radius: 16px;
	background: var(--color-bg);
}

.lumini-account .woocommerce-ResetPassword > p:first-child {
	margin: 0 0 16px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--color-ink-2);
}

/* The stock template's form-row-first float layout is gone with the WC CSS. */
.lumini-account .woocommerce-ResetPassword .form-row-first,
.lumini-account .woocommerce-ResetPassword .form-row-last {
	float: none;
	width: 100%;
}

.lumini-account .woocommerce-ResetPassword button[type="submit"] {
	width: 100%;
}
