/* Promo alpaca bubble: promo code with copy button (single product). */

.card-promo__bubble {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.card-promo__code {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 4px 4px 4px 10px;
	border: 1px dashed var(--color-hill, #6a9a3a);
	border-radius: 999px;
	background: #fff;
	color: var(--color-brand, #2f5d14);
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.card-promo__code:hover,
.card-promo__code:focus-visible {
	background: #eef5df;
	outline: none;
}

.card-promo__code-action {
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--color-hill, #6a9a3a);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0;
	white-space: nowrap;
}

.card-promo__code.is-copied .card-promo__code-action {
	background: var(--color-brand, #2f5d14);
}

@media (max-width: 420px) {
	/* Code is the point of the bubble: keep it visible on phones. */
	.card-promo__bubble {
		display: flex;
		max-width: 8.5rem;
		padding: 6px 8px;
	}

	.card-promo__text {
		font-size: 10px;
	}
}

.card-promo__text { line-height: 1.25; }
.card-promo__off {
	display: block;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.1;
}

.card-promo__bubble {
	transition: opacity 0.28s ease, transform 0.28s ease;
	transform-origin: left center;
}

.card-promo__bubble.is-closing {
	opacity: 0;
	transform: translateX(-8px) scale(0.92);
	pointer-events: none;
}

.card-promo__bubble[hidden] {
	display: none;
}

.card-promo__text {
	padding-right: 18px;
	font-size: 13px;
	font-weight: 800;
}

.card-promo__close {
	position: absolute;
	top: 3px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--color-muted, #7a7a72);
	font: 400 16px/1 system-ui, sans-serif;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.card-promo__close:hover,
.card-promo__close:focus-visible {
	background: rgba(0, 0, 0, .07);
	color: var(--color-brand, #2f5d14);
	outline: none;
}

.card-promo__mascot {
	pointer-events: auto;
	cursor: pointer;
}

/* Draw the cross instead of using the "×" glyph so it sits exactly in the circle. */
.card-promo__close {
	position: absolute;
	font-size: 0;
	line-height: 0;
}

.card-promo__close::before,
.card-promo__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 1.5px;
	border-radius: 1px;
	background: currentColor;
}

.card-promo__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.card-promo__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
