/* Внешние отступы блока — на первом/последнем уведомлении (оболочка без my-6/mb-6). */
.narine-my-account-notices > .woocommerce-notices-wrapper > .narine-wc-notice-outer:first-child,
.narine-my-account-notices > .narine-wc-notice-outer:first-child {
	margin-top: 1.5rem;
}
.narine-my-account-notices > .woocommerce-notices-wrapper > .narine-wc-notice-outer:last-child,
.narine-my-account-notices > .narine-wc-notice-outer:last-child {
	margin-bottom: 1.5rem;
}
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-error:first-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-message:first-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-info:first-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-error:first-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-message:first-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-info:first-child {
	margin-top: 1.5rem;
}
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-error:last-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-message:last-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > ul.woocommerce-info:last-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-error:last-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-message:last-child,
.narine-my-account-notices > .woocommerce-notices-wrapper > div.woocommerce-info:last-child {
	margin-bottom: 1.5rem;
}

.narine-my-account-notices .woocommerce-error,
.narine-my-account-notices .woocommerce-message,
.narine-my-account-notices .woocommerce-info,
.narine-my-account-notices ul.woocommerce-error,
.narine-my-account-notices ul.woocommerce-message,
.narine-my-account-notices ul.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper ul.woocommerce-error,
.woocommerce-notices-wrapper ul.woocommerce-message,
.woocommerce-notices-wrapper ul.woocommerce-info,
ul.woocommerce-error[role="alert"],
ul.woocommerce-message[role="alert"],
ul.woocommerce-info[role="alert"] {
	list-style: none;
	margin: 0 0 1rem;
	position: relative;
	padding: 0.75rem 1.15rem 0.75rem 2.7rem;
	border-radius: 10px;
	font-size: 0.875rem;
	line-height: 1.45;
	border: 1px solid var(--gray-400, #d1d5db);
	background: #fff;
	color: var(--not-black, #1a1a1a);
	box-sizing: border-box;
}
ul.woocommerce-error::before,
ul.woocommerce-message::before,
ul.woocommerce-info::before {
	position: absolute !important;
	left: 0.85rem !important;
	top: 0.72rem !important;
	transform: none !important;
	margin: 0 !important;
	line-height: 1 !important;
}
.woocommerce-notices-wrapper ul.woocommerce-error li,
.woocommerce-notices-wrapper ul.woocommerce-message li,
.woocommerce-notices-wrapper ul.woocommerce-info li,
ul.woocommerce-error li {
	margin: 0;
	padding: 0;
	padding-left: 0;
}
.woocommerce-notices-wrapper ul.woocommerce-error li + li,
.woocommerce-notices-wrapper ul.woocommerce-message li + li {
	margin-top: 0.5rem;
}
.narine-my-account-notices ul.woocommerce-error,
.woocommerce-notices-wrapper ul.woocommerce-error,
ul.woocommerce-error[role="alert"] {
	border-color: rgba(185, 28, 28, 0.28);
	background: rgba(254, 242, 242, 0.92);
}
.narine-my-account-notices ul.woocommerce-message,
.woocommerce-notices-wrapper ul.woocommerce-message,
ul.woocommerce-message[role="alert"] {
	border-color: rgba(22, 163, 74, 0.3);
	background: rgba(240, 253, 244, 0.92);
}
.narine-my-account-notices ul.woocommerce-info,
.woocommerce-notices-wrapper ul.woocommerce-info,
ul.woocommerce-info[role="alert"] {
	border-color: rgba(37, 99, 235, 0.22);
	background: rgba(239, 246, 255, 0.92);
}
.woocommerce-notices-wrapper:empty {
	display: none;
}

/* Обёртка: span нельзя вкладывать в ul — обходим div-обёрткой (без полоски-таймера). */
.narine-wc-notice-outer.narine-wc-notice-enhanced {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	margin: 0 0 1rem;
	box-sizing: border-box;
	transition: opacity 0.28s ease, transform 0.28s ease;
}
.narine-wc-notice-outer.narine-wc-notice-enhanced > ul,
.narine-wc-notice-outer.narine-wc-notice-enhanced > div[class*="woocommerce-"] {
	margin-bottom: 0 !important;
}
.narine-wc-notice-outer.narine-wc-notice--hiding {
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.narine-wc-notice-outer.narine-wc-notice--hiding {
		transition: none;
	}
}

/* Toast: предупреждения — сверху по центру; «в корзину» — справа снизу. */
.narine-wc-toast-root {
	position: fixed;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}

.narine-wc-toast-root--top {
	top: calc(4.5rem + env(safe-area-inset-top, 0px));
	left: 50%;
	transform: translateX(-50%);
	align-items: center;
	width: min(calc(100vw - 2rem), 28rem);
}

.narine-wc-toast-root--bottom-right {
	right: max(1rem, env(safe-area-inset-right, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	left: auto;
	top: auto;
	transform: none;
	align-items: flex-end;
	width: min(calc(100vw - 2rem), 22rem);
}

.narine-wc-toast {
	pointer-events: auto;
	width: 100%;
	padding: 0.85rem 1.15rem;
	border: 1px solid var(--not-black, #2b3329);
	background: var(--not-black, #2b3329);
	color: #fff;
	font-size: 0.875rem;
	line-height: 1.45;
	text-align: center;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(-0.65rem);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.narine-wc-toast--visible {
	opacity: 1;
	transform: translateY(0);
}

.narine-wc-toast--hiding {
	opacity: 0;
	transform: translateY(-0.45rem);
}

@media (prefers-reduced-motion: reduce) {
	.narine-wc-toast {
		transition: none;
	}
}

@media (min-width: 768px) {
	.narine-wc-toast-root--top {
		top: calc(5rem + env(safe-area-inset-top, 0px));
	}

	.narine-wc-toast-root--bottom-right {
		right: max(1.25rem, env(safe-area-inset-right, 0px));
		bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
	}
}

.narine-wc-toast--placement-bottom-right {
	text-align: left;
	transform: translateY(0.65rem);
}

.narine-wc-toast--placement-bottom-right.narine-wc-toast--visible {
	transform: translateY(0);
}

.narine-wc-toast--placement-bottom-right.narine-wc-toast--hiding {
	transform: translateY(0.45rem);
}

.narine-wc-toast--success {
	border-color: var(--not-black, #2b3329);
	background: var(--not-black, #2b3329);
	color: #fff;
}

/* Checkout: баннер WC не показываем — только inline у label полей. */
body.woocommerce-checkout .woocommerce-notices-wrapper,
body.woocommerce-checkout .woocommerce > .woocommerce-notices-wrapper,
body.woocommerce-checkout ul.woocommerce-error,
body.woocommerce-checkout div.woocommerce-error,
body.woocommerce-checkout .narine-wc-notice-outer:has(ul.woocommerce-error),
body.woocommerce-checkout .narine-wc-notice-outer:has(div.woocommerce-error) {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	max-height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	pointer-events: none !important;
}

/* Checkout: уведомления на всю ширину контейнера, без ломания сетки формы. */
.narine-checkout-notices {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
.narine-checkout-notices .woocommerce-notices-wrapper,
.narine-checkout-notices ul.woocommerce-error,
.narine-checkout-notices ul.woocommerce-message,
.narine-checkout-notices ul.woocommerce-info {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
.narine-checkout-notices ul.woocommerce-error li,
.narine-checkout-notices ul.woocommerce-message li,
.narine-checkout-notices ul.woocommerce-info li {
	overflow-wrap: anywhere;
	word-break: break-word;
}
.narine-checkout-notices ul.woocommerce-error::before,
.narine-checkout-notices ul.woocommerce-message::before,
.narine-checkout-notices ul.woocommerce-info::before {
	top: 0.72rem !important;
	translate: none !important;
}
