/**
 * WooCommerce notices, brought onto the brand.
 *
 * WHY THIS EXISTS. Woo's notices ship as pale tinted boxes meant for a light
 * site: #e6f6ed mint for a message, #ffe6ec pink for an error, #e5f3ff blue for
 * an info. On a near-black page each one is a bright slab, and the error is the
 * worst of them because it is the one a customer sees at the exact moment
 * something has gone wrong. Found while sweeping the store for the fault Andrew
 * reported on the order details table, 15 Oct 2026: same cause, different
 * token.
 *
 * THE TREATMENT IS NOT NEW. assets/account.css has drawn notices this way since
 * the account build: a well, no box, and a 2px accent on the left edge carrying
 * the severity. The only thing wrong with it was its scope, `body.woocommerce-
 * account`, so the identical notice on the cart, the shop or the order-pay page
 * kept Woo's pink. This file is that treatment with the body scope taken off,
 * and the copy in account.css has been removed rather than left to drift.
 *
 * WHY THE ICON GOES. Woo draws a ::before glyph and Bricks keeps it. The accent
 * bar already says which kind of notice this is, and the glyph is from a
 * different design language to anything else on the site.
 *
 * NOT HERE: the thank-you page's own `.woocommerce-notice`, which is a sentence
 * rather than a panel and belongs to assets/order.css; and the Blocks notice
 * banner on cart and checkout, which is different markup entirely and lives in
 * assets/checkout.css beside the rest of the Blocks work.
 *
 * @package mimi-core
 */

.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	--mn-well: rgba(246, 243, 239, .04);
	--mn-rule: rgba(246, 243, 239, .16);

	/* account.css's error accent, which is a desaturated red chosen to sit with
	   copper rather than Woo's #be123c. */
	--mn-alert: #C4553D;
}

/* ----------------------------------------------------------- the panel -- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	align-items: center;
	background: var(--mn-well);
	border: 0;
	border-left: 2px solid var(--mn-rule);
	border-radius: 0;
	color: inherit;
	display: flex;
	flex-wrap: wrap;
	font-size: 16px;
	gap: 14px;
	justify-content: space-between;
	list-style: none;
	margin: 0 0 18px;
	/* A sentence is unreadable at the full 1440 content width, and these are
	   always one or two lines. */
	max-width: 720px;
	padding: 15px 18px;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	content: none;
}

.woocommerce-message {
	border-left-color: var(--copper, #BB8335);
}

.woocommerce-error {
	border-left-color: var(--mn-alert);
}

/* An error can carry several lines, one per failed field, and the panel's own
   flex would lay them out side by side. */
.woocommerce-error li {
	flex-basis: 100%;
	list-style: none;
	margin: 0;
}

/*
 * THE BOX AROUND A FAILED ORDER IS A FOCUS RING, NOT A BORDER.
 *
 * Woo gives a notice `role="alert"` and `tabindex="-1"` and then focuses it on
 * load, so a screen reader announces it. Chrome treats that programmatic focus
 * as focus-visible and draws its own ring, which on this page is a 3px bone box
 * around the panel: it reads as a white-bordered slab and it appears for every
 * visitor, not only keyboard ones. The first attempt at this chased a border
 * rule that does not exist.
 *
 * Dropping the ring costs no accessibility. tabindex="-1" keeps the element out
 * of the tab order entirely, so there is no keyboard journey that can land on
 * it and need an indicator; the only thing that focuses it is Woo's own script,
 * and the announcement is what serves that user. Scoped to :focus on the panel
 * itself, so every link and button inside it keeps its own ring.
 */
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-error:focus {
	outline: none;
}

/* ---------------------------------------------------------- the button -- */

/*
 * "View cart" beside "Nathan Scrub Top has been added to your cart".
 *
 * THIS REPLACES THE INLINE RULE IN includes/woocommerce.php. That rule set the
 * button's text to white and was right for what it faced: Bricks fills this
 * button with the notice's own colour, so it was green on green and the text
 * was invisible. Against the well the whole premise changes, because a solid
 * green block is now the only green thing on the page. So the button becomes
 * the site's outlined button, exactly as checkout.css does for Place Order, and
 * the white-text rule is gone rather than left fighting this one.
 */
.woocommerce-notices-wrapper a.button,
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
	background-color: transparent;
	border: 0;
	box-shadow: inset 0 0 0 1px var(--copper, #BB8335);
	border-radius: 2px;
	color: var(--copper, #BB8335);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	margin: 0;
	min-height: 0;
	padding: 10px 18px;
	text-transform: uppercase;
	transition: background-color 180ms ease-out, color 180ms ease-out;
}

.woocommerce-notices-wrapper a.button:hover,
.woocommerce-notices-wrapper a.button:focus-visible,
.woocommerce-message a.button:hover,
.woocommerce-message a.button:focus-visible,
.woocommerce-info a.button:hover,
.woocommerce-info a.button:focus-visible,
.woocommerce-error a.button:hover,
.woocommerce-error a.button:focus-visible {
	background-color: var(--copper, #BB8335);
	color: var(--rich, #0E1010);
}

/*
 * Woo puts the button first in the source and floats it right. Order moves it
 * without touching the markup, so the sentence is read before the thing it asks
 * you to do. Carried over from account.css, where it was scoped to .woocommerce
 * -info only and the same reasoning applied to all three.
 */
.woocommerce-notices-wrapper a.button,
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
	float: none;
	order: 2;
}

/* -------------------------------------------------------- store notice -- */

/*
 * The site-wide notice bar, which WooCommerce pins to the bottom of every page
 * when it is switched on. It is not in use today, so this is pre-emptive: it
 * ships as #e5f3ff and would be a pale blue band across the foot of the site
 * the moment anyone enables it in the Customizer.
 */
.woocommerce-store-notice {
	background-color: var(--rich, #0E1010);
	border-top: 1px solid var(--mn-rule, rgba(246, 243, 239, .16));
	color: var(--bone, #F6F3EF);
	font-size: 15px;
}

.woocommerce-store-notice a {
	color: var(--copper, #BB8335);
}
