/* ========================================================
   Riftbound TCG — Rarity Effects
   Rarities: common | uncommon | rare | epic | overnumbered
   ======================================================== */

/* ── Rarity badge colors ─────────────────────────────── */

.rb-rarity-badge.rb-rarity-common,
.rb-rarity-common {
  background: linear-gradient(135deg, #f0f0f0, #d8d8d8);
  color: #444;
  border: 1px solid #bbb;
}

.rb-rarity-badge.rb-rarity-uncommon,
.rb-rarity-uncommon {
  background: linear-gradient(135deg, #1a7f6e, #0d5e50);
  color: #fff;
  border: 1px solid #0d5e50;
}

.rb-rarity-badge.rb-rarity-rare,
.rb-rarity-rare {
  background: linear-gradient(135deg, #c0407e, #8B2252);
  color: #fff;
  border: 1px solid #8B2252;
}

.rb-rarity-badge.rb-rarity-epic,
.rb-rarity-epic {
  background: linear-gradient(135deg, #e07820, #a8560e);
  color: #fff;
  border: 1px solid #a8560e;
}

.rb-rarity-badge.rb-rarity-overnumbered,
.rb-rarity-overnumbered {
  background: linear-gradient(135deg, #d4a820, #b8860b, #e8cc50);
  color: #1a1000;
  border: 1px solid #b8860b;
}

/* ── Card image borders ──────────────────────────────── */

.rb-border-common {
  box-shadow: 0 0 0 2px #bbb, 0 4px 12px rgba(0,0,0,.15);
}

.rb-border-uncommon {
  box-shadow: 0 0 0 2px #1a7f6e, 0 0 12px rgba(26,127,110,.4), 0 4px 12px rgba(0,0,0,.15);
}

.rb-border-rare {
  box-shadow: 0 0 0 2px #c0407e, 0 0 16px rgba(192,64,126,.45), 0 4px 12px rgba(0,0,0,.2);
}

.rb-border-epic {
  box-shadow: 0 0 0 2px #e07820, 0 0 18px rgba(224,120,32,.5), 0 4px 16px rgba(0,0,0,.2);
}

.rb-border-overnumbered {
  box-shadow:
    0 0 0 2px #d4a820,
    0 0 20px rgba(212,168,32,.55),
    0 0 40px rgba(212,168,32,.25),
    0 4px 16px rgba(0,0,0,.25);
}

/* ── Shimmer effects on images ───────────────────────── */

.rb-card-img {
  position: relative;
  display: inline-block;
}

/* uncommon – teal shimmer */
.rb-effect-uncommon {
  position: relative;
  overflow: hidden;
}
.rb-effect-uncommon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(26,127,110,.35) 50%,
    transparent 80%
  );
  background-size: 200% 100%;
  animation: rb-shimmer .6s 1;
  border-radius: inherit;
  pointer-events: none;
}

/* rare – pink shimmer */
.rb-effect-rare {
  position: relative;
  overflow: hidden;
}
.rb-effect-rare::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(192,64,126,.40) 50%,
    transparent 80%
  );
  background-size: 200% 100%;
  animation: rb-shimmer .7s 2;
  border-radius: inherit;
  pointer-events: none;
}

/* epic – orange pulse */
.rb-effect-epic {
  animation: rb-fire-pulse 2.5s ease-in-out infinite;
}

/* overnumbered – gold shimmer loop */
.rb-effect-overnumbered {
  position: relative;
  overflow: hidden;
  animation: rb-gold-pulse 3s ease-in-out infinite;
}
.rb-effect-overnumbered::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(212,168,32,.55) 50%,
    transparent 70%
  );
  background-size: 300% 100%;
  animation: rb-gold-wipe 2s linear infinite;
  border-radius: inherit;
  pointer-events: none;
}

/* ── Card stripe colors (wishlist / stock cards) ─────── */

.wl-search-card:has(.rb-rarity-uncommon) .wl-search-stripe {
  background: linear-gradient(135deg, #0d5e50, #1a7f6e, #24a88e);
}

.wl-search-card:has(.rb-rarity-rare) .wl-search-stripe {
  background: linear-gradient(135deg, #5c1a38, #8B2252, #c0407e);
}

.wl-search-card:has(.rb-rarity-epic) .wl-search-stripe {
  background: linear-gradient(135deg, #5a2a00, #a8560e, #e07820);
}

.wl-search-card:has(.rb-rarity-overnumbered) .wl-search-stripe {
  background: linear-gradient(135deg, #6b4e10, #b8860b, #d4a820, #e8cc50);
}

/* ── Badge backgrounds via :has() ───────────────────── */

.wl-search-card:has(.rb-rarity-uncommon) .wl-search-badge-rarity {
  background: linear-gradient(135deg, #1a7f6e, #0d5e50);
  color: #fff;
}
.wl-search-card:has(.rb-rarity-rare) .wl-search-badge-rarity {
  background: linear-gradient(135deg, #c0407e, #8B2252);
  color: #fff;
}
.wl-search-card:has(.rb-rarity-epic) .wl-search-badge-rarity {
  background: linear-gradient(135deg, #e07820, #a8560e);
  color: #fff;
}
.wl-search-card:has(.rb-rarity-overnumbered) .wl-search-badge-rarity {
  background: linear-gradient(135deg, #d4a820, #b8860b, #e8cc50);
  color: #1a1000;
}

/* ── Keyframes ───────────────────────────────────────── */

@keyframes rb-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rb-gold-wipe {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes rb-fire-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #e07820, 0 0 18px rgba(224,120,32,.5); }
  50%       { box-shadow: 0 0 0 3px #e07820, 0 0 28px rgba(224,120,32,.75), 0 0 50px rgba(224,120,32,.3); }
}

@keyframes rb-gold-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #d4a820, 0 0 20px rgba(212,168,32,.55); }
  50%       { box-shadow: 0 0 0 3px #e8cc50, 0 0 35px rgba(212,168,32,.8),  0 0 60px rgba(212,168,32,.3); }
}
