/**
 * The order read-out, brought onto the brand.
 *
 * WHY THIS EXISTS. Cart and Checkout are WooCommerce Blocks, and assets/
 * checkout.css deals with those. The screen that comes *after* them is not:
 * the order-received page and My Account > View order are classic Woo
 * templates, `.woocommerce-order-details` and friends, and nothing had ever
 * reached them. Andrew, 15 Oct 2026, having placed the first test order on
 * staging: "Order details is one big white block. We need to check all these
 * default blocks and make sure they are styled".
 *
 * IT IS ONE CAUSE, NOT THREE FAULTS. The theme ships `--bricks-bg-light:
 * #f5f6f7` and paints three things with it: the totals `tfoot`, the quantity
 * pill beside a line item, and the `<mark>` chips in "Order #1928 was placed on
 * 15 October 2026 and is currently Processing". The token means "a surface
 * slightly lifted off the page", which on a light site is a pale grey and on
 * this one is a white slab. Two of the three then put bone text on it, which is
 * why the totals were not merely ugly but unreadable: measured contrast 1.02
 * against a 4.5 floor.
 *
 * So the token is reset for the order read-out rather than each rule being
 * fought separately. Anything else the theme paints with it inside these
 * containers comes out right on its own, including rules added in a later
 * Bricks release. The one thing a token reset cannot fix is a rule that pairs
 * the light background with a dark text colour, because the text colour is a
 * literal: `.woocommerce mark` is the only one, and it is handled below.
 *
 * TWO PAGES, ONE STYLESHEET. The same markup renders on the order-received page
 * and inside My Account, so this is loaded on both rather than being split
 * between checkout.css and account.css, where the two copies would drift.
 * Everything here is scoped by Woo's own classes, not by a body class, for the
 * same reason.
 *
 * WHY NO !important ANYWHERE. The theme's Woo rules all live inside
 * `@layer bricks`, and an unlayered rule beats a layered one whatever the
 * specificity. This file is unlayered, so a plain selector is enough. See
 * includes/woocommerce.php for the same trick on the notice button.
 *
 * TOKENS. The ramp matches assets/account.css to the digit, because My Account
 * is one of this file's two homes and the order table has to sit beside the
 * screens account.css already drew. Literal fallbacks throughout: an undefined
 * custom property makes a declaration fail silently rather than loudly.
 *
 * @package mimi-core
 */

.woocommerce-order,
.woocommerce-MyAccount-content {
	/* One ramp: a table edge, a row rule and a hairline are visibly the same
	   family rather than three hand-picked alphas that drift apart. */
	--mo-rule: rgba(246, 243, 239, .16);
	--mo-hair: rgba(246, 243, 239, .10);
	--mo-dim: rgba(246, 243, 239, .62);
	--mo-well: rgba(246, 243, 239, .04);

	/*
	 * THE WHITE SLABS, ALL OF THEM, IN ONE DECLARATION.
	 *
	 * The theme's "lifted surface" token, re-keyed for a dark page. It is a
	 * tint rather than `transparent` so the elements the theme meant to lift
	 * off the page still are, which is the point of the token: the totals
	 * block should read as a different surface from the line items above it.
	 */
	--bricks-bg-light: var(--mo-well);
}

/* ----------------------------------------------------- the overview grid -- */

/*
 * The "Order number / Date / Total / Payment method" panel on the
 * order-received page. The theme gives it `border-style: solid; border-width:
 * 1px` and never names a colour, so it falls to currentColor, which here is
 * bone at full strength: a white box drawn in four lines rather than filled.
 * The same omission is why the order table below it had bright edges.
 */
.woocommerce-order-overview.order_details,
.woocommerce-order-overview.order_details li {
	border-color: var(--mo-rule);
}

/*
 * Label above value, which is how every other read-out on the site is set: the
 * size guide, the account addresses and the team order summary all put a small
 * uppercase label over the thing it names. Woo emits the label as a bare text
 * node and the value as a <strong>, so the li carries the label styling and the
 * <strong> undoes it.
 */
.woocommerce-order-overview.order_details li {
	color: var(--mo-dim);
	font-size: 13px;
	font-weight: 600;
	gap: 6px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.woocommerce-order-overview.order_details li strong {
	color: var(--bone, #F6F3EF);
	font-size: 17px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

/* ------------------------------------------------------ the order details -- */

/* Same missing border-color as the overview, on the table frame and on every
   row rule inside it. The rows are lighter than the frame so the table reads as
   one object rather than a stack of boxes. */
.woocommerce-order-details table,
.woocommerce-customer-details table {
	border-color: var(--mo-rule);
}

.woocommerce-order-details table tbody tr {
	border-bottom-color: var(--mo-hair);
}

/*
 * The totals block. The surface arrives on its own from the token reset above,
 * so this is only the line that separates it from the line items.
 *
 * The Total row is deliberately not singled out. Woo gives these rows no
 * classes at all, so the only way to reach it is nth-child, and the row count
 * changes with the order: no Shipping row on a collection order, no Note row
 * when the customer left none. A positional selector would quietly emphasise
 * the wrong line. The <th> is already bold, which is enough.
 */
.woocommerce-order-details table tfoot {
	border-top: 1px solid var(--mo-rule);
}

.woocommerce-order-details table tfoot th {
	color: var(--mo-dim);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.woocommerce-order-details table tfoot td {
	color: var(--bone, #F6F3EF);
}

/* "via Placeholder rate" and "(includes R233,51 VAT)" are asides, and at full
   strength they competed with the amount they qualify. */
.woocommerce-order-details table tfoot small {
	color: var(--mo-dim);
	display: block;
	font-size: 13.5px;
	margin-top: 4px;
}

/*
 * THE QUANTITY PILL IS DROPPED, NOT RECOLOURED.
 *
 * The theme draws "x 2" as a 20px-radius chip filled with the light token. The
 * token reset alone would leave a faint 20px pill, and nothing else on this
 * site is pill-shaped: the radius here is 2px everywhere, from the enquiry
 * fields to the buttons. So it goes back to being a number beside a name.
 */
.woocommerce-order-details table .product-quantity {
	background-color: transparent;
	border-radius: 0;
	color: var(--mo-dim);
	margin: 0 0 0 6px;
	padding: 0;
}

/* -------------------------------------------------------------- the marks -- */

/*
 * "Order #1928 was placed on 15 October 2026 and is currently Processing".
 *
 * Woo marks up those three values as <mark>, and the theme fills a mark with
 * the light token AND sets `color: #000`. The colour is a literal, so unlike
 * everything else on this page the token reset cannot reach it: black text on a
 * 4% tint would be worse than the white chip it replaces. Both halves are
 * therefore set here.
 *
 * Scoped to the order sentence rather than every <mark>, so a genuine
 * highlight elsewhere on the site keeps the theme's treatment.
 */
.woocommerce-MyAccount-content mark,
.woocommerce-order mark {
	background-color: transparent;
	color: var(--bone, #F6F3EF);
	font-weight: 600;
	padding: 0;
}

/* The status is the one value in that sentence a customer actually came to
   read, so it is the one that gets the accent. */
.woocommerce-MyAccount-content mark.order-status,
.woocommerce-order mark.order-status {
	color: var(--copper, #BB8335);
}

/* ------------------------------------------------------------ the headings -- */

/*
 * On My Account these are already small and uppercase, because account.css
 * styles every h2 and h3 in that column. The order-received page is outside
 * that scope, so "Order details", "Billing address" and "Shipping address"
 * rendered at the site's display size, 63px, each one louder than the page
 * title above them. The values below are account.css's, so the same screen
 * reads the same way whichever door the customer came through.
 */
.woocommerce-order-details__title,
.woocommerce-customer-details .woocommerce-column__title {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .1em;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.woocommerce-customer-details address {
	font-size: 16px;
	font-style: normal;
	line-height: 1.75;
	opacity: .78;
}

/* ------------------------------------------------------------- the notice -- */

/*
 * "Thank you. Your order has been received." shipped as #047857, a green that
 * appears nowhere in the palette and exists so a light theme can signal
 * success. On this page the success is the headline above it, so the line only
 * has to be legible.
 *
 * Left, not centred. The theme centres every .woocommerce-notice; here that put
 * one centred line between a left-aligned page title and a full-width panel,
 * which read as a mistake rather than a choice.
 */
.woocommerce-order > .woocommerce-notice--success {
	color: var(--mo-dim);
	font-size: 17px;
	text-align: left;
}

/*
 * The other half of this page, which is easy to forget because it only appears
 * when a payment is declined: thankyou.php swaps the whole read-out for
 * "Unfortunately your order cannot be processed" and a pair of links to pay
 * again. Same class, --error instead of --success, so it inherited the green
 * until now. The accent is notice.css's, so a failed order reads the same as a
 * failed anything else.
 */
.woocommerce-order > .woocommerce-notice--error {
	color: #C4553D;
	font-size: 17px;
	text-align: left;
}

.woocommerce-order > .woocommerce-notice--error a {
	color: var(--copper, #BB8335);
}

/* ------------------------------------------------- the Pay / Cancel actions -- */

/*
 * Task 10, 27 Oct 2026. On a pending order Woo prints Pay and Cancel as
 * .button links in the totals table. The theme's light button token painted
 * them as a pale slab with white text, so both labels were close to invisible.
 * Pay is V1's solid copper button; Cancel is the quiet outlined one.
 */
.woocommerce-order-details table .woocommerce-button,
.woocommerce-order-details table a.button,
.woocommerce-MyAccount-content .woocommerce-button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 24px;
	margin: 0 8px 8px 0;
	border: 0;
	border-radius: 0;
	background: var(--copper, #BB8335);
	color: var(--rich, #0E1010);
	box-shadow: inset 0 0 0 1px var(--copper, #BB8335);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.woocommerce-order-details table .woocommerce-button:hover,
.woocommerce-order-details table a.button:hover,
.woocommerce-MyAccount-content .woocommerce-button.button:hover {
	background: var(--copper-lift, #D1974A);
	color: var(--rich, #0E1010);
}

.woocommerce-order-details table .woocommerce-button.cancel,
.woocommerce-order-details table a.button.cancel {
	background: transparent;
	color: var(--bone, #F6F3EF);
	box-shadow: inset 0 0 0 1px rgba(246, 243, 239, .22);
}

.woocommerce-order-details table .woocommerce-button.cancel:hover,
.woocommerce-order-details table a.button.cancel:hover {
	background: transparent;
	color: var(--copper, #BB8335);
	box-shadow: inset 0 0 0 1px var(--copper, #BB8335);
}

/* ------------------------------------------------------------------ phones -- */

@media (max-width: 640px) {
	/* The theme's 20px cell padding on a 50/50 table leaves the amounts about
	   nine characters wide, which breaks "R1 790,25 (includes R233,51 VAT)"
	   across three lines. */
	.woocommerce-order-details table td,
	.woocommerce-order-details table th {
		padding: 14px;
	}
}
