/* MC Wear — Cart Toast
 *
 * Editorial luxury notification stack. Pinned bottom-left desktop, full-bleed
 * bottom on mobile. Sharp corners, monochrome surface, single hairline accent
 * on the left edge. Stacks newest-on-top via column-reverse.
 *
 * Specificity bumped (.mcw-toast.mcw-toast) so Elementor Site Settings or
 * theme baseline can't override without going through this file.
 */

.mcw-toast-stack {
	position: fixed;
	bottom: 28px;
	left: 28px;
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
	z-index: 99999;
	pointer-events: none;
	max-width: calc(100vw - 56px);
}

@media (max-width: 640px) {
	.mcw-toast-stack {
		left: 16px;
		right: 16px;
		bottom: 16px;
		align-items: stretch;
		max-width: none;
	}
}

.mcw-toast.mcw-toast {
	pointer-events: auto;
	box-sizing: border-box;
	min-width: 320px;
	max-width: 420px;
	background: #ffffff;
	color: #0a0a0a;
	padding: 16px 18px 16px 22px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 14px;
	align-items: center;
	box-shadow:
		0 1px 0 rgba(0, 0, 0, 0.04),
		0 10px 36px rgba(10, 10, 10, 0.10),
		0 2px 8px rgba(10, 10, 10, 0.04);
	border-left: 2px solid #0a0a0a;
	transform: translateY(24px) scale(0.97);
	opacity: 0;
	transition:
		transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
		opacity 320ms ease;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	will-change: transform, opacity;
}

@media (max-width: 640px) {
	.mcw-toast.mcw-toast {
		min-width: 0;
		max-width: none;
		width: 100%;
	}
}

.mcw-toast.mcw-toast.is-in {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.mcw-toast.mcw-toast.is-out {
	transform: translateY(-6px) scale(0.97);
	opacity: 0;
}

/* Variants */
.mcw-toast.mcw-toast--success {
	border-left-color: #0a0a0a;
}

.mcw-toast.mcw-toast--error {
	background: #0a0a0a;
	color: #ffffff;
	border-left-color: #ff3b30;
}

.mcw-toast.mcw-toast--error .mcw-toast__msg {
	color: rgba(255, 255, 255, 0.7);
}

/* Status mark — thin square with center dot/check */
.mcw-toast__mark {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mcw-toast__mark svg {
	width: 18px;
	height: 18px;
}

.mcw-toast__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.mcw-toast__title {
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, sans-serif;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	line-height: 1.25;
	color: inherit;
}

.mcw-toast__msg {
	font-family: "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(10, 10, 10, 0.62);
	letter-spacing: 0.005em;
}

/* Call-to-action link (e.g. "Log in") */
.mcw-toast.mcw-toast .mcw-toast__action {
	align-self: flex-start;
	margin-top: 8px;
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	background: #0a0a0a;
	color: #ffffff;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, sans-serif;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: 1px solid #0a0a0a;
	transition: background 0.2s ease, color 0.2s ease;
}

.mcw-toast.mcw-toast .mcw-toast__action:hover,
.mcw-toast.mcw-toast .mcw-toast__action:focus-visible {
	background: #ffffff;
	color: #0a0a0a;
}

/* On the dark error variant, invert the CTA so it stays legible. */
.mcw-toast.mcw-toast--error .mcw-toast__action {
	background: #ffffff;
	color: #0a0a0a;
	border-color: #ffffff;
}

.mcw-toast.mcw-toast--error .mcw-toast__action:hover,
.mcw-toast.mcw-toast--error .mcw-toast__action:focus-visible {
	background: transparent;
	color: #ffffff;
}

.mcw-toast.mcw-toast .mcw-toast__close {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	background-color: transparent;
	background-image: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	min-width: 0;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
	opacity: 0.45;
	transition: opacity 0.2s ease, transform 0.2s ease;
	font: inherit;
	line-height: 1;
}

.mcw-toast.mcw-toast .mcw-toast__close:hover,
.mcw-toast.mcw-toast .mcw-toast__close:focus-visible {
	opacity: 1;
	background: transparent;
}

.mcw-toast.mcw-toast .mcw-toast__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mcw-toast.mcw-toast .mcw-toast__close svg {
	display: block;
	width: 11px;
	height: 11px;
	fill: none;
}

/* Add-to-cart button loading state */
.mcw-summer__add[aria-busy="true"],
[data-mcw-add-to-cart][aria-busy="true"] {
	cursor: wait;
	pointer-events: none;
	position: relative;
}

[data-mcw-add-to-cart][aria-busy="true"] svg {
	opacity: 0;
}

[data-mcw-add-to-cart][aria-busy="true"]::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 14px;
	height: 14px;
	border: 1.5px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: mcw-toast-spin 0.7s linear infinite;
}

@keyframes mcw-toast-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.mcw-toast.mcw-toast {
		transition: opacity 0.15s ease;
		transform: none;
	}
	.mcw-toast.mcw-toast.is-in { transform: none; }
	.mcw-toast.mcw-toast.is-out { transform: none; }
	[data-mcw-add-to-cart][aria-busy="true"]::after {
		animation: none;
	}
}
