/* Reuse the heart assets already shipped in nop's Ionicons library. */
:root { --lea-favorite-red: #d32f2f; }
.lea-action-favorites[hidden] { display: none; }
.lea-icon-favorites {
  background: currentColor;
  transform: scale(1.18);
  mask: url('/lib_npm/ionicons/png/512/ios7-heart.png') center / contain no-repeat;
  -webkit-mask: url('/lib_npm/ionicons/png/512/ios7-heart.png') center / contain no-repeat;
}
.lea-action-badge.lea-favorites-qty {
  padding: 0 4px;
  background: var(--lea-favorite-red);
  color: var(--lea-surface-plain);
}
@media (max-width: 1000px) {
  .lea-search-open .lea-action-favorites { display: none; }
}
.lea-favorite,
.picture .lea-favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--lea-accent-gold-soft, #d4a866);
  border-radius: 14px;
  background: var(--lea-surface-plain, #fff);
  color: var(--lea-ink-primary, #201430);
  font: 600 14px/1.2 var(--lea-font-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
}
.lea-favorite__icon {
  display: block;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  background: var(--lea-accent-purple, #82729d);
  mask: url('/lib_npm/ionicons/png/512/ios7-heart.png') center / contain no-repeat;
  -webkit-mask: url('/lib_npm/ionicons/png/512/ios7-heart.png') center / contain no-repeat;
}
/* Cards keep the existing translucent circle; only the heart changes color. */
.lea-favorite--card[aria-pressed="false"] .lea-favorite__icon {
  position: relative;
  background: var(--lea-surface-plain, #fff);
}
/* Native outline over the white fill: a fine red contour with no shadow. */
.lea-favorite--card[aria-pressed="false"] .lea-favorite__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--lea-favorite-red);
  mask: url('/lib_npm/ionicons/png/512/ios7-heart-outline.png') center / contain no-repeat;
  -webkit-mask: url('/lib_npm/ionicons/png/512/ios7-heart-outline.png') center / contain no-repeat;
}
.lea-favorite[aria-pressed="true"] .lea-favorite__icon {
  background: var(--lea-favorite-red);
  opacity: 1;
}
.lea-favorite:focus-visible { outline: 2px solid var(--lea-favorite-red); outline-offset: 3px; }
.lea-favorite:disabled { cursor: wait; }
.lea-favorite[hidden] { display: none; }
.product-item .picture { position: relative; }
/* Card images use z-index 2; keep the action above them within the picture layer. */
.picture .lea-favorite--card {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 0;
  border-radius: 50%;
  /* 36px visible circle inside the unchanged 44px touch target. */
  background: radial-gradient(circle 18px at center, color-mix(in srgb, var(--lea-surface-plain, #fff) 60%, transparent) 97%, transparent 100%);
  border: 0;
}
.lea-share-links--pdp { flex-wrap: wrap; }
.lea-favorite--detail {
  position: relative;
  width: 48px;
  flex: 0 0 48px;
  height: 44px;
  padding: 0;
  margin-inline-start: 4px;
  border-color: var(--lea-favorite-red);
  transition: background-color 120ms ease, border-color 120ms ease;
}
/* Both detail states use the same slightly larger heart; the frame stays compact. */
.lea-favorite--detail .lea-favorite__icon {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
}
/* PDP favorite uses the same frame height and row gap as the social links. */
.lea-share-links--pdp .lea-favorite--detail {
  height: 43px;
  margin-inline-start: 0;
}
.lea-share-links--pdp .lea-favorite__icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
/* Outline = available to save; solid red = saved. */
.lea-favorite--detail[aria-pressed="false"] .lea-favorite__icon {
  background: var(--lea-favorite-red);
  mask-image: url('/lib_npm/ionicons/png/512/ios7-heart-outline.png');
  -webkit-mask-image: url('/lib_npm/ionicons/png/512/ios7-heart-outline.png');
}
.lea-favorite--detail:focus-visible {
  background: color-mix(in srgb, var(--lea-favorite-red) 7%, var(--lea-surface-plain, #fff));
}
@media (hover: hover) {
  .lea-favorite--detail:not(:disabled):hover {
    border-color: var(--lea-favorite-red);
    background: color-mix(in srgb, var(--lea-favorite-red) 7%, var(--lea-surface-plain, #fff));
  }
}
/* Shared add/remove feedback follows the header geometry on every page. */
.lea-favorite-notice {
  position: fixed;
  top: calc(max(var(--lea-drawer-top-offset, 84px), env(safe-area-inset-top, 0px)) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100; /* Feedback layer below dialogs, clear of the bottom chat launcher. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(640px, calc(100% - 32px));
  min-height: 72px;
  padding: 12px;
  padding-inline-start: 22px;
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  background: var(--lea-feedback-sheen) var(--lea-notification-color, var(--lea-feedback-info));
  color: #fff;
  box-shadow: var(--lea-feedback-frame);
  font: 700 15px/1.6 var(--lea-font-ui, sans-serif);
}
.lea-favorite-notice[hidden], .lea-favorite-notice button[hidden] { display: none; }
.lea-favorite-notice > span { min-width: 0; color: inherit; overflow-wrap: anywhere; text-align: start; }
/* Reserve the right column for Undo/Retry and Close; only the message wraps. */
.lea-favorite-notice__actions { display: flex; align-items: center; gap: 12px; min-width: 0; margin-inline-start: auto; }
.lea-favorite-notice .lea-favorite-notice__action {
  max-width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--lea-cta-border);
  border-radius: 10px;
  background: var(--lea-cta-bg);
  color: var(--lea-cta-text);
  box-shadow: var(--lea-cta-shadow);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lea-favorite-notice__undo::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-inline-end: 8px;
  vertical-align: middle;
  background: currentColor;
  mask: url('/lib_npm/ionicons/png/512/ios7-undo.png') center / contain no-repeat;
  -webkit-mask: url('/lib_npm/ionicons/png/512/ios7-undo.png') center / contain no-repeat;
}
.lea-favorite-notice button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) {
  .lea-favorite-notice .lea-favorite-notice__action:hover { background-color: var(--lea-cta-bg-hover); border-color: var(--lea-cta-border-hover); box-shadow: var(--lea-cta-shadow-hover); }
}
/* Keep narrow phones readable without shrinking text or the 44px controls. */
@media (max-width: 480px) {
  .lea-favorite-notice { gap: 8px; padding-inline: 12px; }
  .lea-favorite-notice__actions { gap: 8px; }
  .lea-favorite-notice .lea-favorite-notice__action { padding-inline: 12px; }
}
@media (max-width: 359px) {
  .lea-favorite-notice { width: calc(100% - 24px); padding-inline: 10px; }
}
@media (max-width: 768px) {
  .lea-share-links--pdp { justify-content: center; }
  .lea-favorite--detail { width: 46px; flex-basis: 46px; }
  .lea-share-links--pdp .lea-favorite--detail { height: 41px; }
}
