/*
 * Shared loadout hover-tip styles (public/sim-tip.css)
 *
 * The .sim-loadout-tip / .sim-tip-* rules build the in-game "loadout"
 * popup used on TWO pages:
 *   - Combat page  — hover a sim player's name (combat.js)
 *   - History page — hover a member's name in a trial table (history.js)
 *
 * combat.html and history.html both link this file. Edit the tip styles
 * HERE — combat.css / history.css used to mirror this block 1:1 and had
 * to be kept in sync by hand. Page-specific tweaks go in that page's own
 * stylesheet AFTER this link (e.g. History caps the menu at 78vh).
 */

.sim-loadout-tip {
  position: fixed;
  z-index: 900;
  pointer-events: none;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow, 0 12px 32px rgba(0, 0, 0, 0.45));
  padding: 9px 11px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.sim-loadout-tip[hidden] { display: none; }
.sim-tip-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.sim-tip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 7px;
}
.sim-tip-cell {
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 3px 6px 4px;
  min-height: 34px;
}
.sim-tip-cell-empty { opacity: 0.45; border-style: dashed; }
.sim-tip-slot {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.sim-tip-item {
  font-size: 10.5px;
  color: var(--text-primary);
  /* wrap (and break) inside the cell instead of clipping with an
     ellipsis — the tip is pointer-events:none, so a native title
     tooltip can't rescue a truncated name; long names reflow onto a
     second line and the cell simply grows (min-height stays 34px). */
  white-space: normal;
  overflow-wrap: break-word;
}
.sim-tip-enh { color: var(--accent-ink); }
/* Game-style icon tiles (one per equipped slot), shown above the text
   list, placed on the exact grid the gear popup uses (relative canvas,
   tiles absolutely positioned per their in-game row/column): item icon
   with +enhancement (top-left), item level (bottom, green), a star
   (top-right) on gear with real combat bonuses. Unfilled slots are blank
   gaps, just like the game popup. */
.sim-tip-tiles {
  position: relative;
  margin-bottom: 7px;
}
.sim-tip-tile {
  position: absolute;
  width: 38px;
  height: 38px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
}
.sim-tip-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.sim-tip-tile-enh {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 0 3px;
  border-bottom-right-radius: 4px;
}
.sim-tip-tile-lvl {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8.5px;
  font-weight: 700;
  color: #2ea043;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.sim-tip-tile-star {
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 9px;
  line-height: 1;
  color: #e3b341;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.sim-tip-line {
  margin-top: 3px;
  line-height: 1.55;
  white-space: normal;
}
.sim-tiplbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 2px;
}
.sim-tipline-dim { color: var(--text-muted); }
.sim-tip-gap { color: #b35900; }
