/* COUNTER Race Avatars V2
   The same six race faces used in Rankings, now shown on player profiles.
   Original icons / initials remain if the image cannot load. */
#publicProfileModal .public-avatar.race-avatar,
body[data-profile-kind="player"] #public-profile .profile-avatar-large.race-avatar,
.community-dialog .profile-avatar-large.race-avatar {
  --race-face-row:0%;
  position:relative!important;
  isolation:isolate;
  display:grid!important;
  place-items:center!important;
  flex-shrink:0!important;
  overflow:hidden!important;
  border:1px solid rgba(125,204,232,.54)!important;
  background:linear-gradient(145deg,rgba(24,64,88,.94),rgba(3,19,31,.98))!important;
  box-shadow:inset 0 1px rgba(227,247,255,.14),0 0 0 2px rgba(5,20,30,.70),0 0 24px rgba(37,135,201,.15)!important;
}
#publicProfileModal .public-avatar.race-avatar {
  width:92px!important;
  height:92px!important;
  border-radius:15px!important;
}
body[data-profile-kind="player"] #public-profile .profile-avatar-large.race-avatar,
.community-dialog .profile-avatar-large.race-avatar {
  border-radius:15px!important;
}
#publicProfileModal .public-avatar.race-avatar::before,
body[data-profile-kind="player"] #public-profile .profile-avatar-large.race-avatar::before,
.community-dialog .profile-avatar-large.race-avatar::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:5;
  pointer-events:none;
  background-image:url("https://wstatic-cdn.plaync.com/promo/lineage2/history/2012/lindvior/content4_img2.jpg");
  background-size:600% 600%;
  background-position:100% var(--race-face-row);
  background-repeat:no-repeat;
  border-radius:inherit;
  opacity:0;
}
html.race-portrait-ready #publicProfileModal .public-avatar.race-avatar[data-race]::before,
html.race-portrait-ready body[data-profile-kind="player"] #public-profile .profile-avatar-large.race-avatar[data-race]::before,
html.race-portrait-ready .community-dialog .profile-avatar-large.race-avatar[data-race]::before {
  opacity:1;
}
.race-avatar[data-race="human"]{--race-face-row:0%!important}
.race-avatar[data-race="elf"]{--race-face-row:20%!important}
.race-avatar[data-race="darkelf"]{--race-face-row:40%!important}
.race-avatar[data-race="orc"]{--race-face-row:60%!important}
.race-avatar[data-race="dwarf"]{--race-face-row:80%!important}
.race-avatar[data-race="kamael"]{--race-face-row:100%!important}
#publicProfileCard[data-race-rank="1"] .public-avatar.race-avatar {
  border-color:rgba(235,198,124,.86)!important;
  box-shadow:0 0 0 2px rgba(61,42,13,.72),0 0 23px rgba(204,157,71,.25)!important;
}
#publicProfileCard[data-race-rank="2"] .public-avatar.race-avatar {
  border-color:rgba(198,225,240,.80)!important;
  box-shadow:0 0 0 2px rgba(30,53,66,.74),0 0 20px rgba(178,207,225,.20)!important;
}
#publicProfileCard[data-race-rank="3"] .public-avatar.race-avatar {
  border-color:rgba(208,145,101,.77)!important;
  box-shadow:0 0 0 2px rgba(61,35,18,.72),0 0 20px rgba(208,128,81,.16)!important;
}
.public-race-tag {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  gap:6px;
  padding:5px 9px;
  margin-top:10px;
  border:1px solid rgba(117,198,232,.30);
  border-radius:7px;
  background:rgba(7,33,51,.78);
  color:#bce9fb;
  font:800 10px/1.15 Arial,sans-serif;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.public-race-tag::before {content:"◆";font-size:8px;color:#e3c081;}
body[data-profile-kind="player"] #public-profile .profile-identity .public-race-tag {
  margin-top:8px;
}
@media(max-width:720px) {
  #publicProfileModal .public-avatar.race-avatar{
    width:68px!important;
    height:68px!important;
    border-radius:13px!important;
  }
  .public-race-tag {font-size:9px;letter-spacing:.08em;padding:4px 7px;margin-top:7px;}
}
@media(prefers-reduced-motion:reduce) {
  #publicProfileModal .public-avatar.race-avatar,
  body[data-profile-kind="player"] .profile-avatar-large.race-avatar {
    animation:none!important;
    transition:none!important;
  }
}
