/* SV Cart — the win celebration card.
 *
 * Self-contained: the confetti canvas is a child of the card and clipped by it,
 * so particles stay inside the card instead of raining down the whole page.
 */

.svc-win {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .2s ease;
	font-family: Lato, system-ui, sans-serif;
}

.svc-win.is-in { opacity: 1; }
.svc-win.is-out { opacity: 0; }

/* Fixed, not absolute, so the overlay can be narrowed to the side cart's own
 * width (see .svc-win--indrawer) while the dimming still covers the page. */
.svc-win__scrim {
	position: fixed;
	inset: 0;
	background: rgba(42, 26, 18, .5);
}

/* The card belongs to whatever the customer is looking at. With the side cart
 * open that is a 380px panel on the right, and a card centred on the viewport
 * sits half over the page behind it. celebrate.js measures the open panel and
 * sets left/width inline, so the centring below happens inside the drawer.
 * On the cart page there is no drawer and the card stays centred on screen. */
.svc-win--indrawer {
	right: auto;
}

.svc-win__card {
	position: relative;
	overflow: hidden;                 /* clips the confetti to the card */
	width: min(380px, calc(100% - 32px));
	background: #FFFDF9;
	border-radius: 16px;
	padding: 30px 26px 24px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(42, 26, 18, .3);
	transform: translateY(10px) scale(.97);
	transition: transform .24s cubic-bezier(.2, .7, .2, 1);
}

.svc-win.is-in .svc-win__card { transform: none; }

.svc-win__pop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Lift the content above the confetti canvas.
 *
 * This used to read `:not(.svc-win__pop)` alone, which also caught the close
 * button — and at 0,2,0 it outweighed `.svc-win__x`'s own 0,1,0, so
 * `position: relative` won and `position: absolute` never applied. The button
 * dropped into normal flow and the card's `text-align: center` put it in the
 * middle of the card, above the seal. It was never a spacing problem. */
.svc-win__card > *:not(.svc-win__pop):not(.svc-win__x) { position: relative; }

.svc-win__x {
	position: absolute;
	z-index: 2;                       /* above the canvas, like the content */
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0 !important;
	border-radius: 50%;
	background: #F7F1E8 !important;
	color: #5B4A3D !important;
	font: 400 19px/1 Lato, system-ui, sans-serif;
	padding: 0 !important;
	min-height: 0;
	cursor: pointer;
	box-shadow: none !important;
	transition: background .15s, color .15s;
}

/* The glyph's own bearing sits it low in the circle; flex centring plus this
 * nudge puts the visual centre of the × on the circle's centre. */
.svc-win__x::before {
	content: "\00d7";
	display: block;
	margin-top: -1px;
}

.svc-win__x:hover { background: #EFE3D0 !important; }

.svc-win__seal {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #F2E7D5;
	color: #772613;
}

.svc-win__seal svg { width: 30px; height: 30px; }

.svc-win__img {
	display: block;
	width: 84px;
	height: 84px;
	object-fit: contain;
	margin: 0 auto 12px;
	border-radius: 10px;
	background: #F2E7D5;
	mix-blend-mode: multiply;
	padding: 4px;
}

.svc-win__kicker {
	margin: 0 0 4px;
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #7A6A5C;
}

.svc-win__title {
	margin: 0 0 6px;
	font: 600 22px/1.25 Poppins, system-ui, sans-serif;
	color: #2A1A12;
}

.svc-win__line {
	margin: 0 0 20px;
	font-size: 14.5px;
	line-height: 1.5;
	color: #5B4A3D;
}

.svc-win--win .svc-win__line,
.svc-win--more .svc-win__line { font-weight: 700; color: #1D7A5A; }

.svc-win__ok {
	display: block;
	width: 100%;
	background: #772613 !important;
	color: #F7F1E8 !important;
	border: 0 !important;
	border-radius: 8px;
	padding: 13px 18px;
	font: 900 15px Lato, system-ui, sans-serif;
	cursor: pointer;
	min-height: 0;
	box-shadow: none !important;
	transition: background .15s;
}

.svc-win__ok:hover { background: #5A1C0E !important; color: #F7F1E8 !important; }

@media (max-width: 767px) {
	.svc-win__card { padding: 26px 20px 20px; border-radius: 14px; }
	.svc-win__title { font-size: 19px; }
	.svc-win__line { font-size: 13.5px; }
}

/* The card still appears without the particles. */
@media (prefers-reduced-motion: reduce) {
	.svc-win,
	.svc-win__card {
		transition: none !important;
	}
	.svc-win__pop { display: none; }
}
