/**
 * WooCommerce notice banners — site-wide replacement.
 *
 * Loaded site-wide via inc/enqueue.php because notices can appear on any
 * page (login redirect, add-to-cart success, checkout validation,
 * password reset, account save, etc).
 *
 * Required because woocommerce-general.css is dequeued in inc/woocommerce.php
 * (see project_wc_general_disabled). The notice template overrides at
 * woocommerce/notices/{success,error,notice}.php wrap each notice in
 * `.ellisons-notice` with a leading FA icon. WC's original class names
 * (.woocommerce-message / .woocommerce-error / .woocommerce-info) are
 * preserved alongside so plugins targeting them still find the element.
 *
 * Used both inside the WC notices wrapper and standalone — `.woocommerce-notices-wrapper`
 * is WC's outer container that wraps all notices on a page.
 */

/* --- Wrapper spacing --- */

.woocommerce-notices-wrapper {
	margin-bottom: 16px;
}

.woocommerce-notices-wrapper:empty {
	display: none;
	margin: 0;
}

/* --- Base notice --- */

.ellisons-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 18px;
	margin: 0 0 12px;
	border-radius: 4px;
	background: #fafafa;
	border-left: 3px solid var(--gold-color, #c7a267);
	font-size: 14px;
	line-height: 1.55;
	list-style: none;
	color: var(--text-primary);
}

.ellisons-notice:last-child {
	margin-bottom: 0;
}

.ellisons-notice__icon {
	flex-shrink: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--gold-color, #c7a267);
	margin-top: 1px;
}

.ellisons-notice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.ellisons-notice__body a {
	color: var(--text-primary);
	text-decoration: underline;
	font-weight: 500;
}

.ellisons-notice__body a:hover {
	color: var(--gold-color, #c7a267);
}

.ellisons-notice__list {
	flex: 1 1 auto;
	min-width: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ellisons-notice__list li {
	margin: 0 0 4px;
}

.ellisons-notice__list li:last-child {
	margin-bottom: 0;
}

/* --- Variants --- */

.ellisons-notice--success {
	background: rgba(92, 168, 70, 0.08);
	border-left-color: var(--success-green, #5ca846);
}

.ellisons-notice--success .ellisons-notice__icon {
	color: var(--success-green, #5ca846);
}

.ellisons-notice--error {
	background: rgba(192, 57, 43, 0.06);
	border-left-color: var(--danger-red-border, #c0392b);
}

.ellisons-notice--error .ellisons-notice__icon {
	color: var(--danger-red-border, #c0392b);
}

.ellisons-notice--error .ellisons-notice__list li {
	color: var(--danger-red-border, #c0392b);
	font-weight: 500;
}

.ellisons-notice--info {
	background: rgba(0, 0, 0, 0.03);
	border-left-color: var(--text-secondary, #888);
}

.ellisons-notice--info .ellisons-notice__icon {
	color: var(--text-secondary, #888);
}

/* --- WC's `.button` inside notices (e.g. "View cart →") ---
   The notice templates sometimes render an inline CTA via wc_print_notice
   with `<a class="button wc-forward">`. Strip WC button skin (we dequeued
   that) and render as an outlined chip aligned to the right. */

.ellisons-notice a.button,
.ellisons-notice a.wc-forward {
	display: inline-block;
	margin-left: 12px;
	font-size: 11px;
	padding: 6px 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-weight: 500;
	background: transparent;
	color: var(--text-primary);
	border: 1px solid currentColor;
	border-radius: 0;
	text-decoration: none;
	float: right;
}

.ellisons-notice a.button:hover,
.ellisons-notice a.wc-forward:hover {
	background: var(--text-primary);
	color: #fff;
}

.ellisons-notice--success a.button,
.ellisons-notice--success a.wc-forward {
	color: var(--success-green, #5ca846);
}

.ellisons-notice--success a.button:hover,
.ellisons-notice--success a.wc-forward:hover {
	background: var(--success-green, #5ca846);
	color: #fff;
}
