/* Wishlist: the saved heart, the header count (also on phones) and the Wishlist page. */

/* The heart turns red and fills when the product is saved; tapping it again clears it. */
.insaf-wish.is-saved { color: var(--insaf-red); }
.insaf-wish.is-saved svg { fill: currentColor; }
.insaf-product-card__action.insaf-wish.is-saved:hover, .insaf-product-card__action.insaf-wish.is-saved:focus-visible { color: var(--insaf-red); background: #fff; }
.insaf-wish.is-pop svg { animation: insaf-wish-pop .32s ease-out; }
@keyframes insaf-wish-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .insaf-wish.is-pop svg { animation: none; } }
/* On a touch screen a tap leaves ":hover" stuck on the button (product-system.css makes it dark green with a white icon), so the heart would
   look wrong after being tapped. Touch screens get the plain look back. */
@media (hover: none) {
	.insaf-product-card__action.insaf-wish:hover { color: var(--insaf-ink); background: #fff; }
	.insaf-product-card__action.insaf-wish.is-saved:hover { color: var(--insaf-red); }
}

/* The small message ("Saved to your wishlist. View wishlist"): dark, readable, above the phone bottom bar, never blocks a tap. */
.insaf-wish-toast { position: fixed; z-index: 65; right: 16px; bottom: 24px; left: 16px; width: fit-content; max-width: min(420px, calc(100vw - 32px)); margin-inline: auto; padding: 12px 18px; border-radius: 10px; color: #fff; background: #1f2a24; box-shadow: 0 6px 22px rgba(0, 0, 0, .25); font-size: 14px; line-height: 1.4; text-align: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; pointer-events: none; }
.insaf-wish-toast.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; pointer-events: auto; }
.insaf-wish-toast a { color: #fff; font-weight: 600; text-decoration: underline; }
@media (max-width: 767px) { .insaf-wish-toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .insaf-wish-toast { transition: none; transform: none; } }

/* Header: the count badge shows only when something is saved ("display" in main.css would otherwise beat [hidden]). */
.insaf-header__wishlist-count[hidden] { display: none; }

/* Phones and small tablets: the heart sits beside the cart (main.css hides the desktop header links there). */
@media (max-width: 991px) {
	.insaf-header__actions > .insaf-header__wishlist { display: inline-flex; padding: 0; }
	.insaf-header__wishlist .insaf-header__action-icon { width: 44px; height: 44px; border: 0; }
	.insaf-header__wishlist .insaf-icon { width: 22px; height: 22px; }
	.insaf-header__wishlist-count { top: 5px; right: 3px; width: 17px; height: 17px; }
}

/* The Wishlist page. */
.insaf-wishlist { max-width: 1320px; margin: 0 auto; padding: 8px 15px 40px; }
.insaf-wishlist__loading { padding: 40px 0; text-align: center; color: var(--insaf-placeholder); }
.insaf-wishlist__loading[hidden], .insaf-wishlist__grid[hidden], .insaf-wishlist__empty[hidden] { display: none; }
.insaf-wishlist__empty { padding: 36px 0 20px; text-align: center; }
.insaf-wishlist__empty h2 { margin: 0 0 8px; font-size: 22px; }
.insaf-wishlist__empty p { margin: 0 0 18px; color: var(--insaf-placeholder); }
/* White on the plain green is only 3.18:1; the darker green is 4.72:1 (WCAG AA for text). */
.insaf-wishlist__shop { display: inline-block; padding: 12px 26px; border-radius: 50px; color: #fff; background: var(--insaf-green-dark); font-weight: 600; text-decoration: none; }
.insaf-wishlist__shop:hover, .insaf-wishlist__shop:focus-visible { background: var(--insaf-green-deeper); }
