/* TSC Light Favourites - intentionally small and dependency-free */

.woocommerce ul.products li.product,
ul.products li.product {
  position: relative;
}

.tsc-fav-button {
  appearance: none;
  border: 0;
  background: #fff;
  color: #ec5c8f;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.tsc-fav-button:hover,
.tsc-fav-button:focus-visible {
  transform: translateY(-1px) scale(1.03);
  outline: none;
}

.tsc-fav-button.is-loading {
  opacity: .65;
  pointer-events: none;
}

.tsc-fav-button__heart::before,
.tsc-fav-header-link__heart::before {
  content: "♡";
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.tsc-fav-button.is-active .tsc-fav-button__heart::before,
.tsc-fav-header-link__heart::before {
  content: "♥";
}

.tsc-fav-button--loop {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 8;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
}

.tsc-fav-button--loop .tsc-fav-button__heart::before {
  font-size: 20px;
}

.tsc-fav-single-wrap {
  margin: 12px 0 14px;
}

.tsc-fav-button--single,
.tsc-fav-button--shortcode {
  min-height: 42px;
  padding: 11px 18px;
  border: 1px solid #e8dce4;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.tsc-fav-button--single.is-active,
.tsc-fav-button--shortcode.is-active {
  border-color: #ec5c8f;
  color: #ec5c8f;
  background: #fff7fa;
}

.tsc-fav-header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ec5c8f;
  text-decoration: none;
  vertical-align: middle;
}

.tsc-fav-header-link:hover,
.tsc-fav-header-link:focus-visible {
  color: #ec5c8f;
  text-decoration: none;
}

.tsc-fav-header-link__heart::before {
  font-size: 25px;
}

.tsc-fav-header-link__count {
  position: absolute;
  top: 1px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef3f6b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.tsc-favourites-page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
}

.tsc-favourites-page__header h2 {
  margin: 0;
}

.tsc-favourites-page__header p {
  margin: 0;
  color: #666;
}

.tsc-fav-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.tsc-fav-card-actions .button,
.tsc-fav-primary-link {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.tsc-fav-download,
.tsc-fav-primary-link {
  background: #ec5c8f !important;
  border-color: #ec5c8f !important;
  color: #fff !important;
}

.tsc-fav-remove {
  background: #fff !important;
  border: 1px solid #e8dce4 !important;
  color: #555 !important;
}

.tsc-fav-remove.is-loading {
  opacity: .65;
  pointer-events: none;
}

.tsc-fav-removing {
  opacity: 0;
  transform: scale(.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tsc-favourites-pagination {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 26px 0 0;
}

.tsc-favourites-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid #e8dce4;
  border-radius: 7px;
  color: #555;
  text-decoration: none;
}

.tsc-favourites-pagination a.is-current {
  background: #ec5c8f;
  border-color: #ec5c8f;
  color: #fff;
}

.tsc-fav-empty,
.tsc-fav-notice {
  padding: 28px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.tsc-fav-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 99999;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(20, 20, 20, .92);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tsc-fav-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 768px) {
  .tsc-favourites-page__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tsc-fav-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Font Awesome-style heart button polish */
.tsc-fav-button--loop {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(236, 92, 143, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(40, 25, 45, .14);
  backdrop-filter: blur(4px);
}

.tsc-fav-button--loop:hover,
.tsc-fav-button--loop:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 24px rgba(236, 92, 143, .22);
}

.tsc-fav-button__heart,
.tsc-fav-header-link__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Disable the old text/SVG pseudo-heart and let Font Awesome render the icon */
.tsc-fav-button__heart::before,
.tsc-fav-header-link__heart::before,
.tsc-fav-button.is-active .tsc-fav-button__heart::before {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

.tsc-fav-button__heart .fa-heart,
.tsc-fav-header-link__heart .fa-heart {
  display: inline-block;
  color: #ec5c8f;
  font-size: 22px;
  line-height: 1;
}

.tsc-fav-button--loop .fa-heart {
  font-size: 23px;
}

.tsc-fav-button--single .fa-heart,
.tsc-fav-button--shortcode .fa-heart {
  font-size: 18px;
}

.tsc-fav-header-link__heart .fa-heart {
  font-size: 25px;
}

.tsc-fav-button--loop.is-active {
  border-color: rgba(236, 92, 143, .18);
  background: #fff;
}


/* Header placement beside the search bar */
.tsc-favourites-header-target {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 48px;
}

.tsc-favourites-header-target .tsc-fav-header {
  display: flex;
  align-items: center;
}

.tsc-fav-header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(40, 25, 45, .12);
  text-decoration: none;
}

.tsc-fav-header-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(236, 92, 143, .18);
}

.tsc-fav-header-link__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tsc-fav-header-link__heart .fa-heart {
  color: #ec5c8f;
  font-size: 24px;
  line-height: 1;
}

.tsc-fav-header-link__count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef3f7f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 63, 127, .35);
}

.tsc-fav-header-link__label {
  display: none;
}

/* =========================================
   Contextual favorites notifications
   ========================================= */

/* Make sure the catalogue image area can hold the centered toast */
.woocommerce ul.products li.product .product-thumbnail-wrapper,
ul.products li.product .product-thumbnail-wrapper,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
ul.products li.product .woocommerce-LoopProduct-link {
  position: relative;
}

/* Catalog/category/front-page toast: centered over product image */
.tsc-fav-card-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;

  transform: translate(-50%, -50%) scale(.96);
  opacity: 0;
  pointer-events: none;

  max-width: calc(100% - 28px);
  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(20, 20, 20, .88);
  color: #fff;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;

  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: opacity 150ms ease, transform 150ms ease;
}

.tsc-fav-card-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Detail-page / fallback toast: top of page, away from bottom ads */
.tsc-fav-page-toast {
  position: fixed;
  left: 50%;
  top: 92px;
  z-index: 100000;

  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;

  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 999px;

  background: rgba(20, 20, 20, .92);
  color: #fff;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;

  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tsc-fav-page-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Logged-in admins have the WP admin bar, so lower the top toast slightly */
body.admin-bar .tsc-fav-page-toast {
  top: 124px;
}

/* Disable the old bottom toast style if any old element remains */
.tsc-fav-toast {
  display: none !important;
}

/* =========================================
   Logged-out save-to-favorites tooltip
   ========================================= */

.tsc-fav-auth-tooltip {
  z-index: 100000;
  width: min(330px, calc(100vw - 32px));
  padding: 16px 18px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  color: #333;
  box-shadow: 0 18px 55px rgba(60, 35, 75, .28);
  border: 1px solid rgba(236, 92, 143, .20);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tsc-fav-auth-tooltip.is-visible {
  opacity: 1;
}

.tsc-fav-auth-tooltip--card {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(.96);
}

.tsc-fav-auth-tooltip--card.is-visible {
  transform: translate(-50%, -50%) scale(1);
}

.tsc-fav-auth-tooltip--page {
  position: fixed;
  transform: translateX(-50%) translateY(-6px) scale(.98);
}

.tsc-fav-auth-tooltip--page.is-visible {
  transform: translateX(-50%) translateY(0) scale(1);
}

.tsc-fav-auth-tooltip::before {
  content: "";
  position: absolute;
  top: -9px;
  right: 28px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, .98);
  border-left: 1px solid rgba(236, 92, 143, .20);
  border-top: 1px solid rgba(236, 92, 143, .20);
  transform: rotate(45deg);
}

.tsc-fav-auth-tooltip--card::before {
  top: -9px;
  right: 28px;
}

.tsc-fav-auth-tooltip--page::before {
  top: -9px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) rotate(45deg);
}

.tsc-fav-auth-tooltip__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #999;
  font-size: 20px;
  line-height: 20px;
  cursor: pointer;
}

.tsc-fav-auth-tooltip__close:hover {
  color: #333;
  background: #fff2f7;
}

.tsc-fav-auth-tooltip__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 24px 7px 0;
  color: #ec5c8f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.tsc-fav-auth-tooltip__eyebrow .fa-heart {
  font-size: 14px;
  color: #ec5c8f;
}

.tsc-fav-auth-tooltip__text {
  margin: 0 0 12px;
  color: #3f3f46;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.tsc-fav-auth-tooltip__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.tsc-fav-auth-tooltip__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
}

.tsc-fav-auth-tooltip__link--primary {
  background: #ec5c8f;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(236, 92, 143, .22);
}

.tsc-fav-auth-tooltip__link--primary:hover {
  background: #d94a7f;
  color: #fff !important;
}

.tsc-fav-auth-tooltip__link--secondary {
  background: #fff;
  color: #ec5c8f !important;
  border: 1px solid rgba(236, 92, 143, .32);
}

.tsc-fav-auth-tooltip__link--secondary:hover {
  background: #fff5f9;
  color: #d94a7f !important;
}

@media (max-width: 767px) {
  .tsc-fav-auth-tooltip {
    width: min(300px, calc(100vw - 28px));
    padding: 15px 16px 14px;
  }

  .tsc-fav-auth-tooltip__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tsc-fav-auth-tooltip__link {
    width: 100%;
  }
}