/**
 * Rebs Curtis-Moss — /my-account branding layer.
 *
 * Loaded by the `rebs-site-styles` mu-plugin AFTER the main stylesheet, gated
 * by `is_account_page()` so it only ships on /my-account/* surfaces. The main
 * stylesheet already covers:
 *
 *   - Brand tokens (`--rebs-*`)
 *   - Generic WC buttons, `.alt`, login/register submit
 *   - Form controls (inputs/textarea/select + :focus ring)
 *   - WC form links (`.woocommerce-LostPassword a`, `.woocommerce-form-login a`, etc.)
 *   - Native MyAccount navigation link colors + `.is-active`
 *
 * This file ADDS the layout + page-specific surfaces that the main stylesheet
 * doesn't paint: dashboard greeting, order tables, address grid, downloads,
 * notices contextual to account, edit-account, mobile-first column flow.
 *
 * Specificity strategy: scope under `#kubio` (the id lives on `<html>`, so it
 * is a real ancestor of `.woocommerce-account` on `<body>`) to outrank both
 * Kubio Pro's WC stylesheet (`body.woocommerce-page nav.woocommerce-MyAccount-
 * navigation li` = (0,2,3)) and the plain link rule used by Kubio Core.
 * NOTE: `[data-kubio]` is a DESCENDANT marker put on individual blocks (header,
 * navigation, etc.) — it is NOT an ancestor of `<body>`, so selectors of the
 * form `[data-kubio] .woocommerce-account ...` never match. We use `#kubio`
 * (id on `<html>`) for the outranking ancestor; we also chain `body.woocommerce-
 * account` where outranking the (0,2,3) Kubio nav rule is required without
 * relying on load-order alone. Avoid `!important` unless the WC Blocks /
 * generated-class injection can't be outranked.
 *
 * Accessibility:
 *   - `--rebs-teal-dark` (#006d82, 5.34:1 vs white) for body-text links.
 *   - `--rebs-teal` (#0097b2, AA Large only) reserved for large/bold text.
 *   - Focus rings preserved on nav, table action links, form submits.
 *   - Touch targets ≥44px on mobile via padding rhythm 12px-15px vertical.
 *
 * Mobile first:
 *   - Default: nav stacks above content (single column).
 *   - ≥768px: WC's default `--global--maximum-width` flexbox flow takes over,
 *     but we explicitly assert the two-column intent to defend against theme
 *     resets.
 */

/* -------------------------------------------------------------------------
 * Layout — sidebar nav above content on mobile, side-by-side on tablet+
 *
 * WooCommerce default markup on /my-account is:
 *   <div class="woocommerce">
 *     <nav class="woocommerce-MyAccount-navigation"><ul>…</ul></nav>
 *     <div class="woocommerce-MyAccount-content">…</div>
 *   </div>
 *
 * Kubio + Consus theme sometimes wrap this in a flex container with a fixed
 * sidebar width (220px-300px). Our intent: at <768px stack vertically so the
 * sidebar reads as a quick-jump menu (each link a 44px tap target), at ≥768px
 * keep the conventional side-by-side flow with a generous 2rem gap and a
 * subtle border separator between nav and content.
 * ------------------------------------------------------------------------- */

.woocommerce-account .woocommerce {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce {
		flex-direction: row;
		align-items: flex-start;
		gap: 2rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		flex: 0 0 240px;
		max-width: 240px;
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		flex: 1 1 auto;
		min-width: 0; /* defend against flex children overflow on long URLs */
	}
}

/* -------------------------------------------------------------------------
 * SCRUM-165 — Pre-login override: force column flow on /my-account/
 *
 * The flex row layout above is designed for the logged-in case (nav + content
 * side-by-side). Logged out, WC core renders three sibling children inside
 * `<div class="woocommerce">` — `<h2>Login</h2>`, `<div class="woocommerce-
 * notices-wrapper">` (where login errors land), and `<form class="login">`.
 * The general rule pushes them horizontally: H2 left, error notice middle,
 * form right. Cani reported on 2026-05-15 with DevTools open.
 *
 * Discriminator: `body:not(.logged-in)`. WordPress core guarantees `.logged-
 * in` on `<body>` whenever a user session is active (`body_class()` core
 * behaviour, stable contract). Pre-login bodies never have it, so this
 * selector matches exactly the case we need to override — no PHP, no new
 * class, no fragile `:has()` workaround.
 *
 * Specificity: (0,3,2) — `body:not(.logged-in).woocommerce-account` is two
 * classes on the same element + the negation pseudo-class, plus the
 * descendant `.woocommerce`. Beats the (0,2,1) general rule. No !important.
 * ------------------------------------------------------------------------- */

@media (min-width: 768px) {
	body:not(.logged-in).woocommerce-account .woocommerce {
		flex-direction: column;
		align-items: stretch;
		gap: 1.5rem;
	}
}

/* -------------------------------------------------------------------------
 * MyAccount navigation — visual treatment
 *
 * Main stylesheet already sets link color + hover. We add the surface: a
 * card-like panel with brand border, padding, and an `is-active` lozenge so
 * the user always knows which tab they're on. Mulish on labels matches the
 * `/services` badge convention used across the site for navigational chips.
 * ------------------------------------------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-navigation {
	background-color: var(--rebs-surface);
	border: 1px solid var(--rebs-border);
	padding: 0.5rem 0;
}

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

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li + li {
	border-top: 1px solid var(--rebs-border);
}

/* Link surface: full-width tap target (≥44px tall), Mulish for menu rhythm
   matching other site chips. Color/hover come from the main stylesheet
   (.woocommerce-account .woocommerce-MyAccount-navigation a) — we add the
   geometry only, so the cascade stays coherent. */
.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 14px 18px;
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 0.95rem;
	line-height: 1.3;
	transition:
		background-color var(--rebs-transition),
		color var(--rebs-transition);
}

@media (hover: hover) {
	.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
		background-color: var(--rebs-mint-soft);
		/* color override stays in main stylesheet — teal-dark on hover */
	}
}

/* Active tab — teal background + white text, the strongest visual anchor.
   We outrank Kubio's `[data-kubio] a:not([class*=wp-block-button])` rule by
   scoping to the parent `li.is-active` (specificity 0,3,1 vs 0,2,1). */
#kubio .woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background-color: var(--rebs-teal-dark); /* AA Normal vs white (5.34:1) */
	color: var(--rebs-surface);
	font-weight: 700;
}

@media (hover: hover) {
	#kubio .woocommerce-account .woocommerce-MyAccount-navigation li.is-active a:hover {
		background-color: var(--rebs-teal-darker); /* darker = AAA, still teal family */
		color: var(--rebs-surface);
	}
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:focus-visible {
	outline: 2px solid var(--rebs-teal-dark);
	outline-offset: -2px; /* inset so it doesn't break the panel border */
}

/* -------------------------------------------------------------------------
 * Content panel — surface treatment
 *
 * The right-hand panel hosts dashboard, orders, downloads, addresses, edit
 * account, and form-based views (login, lost-password, etc.). We give it a
 * shared surface so every view inherits the same spacing/border rhythm,
 * regardless of which template is rendering.
 * ------------------------------------------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-content {
	background-color: var(--rebs-surface);
	border: 1px solid var(--rebs-border);
	padding: 1.5rem;
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce-MyAccount-content {
		padding: 2rem;
	}
}

/* Dashboard greeting + intro paragraphs — `p` inside content shouldn't carry
   theme-level margins that look cramped. */
.woocommerce-account .woocommerce-MyAccount-content > p {
	margin: 0 0 1rem;
	line-height: 1.55;
	color: var(--rebs-text);
}

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

/* Dashboard "Hello {name}" — the bold username gets the brand color. The
   main `<strong>` lives inline so we target it specifically rather than
   bolding the whole paragraph. */
.woocommerce-account .woocommerce-MyAccount-content > p strong {
	color: var(--rebs-teal-dark);
}

/* -------------------------------------------------------------------------
 * Tables — orders, downloads, order-details
 *
 * Markup:
 *   - .woocommerce-orders-table (My Orders)
 *   - .woocommerce-table--order-downloads (Downloads)
 *   - .woocommerce-table--order-details (View Order)
 *   - .shop_table (generic WC class used as a fallback)
 *
 * Pattern: teal-soft header, hairline borders, hover row tint, action links
 * already styled by the main stylesheet (`table.woocommerce-MyAccount-orders a`).
 * `border-collapse: collapse` is what the main WC stylesheet uses; we just
 * paint over it without resetting.
 * ------------------------------------------------------------------------- */

.woocommerce-account table.woocommerce-orders-table,
.woocommerce-account table.woocommerce-MyAccount-orders,
.woocommerce-account table.woocommerce-table--order-downloads,
.woocommerce-account table.woocommerce-table--order-details,
.woocommerce-account table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--rebs-border);
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

.woocommerce-account table.woocommerce-orders-table thead th,
.woocommerce-account table.woocommerce-MyAccount-orders thead th,
.woocommerce-account table.woocommerce-table--order-downloads thead th,
.woocommerce-account table.woocommerce-table--order-details thead th,
.woocommerce-account table.shop_table thead th {
	background-color: var(--rebs-mint-soft);
	color: var(--rebs-teal-dark);
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-align: left;
	padding: 12px 16px;
	border-bottom: 2px solid var(--rebs-teal);
}

.woocommerce-account table.woocommerce-orders-table tbody td,
.woocommerce-account table.woocommerce-MyAccount-orders tbody td,
.woocommerce-account table.woocommerce-table--order-downloads tbody td,
.woocommerce-account table.woocommerce-table--order-details tbody td,
.woocommerce-account table.shop_table tbody td,
.woocommerce-account table.woocommerce-orders-table tfoot td,
.woocommerce-account table.woocommerce-orders-table tfoot th,
.woocommerce-account table.woocommerce-table--order-details tfoot td,
.woocommerce-account table.woocommerce-table--order-details tfoot th,
.woocommerce-account table.shop_table tfoot td,
.woocommerce-account table.shop_table tfoot th {
	padding: 12px 16px;
	border-bottom: 1px solid var(--rebs-border);
	color: var(--rebs-text);
	vertical-align: middle;
}

.woocommerce-account table.woocommerce-orders-table tbody tr:last-child td,
.woocommerce-account table.woocommerce-MyAccount-orders tbody tr:last-child td,
.woocommerce-account table.woocommerce-table--order-downloads tbody tr:last-child td,
.woocommerce-account table.woocommerce-table--order-details tbody tr:last-child td,
.woocommerce-account table.shop_table tbody tr:last-child td {
	border-bottom: 0;
}

@media (hover: hover) {
	.woocommerce-account table.woocommerce-orders-table tbody tr:hover td,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody tr:hover td,
	.woocommerce-account table.woocommerce-table--order-downloads tbody tr:hover td,
	.woocommerce-account table.shop_table tbody tr:hover td {
		background-color: var(--rebs-surface-alt);
	}
}

/* Order status badge (Processing / Completed / On hold / etc.). WC sometimes
   uses `<mark class="order-status">…</mark>`; we paint it as an inline chip
   so it reads as a status rather than a highlight. */
.woocommerce-account mark.order-status,
.woocommerce-account .order-status {
	display: inline-block;
	padding: 4px 10px;
	background-color: var(--rebs-mint-soft);
	color: var(--rebs-teal-dark); /* AA Normal vs mint-soft */
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.3;
}

/* Order total amount in tables — bold teal-dark for emphasis. */
.woocommerce-account table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-total .amount,
.woocommerce-account table.woocommerce-table--order-details tfoot .amount {
	color: var(--rebs-teal-dark);
	font-weight: 700;
}

/* Action column buttons — WC renders `<a class="woocommerce-button button view">`
   y el plugin PDF Invoices agrega su propio botón "Invoice" (clase distinta).
   Unificamos AMBOS: mismo color mint brand, mismo tamaño, y margen entre ellos
   (sin esto el "View" y el "Invoice" quedan pegados y de distinto tamaño/color). */
#kubio .woocommerce-account table.woocommerce-orders-table a.woocommerce-button,
#kubio .woocommerce-account table.woocommerce-MyAccount-orders a.woocommerce-button,
#kubio .woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a,
#kubio .woocommerce-account table.woocommerce-MyAccount-orders td.woocommerce-orders-table__cell-order-actions a,
#kubio .woocommerce-account table.woocommerce-orders-table td[data-title="Actions"] a,
#kubio .woocommerce-account table.woocommerce-MyAccount-orders td[data-title="Actions"] a {
	padding: 10px 20px !important; /* mismo padding en ambos → mismo tamaño */
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	background-color: var(--rebs-mint, #0cdfc6) !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: #ffffff !important;
	margin: 4px 10px 4px 0 !important; /* más separación entre View / Invoice */
	display: inline-block;
	vertical-align: middle;
	text-align: center;
}
#kubio .woocommerce-account table.woocommerce-orders-table td[data-title="Actions"] a:hover,
#kubio .woocommerce-account table.woocommerce-MyAccount-orders td[data-title="Actions"] a:hover,
#kubio .woocommerce-account table.woocommerce-orders-table a.woocommerce-button:hover,
#kubio .woocommerce-account table.woocommerce-MyAccount-orders a.woocommerce-button:hover {
	background-color: var(--rebs-teal, #0097b2) !important;
	border-color: var(--rebs-teal, #0097b2) !important;
}

/* -------------------------------------------------------------------------
 * Mobile table reflow — collapse columns into stacked cards on <600px
 *
 * WC's default mobile CSS turns each row into a vertical card with
 * `data-title` labels. We rebuild that visual treatment with Rebs styling
 * so the orders table stays readable at 375×812 (iPhone SE+).
 * ------------------------------------------------------------------------- */

@media (max-width: 599px) {
	.woocommerce-account table.woocommerce-orders-table,
	.woocommerce-account table.woocommerce-MyAccount-orders {
		border: 0;
	}

	.woocommerce-account table.woocommerce-orders-table thead,
	.woocommerce-account table.woocommerce-MyAccount-orders thead {
		/* Visually hidden but accessible to screen readers. */
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.woocommerce-account table.woocommerce-orders-table tbody tr,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody tr {
		display: block;
		margin: 0 0 1rem;
		border: 1px solid var(--rebs-border);
		background-color: var(--rebs-surface);
	}

	.woocommerce-account table.woocommerce-orders-table tbody tr:last-child,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody tr:last-child {
		margin-bottom: 0;
	}

	.woocommerce-account table.woocommerce-orders-table tbody td,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
		padding: 10px 14px;
		border-bottom: 1px solid var(--rebs-border);
	}

	.woocommerce-account table.woocommerce-orders-table tbody td:last-child,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody td:last-child {
		border-bottom: 0;
	}

	/* `data-title` attribute label as inline header per cell — WC sets these
	   on every <td> in My Orders so screen readers + mobile both benefit. */
	.woocommerce-account table.woocommerce-orders-table tbody td::before,
	.woocommerce-account table.woocommerce-MyAccount-orders tbody td::before {
		content: attr(data-title);
		font-family: 'Mulish', Helvetica, Arial, sans-serif;
		font-weight: 700;
		font-size: 0.8rem;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--rebs-teal-dark);
		flex: 0 0 auto;
	}
}

/* -------------------------------------------------------------------------
 * SCRUM-136 — Mobile table reflow for `.woocommerce-table--order-details`
 *
 * Rendered at `/my-account/view-order/{id}/`. Default WC markup:
 *
 *   <table class="woocommerce-table woocommerce-table--order-details ...">
 *     <thead><tr><th>Product</th><th>Total</th></tr></thead>
 *     <tbody>
 *       <tr class="order_item">
 *         <td class="product-name">...</td>
 *         <td class="product-total">...</td>
 *       </tr>
 *     </tbody>
 *     <tfoot>
 *       <tr><th>Subtotal</th><td>£X</td></tr>
 *       <tr><th>Total</th><td>£Y</td></tr>
 *       <!-- optional: actions row, customer note row -->
 *     </tfoot>
 *   </table>
 *
 * Two differences vs `.woocommerce-orders-table` reflow above:
 *   1. The table has a meaningful `<tfoot>` (subtotal/total/actions/note rows).
 *      We CAN'T hide `<thead>` and pretend it's a card list — we want the foot
 *      structure to remain readable as a totals stack.
 *   2. The reflow goal here is "stack each row into a card with inline labels"
 *      so cells stop side-scrolling. The `<tfoot>` `<th>` (e.g. "Subtotal")
 *      sits next to its `<td>` (e.g. "£X") — on narrow screens we want them to
 *      sit on the same row but read as a key/value pair.
 *
 * `data-title` is injected by the templates overridden in
 * `mu-plugins/rebs-myaccount-fixes/templates/order/order-details*.php` so the
 * `::before { content: attr(data-title) }` here has a real value.
 *
 * Purchase-note row keeps `colspan="2"` and stays a full-width banner — no
 * `::before` label since it's an informational paragraph, not a key/value pair.
 * Stays `!important`-free.
 * ------------------------------------------------------------------------- */

@media (max-width: 599px) {
	.woocommerce-account table.woocommerce-table--order-details {
		border: 0;
		display: block;
	}

	/* `<thead>` visually hidden but accessible to screen readers — parallels
	   the orders-table treatment above. The data-title labels on each <td>
	   serve as the visual key. */
	.woocommerce-account table.woocommerce-table--order-details thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.woocommerce-account table.woocommerce-table--order-details tbody,
	.woocommerce-account table.woocommerce-table--order-details tfoot {
		display: block;
	}

	.woocommerce-account table.woocommerce-table--order-details tbody tr,
	.woocommerce-account table.woocommerce-table--order-details tfoot tr {
		display: block;
		margin: 0 0 1rem;
		border: 1px solid var(--rebs-border);
		background-color: var(--rebs-surface);
	}

	.woocommerce-account table.woocommerce-table--order-details tbody tr:last-child,
	.woocommerce-account table.woocommerce-table--order-details tfoot tr:last-child {
		margin-bottom: 0;
	}

	/* `<tbody>` line-item cells — flex row, label on the left via ::before,
	   value on the right. Matches the My Orders reflow pattern. */
	.woocommerce-account table.woocommerce-table--order-details tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
		padding: 10px 14px;
		border-bottom: 1px solid var(--rebs-border);
	}

	.woocommerce-account table.woocommerce-table--order-details tbody td:last-child {
		border-bottom: 0;
	}

	/* `<tfoot>` totals rows — `<th>` is the label, `<td>` is the value.
	   Render them inline as a key/value pair (no `::before` here because the
	   `<th>` already carries the label). */
	.woocommerce-account table.woocommerce-table--order-details tfoot tr {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
		padding: 10px 14px;
		flex-wrap: wrap;
	}

	.woocommerce-account table.woocommerce-table--order-details tfoot th,
	.woocommerce-account table.woocommerce-table--order-details tfoot td {
		padding: 0;
		border: 0;
		background: transparent;
		text-align: left;
		flex: 0 1 auto;
	}

	.woocommerce-account table.woocommerce-table--order-details tfoot th {
		font-family: 'Mulish', Helvetica, Arial, sans-serif;
		font-weight: 700;
		font-size: 0.8rem;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--rebs-teal-dark);
	}

	/* `data-title` label rendered before each `<tbody>` cell value.
	   Templates emit `data-title="Product"` / `data-title="Total"` on every
	   line-item `<td>`. */
	.woocommerce-account table.woocommerce-table--order-details tbody td::before {
		content: attr(data-title);
		font-family: 'Mulish', Helvetica, Arial, sans-serif;
		font-weight: 700;
		font-size: 0.8rem;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--rebs-teal-dark);
		flex: 0 0 auto;
	}

	/* Purchase-note row: full-width informational paragraph. The template
	   keeps `<td colspan="2">` on this row and does NOT emit `data-title`. */
	.woocommerce-account table.woocommerce-table--order-details tbody tr.woocommerce-table__product-purchase-note td {
		display: block;
		padding: 12px 14px;
	}

	.woocommerce-account table.woocommerce-table--order-details tbody tr.woocommerce-table__product-purchase-note td::before {
		content: none;
	}

	/* Actions row inside `<tfoot>` — buttons stack/wrap rather than crush. */
	.woocommerce-account table.woocommerce-table--order-details tfoot tr td .woocommerce-button {
		margin: 4px 8px 4px 0;
	}
}

/* -------------------------------------------------------------------------
 * Addresses grid — Billing / Shipping side-by-side on tablet+
 *
 * Markup:
 *   <div class="woocommerce-Addresses col2-set addresses">
 *     <div class="woocommerce-Address col-1">…</div>
 *     <div class="woocommerce-Address col-2">…</div>
 *   </div>
 * ------------------------------------------------------------------------- */

/* SCRUM-164 consolidated this declaration into the hardened #kubio
   block below (search "SCRUM-164" — single source of truth). The grid
   there uses `auto-fit minmax(280px, 1fr)` so it flows responsively
   (1→2→3 cols), and the legacy WC clearfix pseudos are neutralised at
   the same scope. */

.woocommerce-account .woocommerce-Address {
	background-color: var(--rebs-surface-alt);
	border: 1px solid var(--rebs-border);
	padding: 1.25rem 1.5rem;
}

.woocommerce-account .woocommerce-Address-title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rebs-border);
}

/* SCRUM-176: neutralize WC clearfix pseudos on the title header.
   Same pattern as SCRUM-164 for .woocommerce-Addresses — WC core ships
   ::before/::after as legacy clearfix table-cells. They occupy 0px inside
   a flex container so they don't break layout, but they show as ghost
   children in DevTools and clutter the inspector. Killed at origin. */
.woocommerce-account .woocommerce-Address-title::before,
.woocommerce-account .woocommerce-Address-title::after {
	content: none;
	display: none;
}

.woocommerce-account .woocommerce-Address-title h3,
.woocommerce-account .woocommerce-Address-title h2 {
	margin: 0;
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 1.1rem;
	font-weight: 500;
}

/* SCRUM-167 (A.NH-1): the old `.woocommerce-Address-title a` block that
   lived here (SCRUM-132 v1: uppercase + underline + 0.85rem) was inert —
   the SCRUM-162 v3 hardening block at the bottom of this file (search
   "SCRUM-162 — /my-account/edit-address/ cards fix") has identical
   specificity (1,3,1) and wins by load order. Consolidated: single source
   of truth lives in that block. */

.woocommerce-account .woocommerce-Address address {
	margin: 0;
	color: var(--rebs-text);
	line-height: 1.6;
	font-style: normal;
}

/* -------------------------------------------------------------------------
 * Forms — login, register, lost-password, edit-account, edit-address
 *
 * Inputs themselves are already painted by the main stylesheet's WC form
 * controls block. We add layout: form-row spacing, label rhythm, fieldset
 * grouping, and the "required" indicator.
 * ------------------------------------------------------------------------- */

.woocommerce-account form.woocommerce-form,
.woocommerce-account form.woocommerce-EditAccountForm,
.woocommerce-account form.woocommerce-form-login,
.woocommerce-account form.woocommerce-form-register,
.woocommerce-account form.woocommerce-form-lost-password,
.woocommerce-account form.woocommerce-address-fields {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.woocommerce-account .woocommerce-form-row,
.woocommerce-account p.form-row {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

@media (min-width: 768px) {
	/* WC uses .form-row-first / .form-row-last for two-up rows
	   (e.g. first/last name in edit-account). */
	.woocommerce-account .woocommerce-form-row--first,
	.woocommerce-account .form-row-first,
	.woocommerce-account .woocommerce-form-row--last,
	.woocommerce-account .form-row-last {
		flex: 1 1 0;
		min-width: 0;
	}

	/* Pair `--first` and `--last` in a grid by wrapping them implicitly.
	   We can't restructure markup, so we tell the form to use flex-wrap
	   and let consecutive `--first`/`--last` siblings flow side-by-side. */
	.woocommerce-account form.woocommerce-form,
	.woocommerce-account form.woocommerce-EditAccountForm,
	.woocommerce-account form.woocommerce-address-fields {
		flex-flow: row wrap;
	}

	.woocommerce-account .woocommerce-form-row--wide,
	.woocommerce-account .form-row-wide {
		flex: 1 1 100%;
		min-width: 0;
	}
}

.woocommerce-account .woocommerce-form-row label,
.woocommerce-account p.form-row label {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--rebs-teal-dark);
	margin: 0;
}

.woocommerce-account .woocommerce-form-row .required,
.woocommerce-account p.form-row .required {
	color: var(--rebs-teal); /* visible required asterisk; not standalone semantic */
	text-decoration: none;
	margin-left: 0.15rem;
}

.woocommerce-account .woocommerce-form-row .optional,
.woocommerce-account p.form-row .optional {
	color: var(--rebs-text-muted);
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	margin-left: 0.25rem;
}

/* Inline form-row help text (description below an input). */
.woocommerce-account .woocommerce-form-row em,
.woocommerce-account p.form-row em,
.woocommerce-account .woocommerce-form-row small,
.woocommerce-account p.form-row small {
	color: var(--rebs-text-muted);
	font-size: 0.85rem;
	font-style: normal;
	line-height: 1.5;
}

/* "Remember me" checkbox row on the login form + similar inline-label rows. */
.woocommerce-account .woocommerce-form-login__rememberme,
.woocommerce-account .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--rebs-text);
	cursor: pointer;
}

.woocommerce-account .woocommerce-form-login__rememberme input[type="checkbox"],
.woocommerce-account .woocommerce-form__input-checkbox {
	width: 18px;
	height: 18px;
	accent-color: var(--rebs-teal-dark); /* native checkbox brand color */
	margin: 0;
}

/* Fieldsets used by edit-account for "Password change" section. */
.woocommerce-account fieldset {
	border: 1px solid var(--rebs-border);
	padding: 1.25rem 1.5rem;
	margin: 0.5rem 0;
	background-color: var(--rebs-surface-alt);
}

.woocommerce-account fieldset legend {
	padding: 0 0.5rem;
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--rebs-teal-dark);
}

/* Form action row — submit button + secondary actions. */
.woocommerce-account .woocommerce-form-row .button,
.woocommerce-account p.form-row .button,
.woocommerce-account form .woocommerce-form-login__submit,
.woocommerce-account form .woocommerce-form-register__submit,
.woocommerce-account form .woocommerce-Button {
	align-self: flex-start; /* don't stretch to 100% — keep CTA-sized */
}

/* My-account logged-out: show ONLY the login form.
 *
 * UX rationale: WC ships login + register side-by-side when
 * registration is enabled, but on Rebs registration happens at
 * checkout (forced via WC settings). Showing both forms here is
 * redundant and noisy. Login alone + the existing "Lost your
 * password?" link covers all UX paths.
 *
 * Implementation:
 *  1. Hide the register column entirely (`.u-column2.col-2`).
 *  2. Neutralize WC's `.col2-set::before / ::after` clearfix pseudos
 *     — they ship `content: ""; display: table` which steal grid/flow
 *     cells and push real content into wrong positions (memory:
 *     `reference_wc_clearfix_pseudos.md`).
 *  3. Reset float on the remaining login column and let it sit
 *     full-width in the available space, capped to a comfortable
 *     reading width.
 *
 * Specificity note: `.woocommerce` prefix needed to match WC core's
 * `.woocommerce .col2-set .col-1` selector (0,3,0) by source order. */
#customer_login.u-columns.col2-set::before,
#customer_login.u-columns.col2-set::after {
	content: none;
	display: none;
}

#customer_login .u-column2.col-2 {
	display: none;
}

.woocommerce #customer_login .u-column1.col-1,
.woocommerce-page #customer_login .u-column1.col-1 {
	width: 100%;
	max-width: 480px;
	float: none;
	margin: 0 auto;
}

/* -------------------------------------------------------------------------
 * Notices — .woocommerce-message / .woocommerce-info / .woocommerce-error
 *
 * WC ships these as banner-style with a yellow/blue/red bar. We rebrand:
 * success uses mint-soft + teal accent, info uses surface-alt + muted text,
 * error keeps the warm-red used on `.out-of-stock` for consistency.
 *
 * Markup: `<ul class="woocommerce-message" role="alert"><li>…</li></ul>` or
 * `<div class="woocommerce-info">…</div>` depending on context.
 * ------------------------------------------------------------------------- */

.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error,
.woocommerce-account .woocommerce-notice {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: 0;
	border: 1px solid transparent;
	border-left-width: 4px;
	font-size: 0.95rem;
	line-height: 1.55;
	list-style: none;
}

.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-notice--success {
	background-color: var(--rebs-mint-soft);
	border-color: var(--rebs-mint);
	border-left-color: var(--rebs-teal);
	color: var(--rebs-text);
}

.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-notice--info {
	background-color: var(--rebs-surface-alt);
	border-color: var(--rebs-border);
	border-left-color: var(--rebs-teal-dark);
	color: var(--rebs-text);
}

.woocommerce-account .woocommerce-error,
.woocommerce-account .woocommerce-notice--error {
	background-color: #fdecea; /* warm red surface — pairs with #b03a2e */
	border-color: #f5b7b1;
	border-left-color: #b03a2e;
	color: #7b241c; /* AA Normal vs #fdecea (~7:1) */
}

.woocommerce-account .woocommerce-message li,
.woocommerce-account .woocommerce-error li,
.woocommerce-account .woocommerce-info li {
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce-message li + li,
.woocommerce-account .woocommerce-error li + li,
.woocommerce-account .woocommerce-info li + li {
	margin-top: 0.4rem;
}

/* "Log out" / inline action button inside a notice. The main stylesheet
   paints `.button` mint already; we shrink it to match the notice scale. */
#kubio .woocommerce-account .woocommerce-message a.button,
#kubio .woocommerce-account .woocommerce-info a.button,
#kubio .woocommerce-account .woocommerce-message a.button,
#kubio .woocommerce-account .woocommerce-info a.button {
	float: right;
	padding: 8px 16px;
	font-size: 0.85rem;
	margin-left: 1rem;
}

/* -------------------------------------------------------------------------
 * Downloads — empty state + file action
 * ------------------------------------------------------------------------- */

/* Empty downloads message — WC uses `.woocommerce-Message--info` here. The
   notice rule above already covers it, but the "Browse products" CTA inside
   needs the button treatment if it isn't `.button` (it's actually `.button`
   so the main stylesheet handles it; no rule needed). */

.woocommerce-account .download-file .woocommerce-MyAccount-downloads-file {
	/* Already painted by the main stylesheet's WC button block. We only
	   ensure the download link stays inline with the rest of the row. */
	display: inline-block;
}

/* -------------------------------------------------------------------------
 * Pagination — .woocommerce-pagination on My Orders
 * ------------------------------------------------------------------------- */

.woocommerce-account .woocommerce-pagination,
.woocommerce-account .woocommerce-Pagination {
	margin: 1rem 0 0;
}

.woocommerce-account .woocommerce-pagination ul.page-numbers,
.woocommerce-account .woocommerce-Pagination ul.page-numbers {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.woocommerce-account .woocommerce-pagination ul.page-numbers li,
.woocommerce-account .woocommerce-Pagination ul.page-numbers li {
	margin: 0;
}

#kubio .woocommerce-account .woocommerce-pagination a.page-numbers,
#kubio .woocommerce-account .woocommerce-pagination span.page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	border: 1px solid var(--rebs-border);
	background-color: var(--rebs-surface);
	color: var(--rebs-text);
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition:
		background-color var(--rebs-transition),
		border-color var(--rebs-transition),
		color var(--rebs-transition);
}

@media (hover: hover) {
	#kubio .woocommerce-account .woocommerce-pagination a.page-numbers:hover {
		background-color: var(--rebs-mint-soft);
		border-color: var(--rebs-teal);
		color: var(--rebs-teal-dark);
	}
}

#kubio .woocommerce-account .woocommerce-pagination span.page-numbers.current {
	background-color: var(--rebs-teal-dark);
	border-color: var(--rebs-teal-dark);
	color: var(--rebs-surface);
}

#kubio .woocommerce-account .woocommerce-pagination a.page-numbers:focus-visible {
	outline: 2px solid var(--rebs-teal-dark);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * Reduced motion — neutralize transitions added in this file
 * ------------------------------------------------------------------------- */

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

/* -------------------------------------------------------------------------
 * QA findings v2 (SCRUM-132) — typography, button color/font, content links,
 * inactive nav links, input focus visibility.
 *
 * Why this block lives at the end of the file:
 *   - It overrides BOTH the main `rebs-site-styles.css` (loaded first) AND
 *     the earlier sections of this file. Keeping the corrections at the end
 *     makes the load-order rationale explicit; specificity stays equal to or
 *     greater than the original rules so we win without `!important`.
 *   - Treating these as a self-contained block also makes the patch easy to
 *     review against the QA report and to revert if a finding is invalidated.
 * ------------------------------------------------------------------------- */

/* F1 — Typography hierarchy inside /my-account/*
 *
 * WC + Consus theme leak the wrong font into the account content area:
 *   - Headings (`h1`-`h4`) inherit Mulish from theme defaults → should be Poppins.
 *   - Body paragraphs / address blocks inherit Poppins → should be Mulish.
 *   - Form inputs inherit Poppins via `font-family: inherit` from main CSS →
 *     inside my-account we want Mulish to match body rhythm.
 *
 * Strategy: assert font-family explicitly per role. Poppins is the theme's
 * body font (Consus sets it on `body`) so headings use `font-family: inherit`
 * to ride that cascade; body surfaces use Mulish via the explicit stack we
 * already use elsewhere in this file. */
.woocommerce-account .woocommerce-MyAccount-content h1,
.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3,
.woocommerce-account .woocommerce-MyAccount-content h4,
.woocommerce-account .woocommerce-MyAccount-content h5,
.woocommerce-account .woocommerce-MyAccount-content h6,
#kubio .woocommerce-account .woocommerce-MyAccount-content h1,
#kubio .woocommerce-account .woocommerce-MyAccount-content h2,
#kubio .woocommerce-account .woocommerce-MyAccount-content h3,
#kubio .woocommerce-account .woocommerce-MyAccount-content h4 {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

/* Body text inside the content area — paragraphs, address blocks, form
   description text. Note: nav labels stay Mulish (already set above), table
   headers stay Mulish (already set above), labels stay Mulish (already set
   above). We only touch what was leaking the wrong font. */
.woocommerce-account .woocommerce-MyAccount-content p,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-Address address,
.woocommerce-account .woocommerce-Address,
.woocommerce-account .woocommerce-MyAccount-content li,
.woocommerce-account .woocommerce-MyAccount-content dd,
.woocommerce-account .woocommerce-MyAccount-content dt {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
}

/* Form inputs / textareas / selects inside my-account — main CSS uses
   `font-family: inherit` (Poppins). Override to Mulish to match body rhythm. */
.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="tel"],
.woocommerce-account input[type="number"],
.woocommerce-account input[type="search"],
.woocommerce-account input[type="url"],
.woocommerce-account textarea,
.woocommerce-account select,
#kubio .woocommerce-account input[type="text"],
#kubio .woocommerce-account input[type="email"],
#kubio .woocommerce-account input[type="password"],
#kubio .woocommerce-account input[type="tel"],
#kubio .woocommerce-account textarea,
#kubio .woocommerce-account select {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
}

/* F2 — Primary buttons in /my-account/* lose Open Sans
 *
 * Theme/Kubio injects `font-family: "Open Sans"` on `.button` with a high-
 * specificity rule (`#kubio .woocommerce a.button`). The main CSS already
 * wins on color/bg by matching that selector, but does NOT set font-family,
 * so Open Sans survives. We assert Poppins (theme's primary heading/CTA
 * font) for every WC button surface inside my-account.
 *
 * Pattern mirrors F-004 in the main CSS (single_add_to_cart_button) which
 * uses `font-family: inherit` to ride the body Poppins cascade. We do the
 * same here to keep behaviour consistent if the body font ever swaps. */
.woocommerce-account .button,
.woocommerce-account button.button,
.woocommerce-account input.button,
.woocommerce-account a.woocommerce-button,
.woocommerce-account button[type="submit"],
#kubio .woocommerce-account .button,
#kubio .woocommerce-account button.button,
#kubio .woocommerce-account input.button,
#kubio .woocommerce-account a.woocommerce-button,
#kubio .woocommerce-account button[type="submit"],
#kubio .woocommerce-account .woocommerce .button,
#kubio .woocommerce-account .woocommerce button.button,
#kubio .woocommerce-account .woocommerce a.button,
#kubio .woocommerce-account .woocommerce a.woocommerce-button.button,
#kubio .woocommerce-account .woocommerce button.button.woocommerce-Button {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

/* F3 — Primary buttons in /my-account/* use teal, not mint
 *
 * Main CSS defaults every WC button to mint background (lines 535-585). AC
 * for /my-account/* asks for teal (`--rebs-teal-dark`) as the primary CTA so
 * "View", "Invoice", "Save changes", "Save address", "Browse products",
 * "Order again" all read as primary actions in the account context.
 *
 * Mint stays as the global brand button colour for shop/product/cart; this
 * override is scoped strictly to `.woocommerce-account` descendants so the
 * site-wide button language is unaffected.
 *
 * Specificity has to beat:
 *   - Main CSS `#kubio .woocommerce a.button` = (1,3,2)
 * We add `.woocommerce-account` ancestor (one extra class) → (1,4,2). */
#kubio .woocommerce-account .woocommerce a.button,
#kubio .woocommerce-account .woocommerce button.button,
#kubio .woocommerce-account .woocommerce input.button,
#kubio .woocommerce-account .woocommerce a.woocommerce-button.button,
#kubio .woocommerce-account .woocommerce button.button.woocommerce-Button,
#kubio .woocommerce-account .woocommerce button.button.woocommerce-form-login__submit,
#kubio .woocommerce-account .woocommerce a.button.woocommerce-form-login__submit,
#kubio .woocommerce-account .woocommerce button.button.woocommerce-form-register__submit,
#kubio .woocommerce-account .woocommerce a.button.woocommerce-form-register__submit,
#kubio .woocommerce-account .woocommerce a.button.alt,
#kubio .woocommerce-account .woocommerce button.button.alt {
	background: var(--rebs-teal-dark);
	border-color: var(--rebs-teal-dark);
	color: var(--rebs-surface);
}

@media (hover: hover) {
	#kubio .woocommerce-account .woocommerce a.button:hover,
	#kubio .woocommerce-account .woocommerce button.button:hover,
	#kubio .woocommerce-account .woocommerce input.button:hover,
	#kubio .woocommerce-account .woocommerce button.button.woocommerce-form-login__submit:hover,
	#kubio .woocommerce-account .woocommerce a.button.woocommerce-form-login__submit:hover,
	#kubio .woocommerce-account .woocommerce button.button.woocommerce-Button:hover,
	#kubio .woocommerce-account .woocommerce a.button.alt:hover,
	#kubio .woocommerce-account .woocommerce button.button.alt:hover {
		background: var(--rebs-teal-darker);
		border-color: var(--rebs-teal-darker);
		color: var(--rebs-surface);
	}
}

/* F4 — Content links + inactive nav links pick up Kubio's brand colors
 *
 * Symptoms from QA:
 *   - `.woocommerce-MyAccount-content a` paragraph links rendered orange
 *     (Kubio's link color-4 = #FF5722). The main CSS only catches a curated
 *     set of WC link surfaces (`woocommerce-LostPassword`, `posted_in`, etc.)
 *     and misses the generic dashboard paragraph links ("recent orders",
 *     "edit your password", "Browse products" inline link).
 *   - `.woocommerce-MyAccount-navigation a` inactive items rendered violet
 *     (`#481FFF`). The main CSS DOES set the color (line 866) but Kubio's
 *     `[data-kubio] a:not([class*=wp-block-button])` (specificity 0,2,1)
 *     outranks the plain selector (0,2,0). We add `[data-kubio]` ancestor
 *     to match and win by load order.
 *
 * Pattern matches the rest of the file: scope under `[data-kubio]`, exclude
 * `[class*="wp-block-button"]` to avoid breaking block buttons. */
.woocommerce-account .woocommerce-MyAccount-content a,
#kubio .woocommerce-account .woocommerce-MyAccount-content a:not([class*="wp-block-button"]):not(.button):not(.woocommerce-button) {
	color: var(--rebs-teal-dark);
	text-decoration: underline;
}

@media (hover: hover) {
	.woocommerce-account .woocommerce-MyAccount-content a:hover,
	#kubio .woocommerce-account .woocommerce-MyAccount-content a:not([class*="wp-block-button"]):not(.button):not(.woocommerce-button):hover {
		color: var(--rebs-teal-darker);
	}
}

/* Inactive nav items — main CSS sets `color: var(--rebs-text)` on plain
   selector (0,2,0); we re-assert under `[data-kubio]` to beat Kubio's link
   rule (0,2,1). Active item stays handled by the existing rule above. */
#kubio .woocommerce-account .woocommerce-MyAccount-navigation a:not([class*="wp-block-button"]),
#kubio .woocommerce-account .woocommerce-MyAccount-navigation li a:not([class*="wp-block-button"]) {
	color: var(--rebs-text);
	text-decoration: none;
}

@media (hover: hover) {
	#kubio .woocommerce-account .woocommerce-MyAccount-navigation a:not([class*="wp-block-button"]):hover,
	#kubio .woocommerce-account .woocommerce-MyAccount-navigation li a:not([class*="wp-block-button"]):hover {
		color: var(--rebs-teal-dark);
	}
}

/* Re-assert the active state AFTER the inactive override so the cascade
   resolves correctly — active link still gets white-on-teal lozenge. */
#kubio .woocommerce-account .woocommerce-MyAccount-navigation li.is-active a:not([class*="wp-block-button"]) {
	background-color: var(--rebs-teal-dark);
	color: var(--rebs-surface);
	font-weight: 700;
}

/* F6 — Input focus state with visible outline (WCAG 2.4.7)
 *
 * Main CSS sets `outline: none` on focused WC inputs and uses a 2px box-
 * shadow halo as the visible focus indicator. Computed `outline-style: none`
 * fails automated WCAG audits and is brittle on browsers that suppress box-
 * shadow (high-contrast Windows mode). Inside my-account we restore a real
 * outline plus a softer halo for visual rhythm.
 *
 * Specificity must beat main CSS's `[data-kubio] .woocommerce input:focus`
 * (0,3,2). We add `.woocommerce-account` ancestor → (0,4,2). */
#kubio .woocommerce-account input[type="text"]:focus,
#kubio .woocommerce-account input[type="email"]:focus,
#kubio .woocommerce-account input[type="password"]:focus,
#kubio .woocommerce-account input[type="tel"]:focus,
#kubio .woocommerce-account input[type="number"]:focus,
#kubio .woocommerce-account input[type="search"]:focus,
#kubio .woocommerce-account input[type="url"]:focus,
#kubio .woocommerce-account textarea:focus,
#kubio .woocommerce-account select:focus,
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,
body.woocommerce-account textarea:focus,
body.woocommerce-account select:focus {
	outline: 2px solid var(--rebs-teal);
	outline-offset: 2px;
	border-color: var(--rebs-teal-dark);
	box-shadow: 0 0 0 3px var(--rebs-mint-soft);
}

/* -------------------------------------------------------------------------
 * QA findings v3 (SCRUM-132) — login form deslogueado typography fix.
 *
 * The logged-out /my-account page renders TWO forms (Login + Register) inside
 * `.u-columns > .u-column1/.u-column2`, OUTSIDE `.woocommerce-MyAccount-content`
 * (which only exists in the logged-in state). v2's F1 typography rules were
 * scoped to `.woocommerce-MyAccount-content`, so the deslogueado form headings
 * inherited Mulish (theme default) instead of Poppins, and inputs inherited
 * Poppins instead of Mulish. We restate the same rules with a wider scope.
 *
 * Markup (logged-out):
 *   <div class="woocommerce">
 *     <div class="u-columns col2-set" id="customer_login">
 *       <div class="u-column1 col-1">
 *         <h2>Login</h2>
 *         <form class="woocommerce-form woocommerce-form-login login">...</form>
 *       </div>
 *       <div class="u-column2 col-2">
 *         <h2>Register</h2>
 *         <form class="woocommerce-form woocommerce-form-register register">...</form>
 *       </div>
 *     </div>
 *   </div>
 *
 * Also covers the lost-password form heading ("Lost password?").
 * ------------------------------------------------------------------------- */

/* H2 headings inside login/register/lost-password forms — Poppins (display) */
.woocommerce-account .u-columns h1,
.woocommerce-account .u-columns h2,
.woocommerce-account .u-columns h3,
.woocommerce-account .u-columns h4,
.woocommerce-account .woocommerce-form-login h1,
.woocommerce-account .woocommerce-form-login h2,
.woocommerce-account .woocommerce-form-register h1,
.woocommerce-account .woocommerce-form-register h2,
.woocommerce-account .woocommerce-ResetPassword h1,
.woocommerce-account .woocommerce-ResetPassword h2,
.woocommerce-account form.lost_reset_password h1,
.woocommerce-account form.lost_reset_password h2,
#kubio .woocommerce-account .u-columns h2,
#kubio .woocommerce-account .woocommerce-form-login h2,
#kubio .woocommerce-account .woocommerce-form-register h2 {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

/* Form inputs inside login/register/lost-password — Mulish (body rhythm).
   The earlier rule (line ~822) covers `.woocommerce-account input[type=...]`
   already, but we re-assert here for clarity and to ensure parity with the
   logged-in inputs even if the theme injects a higher-specificity reset. */
.woocommerce-account .u-columns input[type="text"],
.woocommerce-account .u-columns input[type="email"],
.woocommerce-account .u-columns input[type="password"],
.woocommerce-account .woocommerce-form-login input[type="text"],
.woocommerce-account .woocommerce-form-login input[type="email"],
.woocommerce-account .woocommerce-form-login input[type="password"],
.woocommerce-account .woocommerce-form-register input[type="text"],
.woocommerce-account .woocommerce-form-register input[type="email"],
.woocommerce-account .woocommerce-form-register input[type="password"],
.woocommerce-account .woocommerce-ResetPassword input[type="text"],
.woocommerce-account .woocommerce-ResetPassword input[type="email"],
.woocommerce-account .woocommerce-ResetPassword input[type="password"],
#kubio .woocommerce-account .u-columns input,
#kubio .woocommerce-account .woocommerce-form-login input,
#kubio .woocommerce-account .woocommerce-form-register input {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
}

/* Paragraph body text inside the login form columns — Mulish (matches the
   .woocommerce-MyAccount-content paragraph rule for logged-in state). */
.woocommerce-account .u-columns p,
.woocommerce-account .woocommerce-form-login p,
.woocommerce-account .woocommerce-form-register p {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------------
 * QA findings v4 (SCRUM-132) — 2 residuals after v3 cleanup.
 *
 * R1 — Sidebar nav <li> still violet (#481FFF).
 *   v3 fixed the <a> background (teal-dark), but Kubio paints the parent
 *   <li> directly via `body.woocommerce-page nav.woocommerce-MyAccount-
 *   navigation li.is-active { background-color: #481FFF }` (0,3,3). The <a>
 *   sits on top correctly, but the <li> width may exceed the <a>'s painted
 *   area (padding/margin), so the violet leaks visually as a frame around
 *   the active item.
 *
 *   Cause root: the <li> itself shouldn't carry a background — the visual
 *   anchor is the <a> lozenge. We assert `background: transparent` on every
 *   nav <li> (including .is-active) so only the <a> teal-dark is visible.
 *
 *   Specificity: `#kubio body.woocommerce-account nav.woocommerce-MyAccount-
 *   navigation li.is-active` = (1,3,4) beats Kubio's (0,3,3).
 *
 * R2 — Login H2 still Mulish.
 *   v3 added rules for `.u-columns h2`, `.woocommerce-form-login h2`, etc.
 *   But the actual rendered markup is:
 *     <div class="woocommerce">
 *       <h2>Login</h2>            ← sibling of <form>, NOT inside u-columns
 *       <form class="woocommerce-form-login">…</form>
 *     </div>
 *   So `.u-columns h2` (no u-columns wrapper present when only the login
 *   form is rendered) and `.woocommerce-form-login h2` (H2 is sibling, not
 *   descendant) both miss.
 *
 *   Cause root: target the H2 as a direct child of `.woocommerce` on the
 *   logged-out account page. Use `.woocommerce-account .woocommerce > h2`
 *   plus a wider catch-all to defend against future markup variants
 *   (register-only, lost-password, two-column rendering).
 * ------------------------------------------------------------------------- */

/* R1 — Neutralize Kubio's violet on the nav <li>. The <a> lozenge already
   carries the teal-dark active surface (set earlier in this file, lines
   ~138 and ~968). Keep <li> background transparent so it never overlaps. */
#kubio body.woocommerce-account .woocommerce-MyAccount-navigation li,
#kubio body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active,
#kubio body.woocommerce-account nav.woocommerce-MyAccount-navigation li,
#kubio body.woocommerce-account nav.woocommerce-MyAccount-navigation li.is-active {
	background-color: transparent;
}

/* R2 — Login/Register/Lost-password H2 as direct child of `.woocommerce` on
   the logged-out account page. Adds the missing case where WC renders the
   form without a `.u-columns` wrapper. */
.woocommerce-account .woocommerce > h1,
.woocommerce-account .woocommerce > h2,
.woocommerce-account .woocommerce > h3,
.woocommerce-account .woocommerce > h4,
#kubio .woocommerce-account .woocommerce > h2,
#kubio body.woocommerce-account .woocommerce > h2 {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------------
 * SCRUM-162 — /my-account/edit-address/ cards fix
 *
 * Symptoms observed in production (Cani, 2026-05-15, logged-in screenshots):
 *   1. Billing card sits top-right, Shipping card bottom-left — NOT in a 2-col
 *      grid as intended. The 2-col grid is dropping somewhere along the cascade.
 *   2. "Add billing address" / "Add shipping address" action link rendered
 *      UPPERCASE + underlined, with an awkward line-break ("ADD BILLING /
 *      ADDRESS") because the flex `justify-content: space-between` on the
 *      title header crams the link into a narrow column.
 *   3. The empty-state copy ("You have not set up this type of address yet.")
 *      reads as a disabled input — themes paint a border around the surrounding
 *      `<p>` because there is no `<address>` block, just a bare paragraph.
 *   4. Typography on labels/body is mixed (Open Sans / Mulish / Poppins
 *      leaking) — the v2 F1 typography rules scoped to
 *      `.woocommerce-MyAccount-content` cover most of this; we re-assert at
 *      the `.woocommerce-Address` scope so empty-state markup is also painted.
 *
 * Markup (WC core `templates/myaccount/my-address.php`):
 *   <div class="u-columns woocommerce-Addresses col2-set addresses">
 *     <div class="u-column1 col-1 woocommerce-Address">
 *       <header class="woocommerce-Address-title title">
 *         <h3>Billing address</h3>
 *         <a href="..." class="edit">Add</a>   (or "Edit" if address exists)
 *       </header>
 *       <address>…</address>                   (or <p> placeholder if empty)
 *     </div>
 *     <div class="u-column2 col-2 woocommerce-Address">…</div>
 *   </div>
 *
 * Root cause analysis (no patch, fix the cause):
 *
 *   #1 grid drop — `.woocommerce-account .woocommerce-Addresses` is (0,2,0).
 *      `.woocommerce-account .u-columns` (line 598-604) is ALSO (0,2,0), and
 *      since the addresses wrapper carries BOTH classes, only the last-declared
 *      rule wins. Both set `grid-template-columns: 1fr 1fr`, so the grid SHOULD
 *      survive. BUT the children carry `.col-1`/`.col-2`/`.u-column1`/
 *      `.u-column2` and WC core CSS ships `.col2-set .col-1 { float:left;
 *      width:48% }` (0,2,0). Our v2 reset (line 606-611) only neutralizes
 *      `.u-column1`/`.u-column2`, NOT the `.col-1`/`.col-2` shorthand WC uses
 *      on address blocks. When WC core CSS loads after our file (Kubio Pro
 *      sometimes re-orders enqueues), the `.col-1`/`.col-2` floats win for
 *      `.woocommerce-Address` and the grid layout breaks into a staircase.
 *
 *      Fix: extend the children-reset to cover `.col-1`/`.col-2` AND raise
 *      specificity on the grid declaration so it beats any reorder.
 *
 *   #2 uppercase + underline link — the earlier rule at line 429-437 sets
 *      `text-transform: uppercase` + `text-decoration: underline` as the
 *      DEFAULT for `.woocommerce-Address-title a`. That was the SCRUM-132
 *      decision when only "Edit" was the typical state (short word, badge-
 *      style chip). With an empty address the WC label is "Add" → renders as
 *      "Add billing address" (long), which under the uppercase + narrow flex
 *      column wraps awkwardly. The AC for SCRUM-162 explicitly rules out
 *      uppercase + default underline. We replace the chip styling with a
 *      plain text-link treatment: no uppercase, no underline at rest,
 *      underline only on hover/focus (WCAG: focus must be visible).
 *
 *   #3 placeholder caja — WC outputs `<p>You have not set up this type of
 *      address yet.</p>` directly inside `.woocommerce-Address`. Our
 *      `.woocommerce-Address { border:1px; padding:1.25rem }` is correct for
 *      the card itself, but Kubio's global `p` styling adds a top-margin and
 *      the theme treats the bare `<p>` as if it were a form note (some Kubio
 *      stylesheets paint `p` with a faint background when the section is
 *      flagged as an empty state). We neutralize that: when a `<p>` is a
 *      direct child of `.woocommerce-Address` (placeholder pattern), it reads
 *      as plain body text — no extra border, no background, sits flush.
 *
 *   #4 typography — v2 F1 covers content area; we re-assert on
 *      `.woocommerce-Address` (already done at line 819-820) and on the
 *      header `<h3>` (line 417-424 already sets Mulish 1.1rem bold teal).
 *      The placeholder `<p>` inherits via the Mulish rule for
 *      `.woocommerce-Address` ancestor (line 820). No new typography rule
 *      needed here — only the card-link visual reset above.
 *
 * Specificity ladder (must beat both Kubio and WC core):
 *   - WC core `.col2-set .col-1` = (0,2,0)
 *   - Our reset uses `#kubio .woocommerce-account .woocommerce-Addresses .col-1`
 *     = (1,3,1) → wins.
 *   - Address-title link: Kubio's link rule `[data-kubio] a:not(...)` =
 *     (0,2,1). Our `#kubio .woocommerce-account .woocommerce-Address-title a`
 *     = (1,3,1) → wins without `!important`.
 *
 * Accessibility:
 *   - Link color stays `--rebs-teal-dark` (#006d82 = 5.34:1 vs surface).
 *   - Hover/focus add underline so the link is still discoverable for users
 *     scanning (WCAG 1.4.1: color is not the only means of identification —
 *     hover/focus give the underline back).
 *   - Focus ring stays via the global form-control focus block (not affected).
 *
 * Mobile first:
 *   - `.woocommerce-Addresses` stays single-column under 768px (inherited from
 *     line 388-392).
 *   - Title header switches to `flex-wrap: wrap` so the link drops to the next
 *     line on narrow cards instead of getting crushed.
 * ------------------------------------------------------------------------- */

/* #1 — Responsive grid matching /services card-grid pattern.
   `auto-fit minmax(280px, 1fr)`: 1 card = 1 col, 2 cards = 2 cols,
   3+ cards flow up to whatever the container width allows. Same
   pattern Quiosco uses for product grid (quiosco-product-grid.css:472).
   Defeats WC core `.col-1`/`.col-2` floats that can win the cascade
   when enqueue order shifts.

   SCRUM-164: replaced fixed `1fr 1fr` with `auto-fit minmax`; this
   block is now the single source of truth (SCRUM-164 consolidated
   the earlier SCRUM-132 block at ~line 388). Specificity (1,3,0).
   SCRUM-167 (A.NH-2): dropped redundant `.col2-set` / `.u-columns`
   chained selectors — the wrapper element carries all three classes
   so `.woocommerce-Addresses` already matches it; the extra selectors
   only added specificity nobody needed. Single selector is cleaner. */
#kubio .woocommerce-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin: 0 0 1.5rem;
}

@media (min-width: 768px) {
	#kubio .woocommerce-account .woocommerce-Addresses {
		gap: 2rem;
	}
}

/* SCRUM-164: neutralise WC core clearfix pseudos.
   WC ships `.woocommerce-Addresses::before` and `::after` as legacy
   clearfix table-cells for pre-grid float layout. Under `display: grid`
   they become grid items — with `auto-fit minmax(280px, 1fr)` the two
   extra "items" still consume cells and push the real cards into wrong
   positions (Cani reported on 2026-05-15 via DevTools grid overlay
   showing 4 cells instead of 2, Billing top-left + Shipping bottom-right
   diagonal).

   Pattern identical to Quiosco's fix for `ul.products`
   (quiosco-product-grid.css:484-494). `content: none` kills generation
   at origin; `display: none` adds defence if a future rule forces
   `content: ""`. */
#kubio .woocommerce-account .woocommerce-Addresses::before,
#kubio .woocommerce-account .woocommerce-Addresses::after {
	content: none;
	display: none;
}

/* Reset legacy WC float/width on address card children so the grid wins.
   SCRUM-167 (A.NH-2): dropped redundant `.col-1/.col-2/.u-column1/.u-column2`
   selectors — every address card child carries `.woocommerce-Address` plus
   those legacy classes together, so the single `.woocommerce-Address` child
   selector covers them all. */
#kubio .woocommerce-account .woocommerce-Addresses > .woocommerce-Address {
	float: none;
	width: auto;
	max-width: 100%;
	margin: 0; /* defeat WC core `.col-1 { margin-right: 3.8% }` */
}

/* #2 — Address title header: SCRUM-176 switched the base rule (line 579) to
   `flex-direction: column`, so the action link drops below the heading
   naturally and `flex-wrap` is no longer needed. Block kept as a sentinel
   for the related SCRUM-162 lessons (uppercase/underline reset below). */

/* #2 — Action link ("Add"/"Edit") visual reset:
   - No uppercase at rest (was forcing "ADD BILLING ADDRESS" line break).
   - No underline at rest; underline on hover/focus for discoverability.
   - Keep Mulish + teal-dark + 700 weight so it still reads as an action.
   Overrides the earlier `#kubio .woocommerce-account .woocommerce-Address-title a`
   block (lines 429-437) — same specificity (1,3,1), wins by load order. */
#kubio .woocommerce-account .woocommerce-Address-title a,
#kubio .woocommerce-account .woocommerce-Address-title a.edit {
	color: var(--rebs-teal-dark);
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-size: 0.9rem; /* 0.9rem: slight bump for readability after SCRUM-176 restyle. */
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
}

@media (hover: hover) {
	#kubio .woocommerce-account .woocommerce-Address-title a:hover,
	#kubio .woocommerce-account .woocommerce-Address-title a.edit:hover {
		color: var(--rebs-teal-darker);
		text-decoration: underline;
	}
}

#kubio .woocommerce-account .woocommerce-Address-title a:focus-visible,
#kubio .woocommerce-account .woocommerce-Address-title a.edit:focus-visible {
	outline: 2px solid var(--rebs-teal-dark);
	outline-offset: 2px;
	text-decoration: underline;
}

/* #3 — Placeholder "You have not set up this type of address yet." reads
   as a disabled input.

   Root cause (confirmed against WC core template `myaccount/my-address.php`
   v9.3.0): the placeholder copy lives INSIDE `<address>`, not in a `<p>`.
   So the visual "disabled input" cue isn't an extra border on a stray <p> —
   it's the card itself: `.woocommerce-Address` (line 401-405) uses
   `--rebs-surface-alt` (a soft grey) as the card background. With the
   border + padding + grey tint and a sentence of body text, the card looks
   like an `<input disabled>` block.

   Fix: switch the card background to `--rebs-surface` (white), keeping the
   border so the card frame is still readable. The grey tint only made sense
   when these cards held populated address blocks (where the contrast read as
   an info panel); for the empty/placeholder state — and for visual parity
   with the rest of /my-account/* content surfaces, which are all white-on-
   border — white is correct.

   Specificity (1,3,1) beats the original `.woocommerce-account .woocommerce-
   Address` rule (0,2,0) without `!important`. */
#kubio .woocommerce-account .woocommerce-Address {
	background-color: var(--rebs-surface);
}

/* SCRUM-167 Item E: defensive border on all `.woocommerce-Address` cards.
   Backstop for the blanco-sobre-blanco risk introduced when SCRUM-162 flipped
   the card background to `var(--rebs-surface)` (white) — both empty and
   populated cards now sit on a same-bg wrapper, so both need the frame.
   The base rule at line 575 already declares this border at specificity
   (0,2,0); this re-assertion under `#kubio` (1,3,1) outranks any downstream
   layer (Kubio Pro, theme overrides) that might strip it. Earlier iteration
   gated this on `:has(address:not(:empty))` to target only populated cards,
   but WC core renders the placeholder copy inside `<address>` too, so the
   selector matched everything anyway — simplified for honest intent. */
#kubio .woocommerce-account .woocommerce-Address {
	border: 1px solid var(--rebs-border);
}

/* Ensure the inner `<address>` body (which carries either the formatted
   address or the placeholder copy) renders as plain body text — no italic
   leak (already neutralized at line 449 but we restate under the kubio scope
   for explicit hierarchy), no extra padding, Mulish for body rhythm. */
#kubio .woocommerce-account .woocommerce-Address address {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	font-style: normal;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--rebs-text);
}


/* ============================================================================
 * SCRUM-137 — Edit-address form h2 weight + size
 * ============================================================================
 *
 * WC core (`templates/myaccount/form-edit-address.php`) renders the form
 * heading as `<h2>Billing address</h2>` (or "Shipping address"). With our
 * base h2 styling for `.woocommerce-MyAccount-content` it inherited Poppins
 * 700 at a heading scale that dominated the page (screenshot Cani
 * 2026-05-15: "Billing address" almost twice the size of the form inputs
 * below it, breaking the visual hierarchy between heading and the action
 * the user is taking).
 *
 * Cani's call: drop to `font-weight: 500; font-size: 2em` — lighter,
 * still clearly a heading but no longer steals attention from the form.
 *
 * Scope: `body.woocommerce-edit-address` (WP body class for the endpoint).
 * Targets only the form heading, not address-card titles (those live in
 * `.woocommerce-Address-title` on `/my-account/addresses/`, untouched).
 *
 * Specificity (1,2,1) — `#kubio body.woocommerce-edit-address` outranks the
 * earlier (1,3,0) family-only rule at line 828 by selector match path
 * (.woocommerce-MyAccount-content is dropped — the h2 lives inside the
 * form, but the chain stays under #kubio and edit-address body class so
 * the cascade is decisive). No `!important`.
 * ============================================================================ */

#kubio body.woocommerce-edit-address .woocommerce-MyAccount-content h2 {
	font-weight: 500;
	font-size: 2em;
}


/* ============================================================================
 * SCRUM-186 — Reset-password form layout
 * ============================================================================
 *
 * Surface: `/my-account/lost-password/?action=rp&key=...&login=...` — the
 * "Set password" form a user lands on after clicking the reset link in the
 * recovery email. WC core ships this form using `.form-row-first` +
 * `.form-row-last` (two side-by-side columns at `width: 47%; float: left/right`
 * from `woocommerce-layout.css`).
 *
 * Two problems on desktop:
 *
 *   1. The `<form.lost_reset_password>` carries `max-width: 600px; margin: 0
 *      auto` (Kubio Pro's WC styles). Without `width: 100%`, the form
 *      shrink-fits to the intrinsic width of its floated children — collapsing
 *      to ~293px and leaving each 47% column at ~111px wide. Both labels and
 *      inputs end up cramped (audit SCRUM-186, 2026-05-16).
 *
 *   2. Even with the form expanded to 600px, two side-by-side password fields
 *      is the wrong UX pattern: the user types a password then confirms it —
 *      a vertical flow. Every other WC form on the site (login, register,
 *      edit-account) uses single-column `.form-row-wide` for paridad.
 *
 * Fix: force the form to its `max-width` (600px) and stack the two rows full
 * width. Matches the mobile pattern WC core ships in
 * `woocommerce-smallscreen.css` (`.form-row-first/.form-row-last {
 * width: 100%; float: none }`) — we extend it to all viewports.
 *
 * Scope: `body.woocommerce-lost-password` (WP body class for the endpoint) +
 * `.lost_reset_password` (the form class WC emits only on the set-password
 * step). The combination keeps the rules off `/lost-password/` itself (the
 * email-entry step, which uses a different form class `.lost_reset_password`
 * does NOT carry — only the rp step does) and off every other surface.
 *
 * Specificity stays low (0,3,1) — no `#kubio` needed because the WC vendor
 * rule we're outranking is also unscoped (`.woocommerce form .form-row-first`
 * = 0,3,1) and our body class adds match-path precedence in the cascade.
 * ============================================================================ */

body.woocommerce-lost-password form.lost_reset_password {
	width: 100%;
	max-width: 600px;
	margin-inline: auto;
}

body.woocommerce-lost-password form.lost_reset_password .form-row-first,
body.woocommerce-lost-password form.lost_reset_password .form-row-last {
	width: 100%;
	float: none;
	margin-right: 0;
}
