/* Kill sticky hover/focus quirks on phones and after in-site navigations. */

/* Brief pointer-events lock clears Safari sticky :hover (used by nav-refresh.js) */
html.vc-kill-hover,
html.vc-kill-hover * {
  pointer-events: none !important;
}

@media (hover: none), (pointer: coarse) {
  /* Tailwind utility hovers used across the site */
  .hover\:border-primary\/40:hover {
    border-color: var(--border, rgba(255, 255, 255, 0.1)) !important;
  }

  .hover\:border-primary\/60:hover {
    border-color: rgba(94, 184, 255, 0.4) !important;
  }

  .hover\:bg-card\/80:hover {
    background-color: var(--card, rgba(18, 28, 43, 0.96)) !important;
  }

  .hover\:text-foreground:hover {
    color: var(--muted-foreground, rgba(146, 164, 184, 1)) !important;
  }

  .group:hover .group-hover\:translate-x-0\.5,
  .group:hover .group-hover\:-translate-y-0\.5 {
    transform: none !important;
  }

  /* Only neutralize sticky :hover — never :active (that killed press flash on legendary) */
  a.group.relative.block:hover:not(.vc-press),
  .vc-card:hover:not(.vc-press),
  a.inline-flex:hover:not(.vc-press) {
    transform: none !important;
    filter: none !important;
  }

  a.group.relative.block:hover:not(.vc-press),
  .vc-card:hover:not(.vc-press) {
    box-shadow: none !important;
  }

  a.vc-rarity-legendary.group.relative.block:hover:not(.vc-press) {
    transform: none !important;
    filter: none !important;
    box-shadow: 0 0 0 1px rgba(212, 164, 64, 0.08) !important;
    border-color: rgba(212, 164, 64, 0.34) !important;
  }

  a.vc-rarity-legendary.group.relative.block:hover:not(.vc-press)::before {
    box-shadow: 0 0 18px 1px rgba(212, 164, 64, 0.45) !important;
    width: 3px !important;
  }

  section[aria-labelledby="sim-title"] button.hover\:border-primary\/40:hover {
    border-color: var(--border, rgba(255, 255, 255, 0.1)) !important;
  }

  section[aria-labelledby="sim-title"] button[aria-pressed="true"].hover\:border-primary\/40:hover,
  section[aria-labelledby="sim-title"] button[aria-pressed="true"]:active {
    border-color: var(--primary, #5eb8ff) !important;
  }
}

/* Press feedback via JS class — short flash even on quick taps */
a.group.relative.block.vc-press,
a.vc-mod-card:not([class*="vc-rarity-"]).vc-press,
.vc-card.vc-press {
  transition-duration: 70ms;
  transform: translateY(-4px) scale(0.99) !important;
  border-color: rgba(94, 184, 255, 0.65) !important;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(94, 184, 255, 0.28),
    0 0 32px rgba(94, 184, 255, 0.22) !important;
  filter: brightness(1.08) !important;
}

a.group.relative.block.vc-press::before,
a.vc-mod-card:not([class*="vc-rarity-"]).vc-press::before {
  width: 3px !important;
  opacity: 1 !important;
  box-shadow: 0 0 22px 2px rgba(94, 184, 255, 0.7) !important;
}

a.group.relative.block.vc-press .size-4,
a.vc-mod-card:not([class*="vc-rarity-"]).vc-press .size-4 {
  transform: translate(2px, -2px);
}

a.vc-mod-card.vc-press .vc-mod-cover img {
  transform: scale(1.06);
}

a.vc-rarity-uncommon.vc-mod-card.vc-press {
  border-color: rgba(94, 207, 138, 0.72) !important;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(94, 207, 138, 0.3),
    0 0 34px rgba(94, 207, 138, 0.28) !important;
}
a.vc-rarity-uncommon.vc-mod-card.vc-press::before {
  box-shadow: 0 0 22px 2px rgba(94, 207, 138, 0.7) !important;
}

a.vc-rarity-rare.vc-mod-card.vc-press {
  border-color: rgba(94, 184, 255, 0.72) !important;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(94, 184, 255, 0.3),
    0 0 34px rgba(94, 184, 255, 0.28) !important;
}

a.vc-rarity-epic.vc-mod-card.vc-press {
  border-color: rgba(176, 124, 255, 0.75) !important;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(176, 124, 255, 0.32),
    0 0 36px rgba(176, 124, 255, 0.3) !important;
}
a.vc-rarity-epic.vc-mod-card.vc-press::before {
  box-shadow: 0 0 22px 2px rgba(176, 124, 255, 0.7) !important;
}

a.vc-rarity-legendary.group.relative.block.vc-press,
a.vc-rarity-legendary.vc-mod-card.vc-press {
  transform: translateY(-4px) scale(0.99) !important;
  border-color: rgba(212, 164, 64, 0.78) !important;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(212, 164, 64, 0.35),
    0 0 36px rgba(212, 164, 64, 0.32) !important;
  filter: brightness(1.08) !important;
}

a.vc-rarity-legendary.group.relative.block.vc-press::before,
a.vc-rarity-legendary.vc-mod-card.vc-press::before {
  width: 3px !important;
  opacity: 1 !important;
  box-shadow: 0 0 26px 3px rgba(212, 164, 64, 0.7) !important;
}

a.vc-rarity-legendary.group.relative.block.vc-press .size-4,
a.vc-rarity-legendary.vc-mod-card.vc-press .size-4 {
  transform: translate(2px, -2px);
}

a.inline-flex.vc-press {
  filter: brightness(1.08);
}

a.inline-flex.rounded-lg.vc-press {
  transform: translateY(-1px);
  border-color: rgba(94, 184, 255, 0.45) !important;
}

section[aria-labelledby="sim-title"] button.vc-press {
  transform: scale(0.96);
}

section[aria-labelledby="sim-title"] button[aria-pressed="false"].vc-press {
  border-color: rgba(94, 184, 255, 0.4);
}

/* Focus rings only for keyboard, not after every tap */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(94, 184, 255, 0.7);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
