/* ==========================================================
   AMAZON LIVE WISHLIST MODULE
   Mount: #livewishlist-module
   Completely isolated from wishlist-module and shopping-module.
   ========================================================== */

#livewishlist-module .livewishlist-wrapper {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin: 30px auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
}

#livewishlist-module .livewishlist-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 18px;
  line-height: 1.2;
  color: #333;
}

#livewishlist-module .livewishlist-subtitle {
  margin: 0 0 13px;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

#livewishlist-module .livewishlist-dynamic-area,
#livewishlist-module .livewishlist-carousel-block {
  width: 100%;
}

#livewishlist-module .livewishlist-carousel-shell {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
}

/*
 * Mirrors the proven Support&Shop shopping-module retailer carousel:
 * three 140px cards on desktop, three 100px cards on mobile, a 15px/12px
 * flex gap and native horizontal scrolling/swiping.
 */
#livewishlist-module .livewishlist-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 25px;
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#livewishlist-module .livewishlist-viewport::-webkit-scrollbar {
  height: 8px;
}

#livewishlist-module .livewishlist-viewport::-webkit-scrollbar-track {
  background: transparent;
}

#livewishlist-module .livewishlist-viewport::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

#livewishlist-module .livewishlist-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 15px;
  justify-content: flex-start;
  width: auto;
  max-width: calc(140px * 3 + 30px);
}

#livewishlist-module .livewishlist-product {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 140px;
  color: #333;
  text-decoration: none;
  text-align: center;
}

#livewishlist-module .livewishlist-product-link,
#livewishlist-module .livewishlist-product-link:hover,
#livewishlist-module .livewishlist-product-link:focus,
#livewishlist-module .livewishlist-product-link:active,
#livewishlist-module .livewishlist-product-link:visited {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none !important;
}

#livewishlist-module .livewishlist-product-link .livewishlist-price,
#livewishlist-module .livewishlist-product-link:hover .livewishlist-price,
#livewishlist-module .livewishlist-product-link:focus .livewishlist-price,
#livewishlist-module .livewishlist-product-link:active .livewishlist-price {
  text-decoration: none !important;
}

#livewishlist-module .livewishlist-product:hover,
#livewishlist-module .livewishlist-product:focus,
#livewishlist-module .livewishlist-product:focus-visible,
#livewishlist-module .livewishlist-product:hover .livewishlist-price,
#livewishlist-module .livewishlist-product:focus .livewishlist-price,
#livewishlist-module .livewishlist-product:focus-visible .livewishlist-price {
  text-decoration: none !important;
}

#livewishlist-module .livewishlist-image-frame {
  display: block;
  width: 140px;
  height: 140px;
  padding: 3px;
  border-radius: 10px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #ff7b00, #ff0095);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#livewishlist-module .livewishlist-image-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 7px;
  box-sizing: border-box;
  background: #fff;
  padding: 8px;
}

#livewishlist-module .livewishlist-image-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#livewishlist-module .livewishlist-product:hover .livewishlist-image-frame,
#livewishlist-module .livewishlist-product:focus-visible .livewishlist-image-frame {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

#livewishlist-module .livewishlist-price {
  display: block;
  margin-top: 8px;
  min-height: 20px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 140px;
}

/* The reference shopping retailer carousel uses native scrolling, not arrows. */
#livewishlist-module .livewishlist-nav {
  display: none !important;
}

#livewishlist-module .button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 72%;
  margin: 4px 0 10px;
  padding: 5px 32px 5px 5px;
  border-radius: 40px;
  background: linear-gradient(135deg, #ff7b00, #ff0095);
  color: #fff;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#livewishlist-module .button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#livewishlist-module .button .wishlist-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

#livewishlist-module .button span {
  width: 100%;
  text-align: center;
}

#livewishlist-module .livewishlist-watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 4px;
  color: #111;
  font-size: clamp(15px, 4vw, 19px);
  line-height: 1.2;
  text-decoration: none;
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

#livewishlist-module .livewishlist-watch-link:hover,
#livewishlist-module .livewishlist-watch-link:focus-visible {
  color: #333;
  text-decoration: none;
  transform: translateY(-1px) scale(1.025);
  opacity: 0.92;
}

#livewishlist-module .livewishlist-prime-link {
  display: block;
  margin: 7px 0 2px;
  color: #555;
  font-size: 12px;
  text-decoration: none;
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

#livewishlist-module .livewishlist-prime-link:hover,
#livewishlist-module .livewishlist-prime-link:focus-visible {
  text-decoration: none;
  transform: translateY(-1px) scale(1.025);
  opacity: 0.92;
}

#livewishlist-module .livewishlist-loading {
  width: 100%;
  margin-bottom: 17px;
}

#livewishlist-module .livewishlist-loading-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

#livewishlist-module .livewishlist-loading-tile {
  display: block;
  aspect-ratio: 1 / 1;
  padding: 4px;
  border-radius: 10px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff7b00, #ff0095) border-box;
  border: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

#livewishlist-module .livewishlist-loading-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.055),
    transparent
  );
  transform: translateX(-100%);
  animation: livewishlist-shimmer 1.2s infinite;
}

#livewishlist-module .livewishlist-loading-text {
  margin-top: 9px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

@keyframes livewishlist-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 480px) {
  #livewishlist-module .livewishlist-wrapper {
    max-width: 100%;
    padding: 20px 15px;
  }

  #livewishlist-module .livewishlist-title {
    gap: 5px;
    font-size: 17px;
  }

  #livewishlist-module .livewishlist-track {
    gap: 12px;
    max-width: calc(100px * 3 + 24px);
  }

  #livewishlist-module .livewishlist-product {
    width: 100px;
  }

  #livewishlist-module .livewishlist-image-frame {
    width: 100px;
    height: 100px;
    padding: 3px;
    border-radius: 8px;
  }

  #livewishlist-module .livewishlist-image-inner {
    padding: 5px;
    border-radius: 5px;
  }

  #livewishlist-module .livewishlist-price {
    max-width: 100px;
    font-size: 10px;
  }

  #livewishlist-module .button {
    width: 92%;
    padding: 5px 20px 5px 5px;
    font-size: 13px;
  }

  #livewishlist-module .livewishlist-watch-link {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #livewishlist-module *,
  #livewishlist-module *::before,
  #livewishlist-module *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Wishlist Spotlight Mode ── */

/* Base transition so the glow fades OUT smoothly too */
#livewishlist-module .livewishlist-wrapper {
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#livewishlist-module .livewishlist-wrapper.wishlist-spotlight {
  position: relative;
  z-index: 1001;
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.98),
    0 0 80px rgba(255, 123, 0, 0.5),
    0 0 140px rgba(255, 0, 149, 0.18),
    0 30px 80px rgba(0, 0, 0, 0.35);
}

/* Slower, softer rotating starburst sparkles */
@keyframes wishlistSparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(90deg);
  }
}

#livewishlist-module .wishlist-sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  animation: wishlistSparkle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
}

#livewishlist-module .wishlist-sparkle::before,
#livewishlist-module .wishlist-sparkle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #ffd700 30%,
    #fff 50%,
    #ffd700 70%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
  border-radius: 2px;
}

#livewishlist-module .wishlist-sparkle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Slower, gentler one-shot pulse */
@keyframes wishlistPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 123, 0, 0.45); }
  60%  { transform: scale(1.04); box-shadow: 0 0 0 24px rgba(255, 123, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 123, 0, 0); }
}

#livewishlist-module .livewishlist-wrapper .button.wishlist-pulse {
  animation: wishlistPulse 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1;
}

@media (max-width: 480px) {
  #livewishlist-module .livewishlist-wrapper.wishlist-spotlight {
    transform: none;
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.98),
      0 0 40px rgba(255, 123, 0, 0.45),
      0 0 70px rgba(255, 0, 149, 0.15),
      0 15px 40px rgba(0, 0, 0, 0.3);
    margin-left: auto;
    margin-right: auto;
    width: auto;
    max-width: none;
  }
}

