/* The heart: just the icon, no disc, like the store's other small controls.
   Saved pieces fill in the logo's gold. */
.wishlist-toggle {
  color: var(--color-foreground, #000);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 200ms ease;
}

.wishlist-heart {
  display: block;
  width: 20px;
  height: 20px;
  transition: fill 200ms ease, transform 200ms ease;
}

.wishlist-toggle:hover,
.wishlist-toggle.is-active {
  color: #9d7e27;
}

.wishlist-toggle.is-active .wishlist-heart {
  fill: currentcolor;
}

.wishlist-toggle:active .wishlist-heart {
  transform: scale(0.88);
}

/* On a card: the photo's top right corner; labels hold the top left. The
   button is larger than the heart so that it is easy to tap. */
.wishlist-toggle--card {
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 4px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
}

/* On the product page: a quiet line under the cart button. */
.wishlist-toggle--single {
  display: inline-flex;
  min-height: 44px;
  margin-top: 4px;
  padding: 0;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.9375rem;
}

/* Header and phone menu. */
.site-header__wishlist {
  position: relative;
}

/* A phone's header has no room for it beside the centred logo: the phone menu
   has the link. */
@media (max-width: 749px) {
  .site-header__wishlist {
    display: none;
  }
}

.wishlist-count {
  display: flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  color: var(--color-background, #fff);
  background: var(--color-foreground, #000);
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.wishlist-count[hidden] {
  display: none;
}

.site-header__wishlist .wishlist-count {
  position: absolute;
  top: 4px;
  right: 2px;
}

/* Its own line above the menu's small links. */
.mobile-menu-drawer__footer {
  flex-wrap: wrap;
}

.mobile-menu-drawer__wishlist {
  display: flex;
  margin-bottom: -6px;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

/* The page. */
.wishlist-page__note {
  margin: 0 0 20px;
  color: var(--color-muted, #666);
  font-size: 0.9375rem;
}

.wishlist-page__note a {
  color: var(--color-foreground, #000);
  text-underline-offset: 3px;
}

.wishlist-page__empty {
  display: grid;
  padding: 40px 24px;
  justify-items: center;
  gap: 20px;
  background: var(--color-palette-4, #f8f5f0);
  border-radius: var(--style-card-radius, 0);
  text-align: center;
}

.wishlist-page__empty p {
  max-width: 44ch;
  margin: 0;
}

.wishlist-page__empty[hidden],
.wishlist-page__list[hidden] {
  display: none;
}

/* The message after a tap: a phone has no heart in its header, so this is
   also how people find the list. */
.wishlist-toast {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 360px;
  margin-inline: auto;
  padding: 14px 18px;
  color: var(--color-foreground, #000);
  background: var(--color-background, #fff);
  border: 1px solid var(--color-divider, #e6e1d9);
  border-radius: var(--style-card-radius, 0);
  box-shadow: 0 8px 24px rgb(47 36 20 / 14%);
  font-size: 0.9375rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.wishlist-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.wishlist-toast a {
  margin-inline-start: 6px;
  color: #9d7e27;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .wishlist-heart,
  .wishlist-toast {
    transition: none;
  }
}
