/* tooltip.css – Metin2-ish */

.itip{
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .08s ease, transform .08s ease;

  /* Metin2 vibe */
  max-width: 340px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;

  background: rgba(8, 8, 10, .94);
  border: 1px solid rgba(255, 214, 138, .28); /* warm gold */
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
  color: #f1f1f1;
}

.itip.show{
  opacity: 1;
  transform: translateY(0);
}

/* Title (gold) */
.itip .t{
  text-align: center;
  font-weight: 700;
  color: #f1e6c0; /* galben pal/spălăcit */
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 214, 138, .18);
}

/* Title neon yellow when EXTRA attrs exist */
.itip:has(.bon-extra) .t{
  color: #ffc700; /* galben neon */
}

.itip .bon.bon-extra .b{
  color: #b1dfb5;
  font-weight: 700;
}

.itip .sec.bon.bon-extra{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 214, 138, .14);
}

.itip .bon.bon-extra .b{
  color: #b1dfb5;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
}

.itip .bon .b.neg{ color:#e47875; }
.itip .st-bon.neg{ color:#e47875; }

/* Main area */
.itip .m{
  display: grid;
  gap: 3px;
  text-align: center;
  color: rgba(245,245,245,.92);
}

/* “sections” like ingame separators */
.itip .sec{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 214, 138, .14);
}

/* Stat lines */
.itip .line{
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: baseline;
}

/* Proto green (always): ATK/MAG lines + proto bonuses */
.itip .m,
.itip .line .label,
.itip .line .val,
.itip .bon.bon-proto .b{
  color: #89b88d;
  text-shadow: 0 1px 0 rgba(0,0,0,.75);
}
/* Force negatives red even in proto section */
.itip .bon.bon-proto .b.neg{
  color: #e47875;
}

.itip .line .val{
  font-weight: 600;        /* păstrează claritatea valorii */
}

.itip .label{
  color: rgba(255,255,255,.70);
}

.itip .val{
  color: rgba(255,255,255,.95);
  font-weight: 600;
}

/* Bonuses: vertical, one per row */
.itip .bon{
  display: grid;
  gap: 3px;
  justify-content: center;
  text-align: center;
}

.itip .bon .b{
  white-space: nowrap;
  color: #b7ff8a; /* Metin2 bonus green */
  text-shadow: 0 1px 0 rgba(0,0,0,.7);
  font-weight: 600;
}

.itip .bon .b.rare{
  color: #7fd0ff; /* blue-ish */
}

.itip .bon .b.bad{
  color: #ff7b7b; /* red */
}

.itip .bon .b .n{
  color: inherit; /* same line color */
  font-weight: 600;
}

.itip .bon .b .v{
  color: inherit;
  font-weight: 700;
}

.itip .sec.meta .label{
  color: rgba(255,255,255,.70) !important;
}

.itip .sec.meta .val{
  color: rgba(255,255,255,.95) !important;
  font-weight: 600;
}

/* Sockets */
.itip .sockets{
  display: grid;
  gap: 4px;
  justify-content: center;
}

.itip .sock{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.85);
}

.itip .sock img{
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  opacity: .95;
}

/* Optional warn */
.itip .warn{
  margin-top: 6px;
  text-align: center;
  color: #ffd38a;
  font-size: 12px;
  opacity: .95;
}

/* container */
.itip .sec.sockets{
  display: grid;
  gap: 8px;
  justify-content: start;     /* nu centrat */
  text-align: left;          /* text în stânga */
}

/* slot gol: doar icon, centrat */
.itip .sock.sock-empty{
  display: flex;
  justify-content: center;
}

/* slot plin: icon stânga, text dreapta */
.itip .sock.sock-filled{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

/* tile 32x32 */
.itip .sockbox{
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.itip .sockbox .slotbg{
  position: absolute;
  inset: 0;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  opacity: .95;
}

.itip .sockbox .stone{
  position: absolute;
  left: 2px;
  top: 2px;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}

/* text dreapta */
.itip .socktxt{
  display: grid;
  gap: 2px;
  align-content: center;
  min-width: 140px;          /* tooltip se lărgește când trebuie */
  max-width: 280px;
}

.itip .socktxt .st-name{
  font-size: 13px;
  font-weight: 600;
  color: rgba(245,245,245,.92);
  text-shadow: 0 1px 0 rgba(0,0,0,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itip .socktxt .st-bon{
  font-size: 13px;
  font-weight: 600;
  color: #89b88d;
  text-shadow: 0 1px 0 rgba(0,0,0,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itip .socktxt .st-bon.muted{
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

/* Desc should be white like in-game */
.itip .sec.desc .val{
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 0 rgba(0,0,0,.75);
}

/* optional: second part "lighter" */
.itip .sec.desc .line.muted .val{
  color: rgba(255,255,255,.65);
}
