/* ==================== VAULT: WISHLIST SYSTEM ==================== */
/* Heart buttons, wishlist tab, social proof */

/* ==================== WISHLIST BUTTON ==================== */
.wishlist-btn {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.wishlist-btn.small {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.wishlist-btn.medium {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.wishlist-btn.large {
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.wishlist-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
}

.wishlist-btn.wishlisted {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.wishlist-btn.wishlisted:hover {
  background: rgba(239, 68, 68, 0.3);
}

.wishlist-icon {
  transition: transform 0.2s ease;
}

.wishlist-btn:active .wishlist-icon,
.wishlist-btn.wishlist-animating .wishlist-icon {
  transform: scale(1.3);
}

/* Animation on toggle */
.wishlist-btn.wishlist-animating {
  animation: wishlist-pop 0.3s ease;
}

@keyframes wishlist-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Wishlist button positioning on cards */
.item-card .wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  opacity: 0;
  transition: all 0.2s ease;
}

.item-card:hover .wishlist-btn,
.item-card .wishlist-btn.wishlisted {
  opacity: 1;
}

/* Carousel items */
.carousel-item .wishlist-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  opacity: 0;
}

.carousel-item:hover .wishlist-btn,
.carousel-item .wishlist-btn.wishlisted {
  opacity: 1;
}

/* ==================== WISHLIST COUNT (SOCIAL PROOF) ==================== */
.wishlist-count-display {
  font-size: 11px;
  color: var(--game-text-dim, #6b7280);
  display: flex;
  align-items: center;
  gap: 4px;
}

.wishlist-count-display::before {
  content: '❤️';
  font-size: 10px;
}

/* In modal */
.modal-wishlist-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--game-text, #e5e5e5);
  margin-top: 8px;
}

/* ==================== WISHLIST TAB ==================== */
.marketplace-tab[data-tab="wishlist"] .wishlist-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 4px;
}

/* ==================== WISHLIST PANEL ==================== */
.wishlist-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--game-text-dim, #6b7280);
  gap: 16px;
}

.wishlist-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(239, 68, 68, 0.2);
  border-top-color: #ef4444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.wishlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.wishlist-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.wishlist-empty-title {
  font-size: 18px;
  color: var(--game-text, #e5e5e5);
  margin: 0 0 8px 0;
}

.wishlist-empty-text {
  font-size: 14px;
  color: var(--game-text-dim, #6b7280);
  margin: 0 0 24px 0;
}

.wishlist-browse-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wishlist-browse-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Wishlist header */
.wishlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--game-border, #2a2a3a);
}

.wishlist-title {
  font-size: 16px;
  color: var(--game-text, #e5e5e5);
  margin: 0;
}

.wishlist-count {
  font-size: 12px;
  color: var(--game-text-dim, #6b7280);
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

/* ==================== WISHLIST GRID ==================== */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* ==================== WISHLIST CARD ==================== */
.wishlist-card {
  background: var(--game-bg-panel, #13131c);
  border: 1px solid var(--game-border, #2a2a3a);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.wishlist-card:hover {
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

/* Rarity borders */
.wishlist-card.rarity-uncommon { border-color: var(--rarity-uncommon, #22c55e); }
.wishlist-card.rarity-rare { border-color: var(--rarity-rare, #3b82f6); }
.wishlist-card.rarity-epic { border-color: var(--rarity-epic, #a855f7); }
.wishlist-card.rarity-legendary { border-color: var(--rarity-legendary, #f59e0b); }
.wishlist-card.rarity-mythic { border-color: var(--rarity-mythic, #ef4444); }

.wishlist-card-artwork {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}

.wishlist-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wishlist-card:hover .wishlist-card-artwork img {
  transform: scale(1.05);
}

/* Price drop badge */
.wishlist-price-drop {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.6); }
}

/* Remove button */
.wishlist-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--game-text-dim, #6b7280);
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-card:hover .wishlist-remove-btn {
  opacity: 1;
}

.wishlist-remove-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border-color: #ef4444;
}

/* Card info */
.wishlist-card-info {
  padding: 12px;
}

.wishlist-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--game-text, #e5e5e5);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wishlist-card-creator {
  font-size: 12px;
  color: var(--game-text-dim, #6b7280);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wishlist-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--game-gold, #d4af37);
}

.wishlist-card-price.free {
  color: #22c55e;
}

.wishlist-old-price {
  font-size: 11px;
  color: var(--game-text-dim, #6b7280);
  text-decoration: line-through;
}

/* Card actions */
.wishlist-card-actions {
  padding: 0 12px 12px;
}

.wishlist-action-btn {
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wishlist-action-btn.buy {
  background: linear-gradient(135deg, var(--game-gold, #d4af37), #b8860b);
  color: var(--game-bg-dark, #0c0c12);
}

.wishlist-action-btn.buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.wishlist-action-btn.owned {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  cursor: default;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
  }
  
  .wishlist-card-info {
    padding: 10px;
  }
  
  .wishlist-card-title {
    font-size: 13px;
  }
  
  .wishlist-btn.small {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  /* Always show wishlist buttons on mobile (no hover) */
  .item-card .wishlist-btn,
  .carousel-item .wishlist-btn {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .wishlist-grid {
    grid-template-columns: 1fr;
  }
  
  .wishlist-card {
    display: flex;
    flex-direction: row;
  }
  
  .wishlist-card-artwork {
    width: 100px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }
  
  .wishlist-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .wishlist-card-actions {
    padding: 0 12px 0 0;
    display: flex;
    align-items: center;
  }
  
  .wishlist-action-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}
