/*
 * Inline cart notices (cart page error zone + cart drawer).
 * Rendered by assets/js/pv-cart-notices.js; replaces the auto-hiding pink
 * toast for cart quantity/stock errors. Same palette as the PV payment
 * alerts (components/pv-pscheckout-notifications.css). Own class names on
 * purpose: the global .alert rules in custom.css (::before icon block with
 * negative margins) are not involved.
 */
.pv-cart-notice {
	--pv-alert-bg: #fbf0f1;
	--pv-alert-border: #e9c3c9;
	--pv-alert-color: #7a1424;
	--pv-alert-icon-bg: #f5dde1;
	--pv-alert-icon-color: #8d0d22;
	align-items: stretch;
	background-color: var(--pv-alert-bg);
	border: 1px solid var(--pv-alert-border);
	border-radius: 6px;
	color: var(--pv-alert-color);
	display: flex;
	font-size: 0.92rem;
	line-height: 1.45;
	margin: 0 0 1rem;
	min-height: 3.2rem;
	overflow: hidden;
	position: relative;
	text-align: left;
}

.pv-cart-notice[hidden] {
	display: none;
}

.pv-cart-notice__icon {
	align-items: center;
	align-self: stretch;
	background: var(--pv-alert-icon-bg);
	color: var(--pv-alert-icon-color);
	display: flex;
	flex: 0 0 3rem;
	height: auto;
	justify-content: center;
	margin: 0;
}

.pv-cart-notice__icon .material-icons {
	color: inherit;
	font-size: 1.4rem;
	line-height: 1;
}

.pv-cart-notice__body {
	align-self: center;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.85rem 0.5rem 0.85rem 1rem;
}

.pv-cart-notice__message {
	color: inherit;
	font-weight: 600;
	margin: 0;
	overflow-wrap: anywhere;
}

.pv-cart-notice__message + .pv-cart-notice__message {
	margin-top: 0.35rem;
}

.pv-cart-notice__close {
	align-items: center;
	align-self: flex-start;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	justify-content: center;
	line-height: 1;
	margin: 0.45rem 0.45rem 0 0;
	opacity: 0.7;
	padding: 0.35rem;
}

.pv-cart-notice__close .material-icons {
	font-size: 1.15rem;
}

.pv-cart-notice__close:hover,
.pv-cart-notice__close:focus-visible {
	background: var(--pv-alert-icon-bg);
	opacity: 1;
}

.pv-cart-notice__close:focus-visible {
	outline: 2px solid var(--pv-alert-icon-color);
	outline-offset: 1px;
}

.pv-cart-notice.is-entering {
	animation: pv-cart-notice-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pv-cart-notice-in {
	0% {
		opacity: 0;
		transform: translateY(-6px);
	}

	60% {
		opacity: 1;
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pv-cart-notice.is-entering {
		animation: none;
	}
}

/* Drawer: first child of the scrollable item list, kept in view. */
.pv-cart-drawer__items > .pv-cart-notice--drawer {
	box-shadow: 0 6px 18px rgba(122, 20, 36, 0.1);
	margin: 0.85rem 1.45rem 0.35rem;
	position: sticky;
	top: 0.85rem;
	z-index: 3;
}

@media (max-width: 575.98px) {
	.pv-cart-notice {
		font-size: 0.88rem;
	}

	.pv-cart-notice__icon {
		flex-basis: 2.6rem;
	}

	.pv-cart-notice__icon .material-icons {
		font-size: 1.25rem;
	}

	.pv-cart-notice__body {
		padding: 0.75rem 0.4rem 0.75rem 0.85rem;
	}

	.pv-cart-drawer__items > .pv-cart-notice--drawer {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}
