.cw-wishlist-button,
.shop-product-card__wishlist {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--action-size-icon);
	height: var(--action-size-icon);
	padding: 0;
	margin: 0;
	border: 1px solid var(--theme-palette-color-6);
	border-radius: 50%;
	background: var(--theme-palette-color-8);
	color: var(--theme-palette-color-4);
	box-shadow: 0 2px 8px rgb(17 20 19 / 0.04);
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition:
		border-color var(--transition-base, 0.15s ease),
		background-color var(--transition-base, 0.15s ease),
		color var(--transition-base, 0.15s ease),
		transform var(--transition-fast, 0.15s ease);
}

.cw-wishlist-button:active,
.shop-product-card__wishlist:active {
	transform: none;
}

.cw-wishlist-button:focus:not(:focus-visible),
.shop-product-card__wishlist:focus:not(:focus-visible) {
	outline: none;
}

.cw-wishlist-button:focus-visible,
.shop-product-card__wishlist:focus-visible {
	outline: var(--focus-width) solid var(--theme-palette-color-1);
	outline-offset: var(--focus-offset-tight);
}

.cw-wishlist-button__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.cw-wishlist-button__icon svg,
.shop-product-card__wishlist svg {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	stroke: currentColor;
	transition: fill var(--transition-base, 0.15s ease);
}

.cw-wishlist-button__icon--filled {
	display: none;
}

.cw-wishlist-button.is-active .cw-wishlist-button__icon--outline,
.shop-product-card__wishlist.is-active .cw-wishlist-button__icon--outline {
	display: none;
}

.cw-wishlist-button.is-active .cw-wishlist-button__icon--filled,
.shop-product-card__wishlist.is-active .cw-wishlist-button__icon--filled {
	display: inline-flex;
}

.cw-wishlist-button__label {
	display: none;
}

/* The heart itself fills green; the circular surface remains white. */
.cw-wishlist-button .cw-wishlist-button__icon--outline svg,
.shop-product-card__wishlist .cw-wishlist-button__icon--outline svg {
	fill: transparent;
}
.cw-wishlist-button:is(.is-active, :active),
.shop-product-card__wishlist:is(.is-active, :active) {
	border-color: var(--theme-palette-color-2);
	color: var(--theme-palette-color-2);
}
.cw-wishlist-button:is(.is-active, :active) .cw-wishlist-button__icon svg,
.shop-product-card__wishlist:is(.is-active, :active) .cw-wishlist-button__icon svg {
	fill: currentColor;
}

.cw-wishlist-button.is-loading,
.shop-product-card__wishlist.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.cw-wishlist-button.is-error,
.shop-product-card__wishlist.is-error {
	animation: cwWlShake 0.35s ease;
}

@keyframes cwWlShake {
	0%,
	100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-3px);
	}
	75% {
		transform: translateX(3px);
	}
}

/* Failed wishlist requests must remain visible without scrolling the page. */
.cw-wishlist-feedback {
	position: fixed;
	z-index: var(--z-feedback);
	left: 50%;
	bottom: max(20px, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px var(--space-4);
	width: min(620px, calc(100% - 32px));
	padding: var(--space-4);
	border: 1px solid var(--theme-palette-color-6, #ccc);
	border-radius: var(--radius-md, 8px);
	background: var(--theme-palette-color-8, #fff);
	color: var(--theme-palette-color-4, #222);
	box-shadow: 0 4px 24px #0002;
}

.cw-wishlist-feedback span {
	flex: 1 1 100%;
}

.cw-wishlist-feedback button {
	min-height: var(--action-size-standard);
	padding: var(--space-2) var(--space-3);
	border: 1px solid currentColor;
	border-radius: var(--radius-sm, 4px);
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.cw-wishlist-button:hover,
	.shop-product-card__wishlist:hover {
		border-color: var(--theme-palette-color-2);
		color: var(--theme-palette-color-2);
	}
	.cw-wishlist-button:hover .cw-wishlist-button__icon svg,
	.shop-product-card__wishlist:hover .cw-wishlist-button__icon svg {
		fill: currentColor;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cw-wishlist-button__icon svg {
		transition: none;
	}
	.cw-wishlist-button,
	.cw-wishlist-button.is-error,
	.shop-product-card__wishlist,
	.shop-product-card__wishlist.is-error {
		animation: none;
		transition: none;
	}
}
