#itemInfoPopup.itemInfoRarity {
  border-color: var(--item-info-color) !important;
  box-shadow: 0 0 0 1px var(--item-info-soft),
    0 0 18px var(--item-info-glow),
    0 8px 30px rgba(0, 0, 0, .45),
    inset 0 0 22px var(--item-info-soft);
  max-width: min(440px, calc(100vw - 32px));
}
#itemInfoPopup .itemInfoBonus {
  color: var(--item-info-color);
  font-weight: 600;
}
.itemEnchantStat, .itemEnchantSuffix {
  color: #bf8cff !important;
}
#itemInfoPopup .itemInfoStats {
  font-size: 13px;
  line-height: 1.65;
}
#itemInfoPopup .itemInfoName { padding: 0 16px; }
#itemInfoPopup .itemInfoItemFrame {
  width: 64px;
  height: 64px;
  margin: 12px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  box-sizing: border-box;
  border: 1px solid #49394f;
  border-radius: 3px;
  background: #120e19;
  box-shadow: inset 0 1px 0 #ffffff07;
}
#itemInfoPopup .itemInfoItemVisual {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: auto;
}
#itemInfoPopup .itemInfoClose {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--item-info-color);
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
  z-index: 1;
}
#itemInfoPopup .itemInfoClose:hover,
#itemInfoPopup .itemInfoClose:focus-visible {
  background: rgba(255,255,255,.08);
  outline: 1px solid currentColor;
}
.itemInfoSparks {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  color: var(--item-info-color);
}
.itemInfoArc { animation: itemInfoElectricFlash var(--arc-duration) linear var(--arc-delay) infinite; }
.itemInfoArcLine, .itemInfoArcFork { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.itemInfoArcLine { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.itemInfoArcLine.halo { stroke: currentColor; stroke-width: 7; opacity: .22; }
.itemInfoArcLine.color { stroke: currentColor; stroke-width: 1.8; opacity: .95; }
.itemInfoArcLine.core {
  stroke: #eef8ff; stroke-width: .8; opacity: .85;
  stroke-dasharray: 23 77;
  animation: itemInfoElectricFlow var(--arc-duration) linear var(--arc-delay) infinite;
}
.itemInfoSparks.orange .itemInfoArc { animation-name: itemInfoElectricWarm; }
.itemInfoSparks.red .itemInfoArc { animation-name: itemInfoElectricRich; }
@keyframes itemInfoElectricFlash {
  0%, 8% { opacity: 0; }
  12%, 18% { opacity: 1; }
  23% { opacity: .25; }
  28%, 35% { opacity: 1; }
  48%, 100% { opacity: 0; }
}
@keyframes itemInfoElectricWarm {
  0%, 5% { opacity: 0; }
  10%, 24% { opacity: 1; }
  29% { opacity: .3; }
  34%, 46% { opacity: 1; }
  62%, 100% { opacity: 0; }
}
@keyframes itemInfoElectricRich {
  0% { opacity: 0; }
  8%, 24% { opacity: 1; }
  29% { opacity: .35; }
  34%, 55% { opacity: 1; }
  72%, 100% { opacity: 0; }
}

.itemInfoEnergyRim { fill:none; stroke:currentColor; stroke-linecap:round; }
.itemInfoEnergyRim.ambient { stroke-width: 4; opacity: .14; }
@keyframes itemInfoElectricFlow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: -100; } }
#itemInfoPopup.itemInfoRarity[data-item-rarity="blue"] {
  box-shadow: 0 0 0 1px rgba(78,163,255,.3),0 0 15px rgba(78,163,255,.35),0 0 36px rgba(78,163,255,.12),inset 0 0 22px rgba(78,163,255,.06),0 14px 40px rgba(0,0,0,.65);
}
#itemInfoPopup.itemInfoRarity[data-item-rarity="orange"] {
  box-shadow: 0 0 0 1px rgba(255,159,67,.4),0 0 18px rgba(255,159,67,.4),0 0 42px rgba(255,159,67,.16),inset 0 0 26px rgba(255,159,67,.08),0 14px 40px rgba(0,0,0,.65);
}
#itemInfoPopup.itemInfoRarity[data-item-rarity="red"] {
  box-shadow: 0 0 0 1px rgba(255,82,82,.5),0 0 20px rgba(255,82,82,.5),0 0 48px rgba(255,82,82,.22),inset 0 0 30px rgba(255,82,82,.1),0 14px 40px rgba(0,0,0,.65);
}
