/* ==========================================================================
   WAKAYASHI OFFICIAL TOOLTIP CSS (100% 1:1 RECREATION)
   ========================================================================== */

.cg-has-tip {
  position: relative;
}

.skill-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 999;
  width: 320px;
  max-width: 85vw;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #171c26 0%, #10141b 100%);
  border: 1px solid rgba(201, 169, 97, 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 15px rgba(201, 169, 97, 0.15);
  color: #e8e6df;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: left;
  pointer-events: none;
}

/* Tooltip alignment when node is on right half of board */
.cg-has-tip .skill-tip--left {
  left: auto;
  right: 0;
}

/* Tooltip alignment when node is on bottom rows */
.cg-has-tip .skill-tip--top {
  top: auto;
  bottom: calc(100% + 8px);
}

/* Show on hover and focus */
.cg-has-tip:hover .skill-tip,
.cg-has-tip:focus-visible .skill-tip {
  display: flex !important;
}

.skill-tip-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.skill-tip-head img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid #c9a961;
  object-fit: cover;
  flex-shrink: 0;
}

.skill-tip-head > span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.skill-tip-head b {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.skill-tip-head em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: #8d93a0;
}

.skill-tip-head small {
  font-size: 0.75rem;
  color: #d1b87a;
  font-weight: 600;
}

.skill-tip-text {
  display: block;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.skill-tip-text.cg-val {
  color: #4ade80;
  font-weight: 700;
}
