/* Favourites (src/util/Favourites.class.php): the heart on tiles and on the card page, and the Favourites tab.
   The heart: a white circle in a corner of the picture, 44 px to tap, purple line when off, filled purple when on. */
.fav-heart {
  position: absolute; z-index: 2;
  display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: #fff; color: var(--brand, #642d91);
  box-shadow: 0 1px 3px rgba(31, 31, 39, .25);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.fav-heart svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-heart.is-on svg { fill: currentColor; }
.fav-heart:hover { background: var(--tint, #f4f0f9); }
.fav-heart:focus-visible { outline: 3px solid var(--brand, #642d91); outline-offset: 2px; }
.fav-heart[aria-busy="true"] { opacity: .6; cursor: progress; }
.fav-heart--tile { right: 8px; bottom: 8px; }
.fav-heart--page { right: 12px; top: 12px; width: auto; gap: 6px; padding: 0 16px 0 12px; border-radius: 22px; }
.fav-word { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--brand, #642d91); }

/* the card page: the heart sits on the picture box, which is as wide as the picture */
.product_image_wrap.fav-host { position: relative; display: block; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }

/* the Favourites tab: the Saved projects cards (body also has .my-saved-projects), Personalise and Remove */
.fav-actions form { margin: 0; }
.fav-actions .saved_card_continue { cursor: pointer; font-family: inherit; }
.fav-list[hidden], #fav-empty[hidden] { display: none !important; }

/* After a save (js/favourites.js): the header heart's number, the flying heart, one pulse, and the message.
   The number has the Basket badge's look; it hides at 0. */
.header__favourites { position: relative; }
.header__favourites .fav-count {
  position: absolute; top: 0; left: 50%; margin-left: 4px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #f02849; color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; text-align: center;
}
.header__favourites .fav-count[hidden] { display: none; }
.fav-pulse svg { -webkit-animation: fav-pulse .45s ease-out 2; animation: fav-pulse .45s ease-out 2; }
@-webkit-keyframes fav-pulse { 50% { -webkit-transform: scale(1.35); transform: scale(1.35); } }
@keyframes fav-pulse { 50% { -webkit-transform: scale(1.35); transform: scale(1.35); } }
.fav-fly {
  position: fixed; z-index: 1001; width: 28px; height: 28px; pointer-events: none; color: var(--brand, #642d91);
  -webkit-transition: -webkit-transform .7s cubic-bezier(.4, 0, .2, 1); transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}
.fav-fly svg { display: block; width: 28px; height: 28px; fill: currentColor; stroke: none; }
.fav-msg {
  position: fixed; z-index: 950; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 420px; box-sizing: border-box;
  display: -webkit-box; display: -ms-flexbox; display: flex; gap: 12px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid #d9cfe6;
  box-shadow: 0 6px 24px rgba(31, 31, 39, .18); color: #1f1f27; font-size: 16px; line-height: 22px;
  opacity: 0; visibility: hidden; -webkit-transform: translate(-50%, 16px); transform: translate(-50%, 16px);
  -webkit-transition: opacity .25s, visibility .25s, -webkit-transform .25s; transition: opacity .25s, visibility .25s, transform .25s;
}
.fav-msg.is-shown { opacity: 1; visibility: visible; -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }
.fav-msg-heart { -ms-flex-negative: 0; flex-shrink: 0; color: var(--brand, #642d91); }
.fav-msg-heart svg { display: block; fill: currentColor; }
.fav-msg-text { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -ms-flex-direction: column; flex-direction: column; gap: 2px; }
.fav-msg-text span { font-size: 15px; color: #4a4a55; }
.fav-msg-text a { margin-top: 6px; font-weight: 700; color: var(--brand, #642d91); text-decoration: underline; min-height: 24px; }
@media (prefers-reduced-motion: reduce) { .fav-msg { -webkit-transition: none; transition: none; } }
