/* =====================================================================
   Diablo II style equipment screen: paper doll around the character and a
   cell grid bag where items take blocks of cells. Loaded after arpg.css.
   ===================================================================== */

/* paper doll */
#doll {
  position: relative; flex: 0 0 auto; align-self: center;
  background:
    radial-gradient(60% 70% at 50% 55%, rgba(57, 214, 255, .07), transparent 70%),
    #0d1030;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #2f3870, 0 0 0 6px var(--ink);
}
#doll::before {        /* faint outline of VOLT behind the armour slot */
  content: ""; position: absolute; left: 50%; top: 8%; width: 30%; height: 88%; transform: translateX(-50%);
  background: radial-gradient(50% 40% at 50% 22%, rgba(140, 170, 255, .08), transparent 70%),
              radial-gradient(45% 55% at 50% 70%, rgba(140, 170, 255, .06), transparent 70%);
  pointer-events: none;
}
#doll .slot {
  position: absolute; display: flex; align-items: center; justify-content: center;
  background: #080a1c;
  box-shadow: inset 0 0 0 1px #3a4480, inset 2px 2px 0 1px #05060f, inset -1px -1px 0 1px #1c2350;
}
#doll .slot small {
  position: absolute; left: 3px; top: 2px; font-family: var(--px); font-size: 4px; color: #4a5490; pointer-events: none;
}
#doll .slot .ghostIcon { width: 56%; max-width: 30px; image-rendering: pixelated; opacity: .18; filter: grayscale(1); pointer-events: none; }
#doll .slot .tile { clip-path: none; position: absolute; inset: 0; }
#doll .slot.dropHint { box-shadow: inset 0 0 0 2px #58d68d; }
.dollStats {
  position: absolute; display: flex; flex-direction: column; gap: 2px;
  font-family: var(--px); font-size: 5px; color: var(--dim); line-height: 1.5;
}
.dollStats b { font-weight: 400; font-size: 8px; color: var(--gold); margin-bottom: 2px; }

/* bag header: count, auto-sell, sell target */
.tab .bayHead { gap: 6px; }
.bayHead #invCount { order: 2; }
.bayHead #autoSell { order: 3; }
.bayHead #sellZone {
  order: 4; flex: 0 0 auto; height: 20px; padding: 0 10px;
  font-size: 7px; color: #ff9aa8;
}
.bayHead::after { order: 1; }

/* bag grid: cell lines, items cover blocks */
#inv {
  position: relative; display: block; flex: 0 0 auto; align-self: center; padding: 0; gap: 0;
  background-color: #080a1c;
  background-image:
    linear-gradient(#1c2350 1px, transparent 1px),
    linear-gradient(90deg, #1c2350 1px, transparent 1px);
  background-size: var(--c) var(--c);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #2f3870, 0 0 0 6px var(--ink);
}
#inv .tile.bagItem {
  position: absolute; clip-path: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 20%, #10133a), color-mix(in srgb, var(--rc) 8%, #0a0c24));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 70%, transparent), inset 0 0 0 2px rgba(0, 0, 0, .5);
}
#inv .tile.bagItem.r-normal { background: #12152f; }
#inv .tile img, #doll .tile img { width: auto; height: auto; }
#inv .tile.new::before { left: 2px; top: 2px; font-size: 4px; }
#inv .tile.up::after { right: 3px; bottom: 3px; border-left-width: 4px; border-right-width: 4px; border-bottom-width: 5px; }
.foot { position: absolute; pointer-events: none; z-index: 3; }
.foot.ok { background: rgba(88, 214, 141, .3); box-shadow: inset 0 0 0 2px #58d68d; }
.foot.bad { background: rgba(255, 77, 94, .3); box-shadow: inset 0 0 0 2px #ff4d5e; }
.ghostTile { clip-path: none !important; }

/* tall art keeps its shape in square tiles */
.tile img { object-fit: contain; }
