/* equipment.css — Harem-member gear/equipment UI.
   Window floats ABOVE the harem overlay (z 1000000) without closing it. */

/* ── Card "Equipment" button (top-left, below the favourite star, above the
   promote button). High z-index + bright styling so it never blends into the
   promote bar behind it. */
.cylarmy-npc-card .cylarmy-equip-btn {
  position: absolute;
  top: 67px;
  left: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  background: #173a2a;
  border: 1px solid #5ccfa0;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
  font-size: 16px;
  line-height: 1;
  z-index: 6;
  box-shadow: 0 0 6px rgba(92, 207, 160, 0.45);
  transition: opacity 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.cylarmy-npc-card:hover .cylarmy-equip-btn { opacity: 1; }
.cylarmy-npc-card .cylarmy-equip-btn:hover {
  opacity: 1 !important;
  background: #1f4d38;
  border-color: #8fffd0;
  box-shadow: 0 0 12px rgba(110, 220, 170, 0.6);
  transform: scale(1.08);
}

/* Promote (⬆) relocated to a corner icon directly BELOW the equipment button,
   so the top-left stack reads top→bottom: favourite ★ · equipment 💍 · promote ⬆.
   Only the corner variant is repositioned; the bottom "⭐ Promote" button keeps
   its full-width style (it doesn't carry .cylarmy-promote-corner). Gold theme is
   inherited from .cylarmy-promote-btn — we only override box/position here. */
.cylarmy-npc-card .cylarmy-promote-corner {
  /* Reposition + resize ONLY. Background, border, colour and hover glow are
     left to inherit from the original .cylarmy-promote-btn rule so the button
     keeps its original olive-green look — we just turn the full-width bar into
     a 26px corner icon below the equipment button. */
  position: absolute;
  top: 107px;
  left: 46px;
  width: 26px;
  height: 26px;
  min-width: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  z-index: 6;
}

/* ── Drop toast (reuses .cylarmy-hire-toast animation, greener tint) ───────── */
.equip-drop-toast {
  background: #0e1f1a;
  color: #bff0dc;
  box-shadow: 0 2px 18px rgba(0, 150, 110, 0.3);
}

/* ── Gear summary line inside harem-member tooltips ────────────────────────── */
.cylarmy-gear-summary {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #3a8a6a40;
  font-size: 12px;
  color: #8fe0c0;
  line-height: 1.4;
}

/* ── Window backdrop + frame ──────────────────────────────────────────────── */
#equip-window-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  background: rgba(8, 2, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  font-family: 'Exo 2', Calibri, sans-serif;
}
.equip-window {
  position: relative;
  width: min(940px, 95vw);
  height: min(660px, 92vh);
  background: linear-gradient(160deg, #1a0d28, #140a20);
  border: 1.5px solid #7040a0;
  border-radius: 14px;
  box-shadow: 0 12px 60px rgba(80, 0, 140, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e8c8ff;
}
.equip-window .ui-unlock-x { z-index: 5; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.equip-win-head {
  flex-shrink: 0;
  padding: 14px 48px 12px 18px;
  border-bottom: 1px solid #5030708a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.equip-win-title { font-size: 23px; font-weight: 800; color: #f0d0ff; }
.equip-auto-row { display: flex; gap: 8px; }
.equip-auto-btn {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  transition: filter 0.15s, box-shadow 0.15s, transform 0.05s;
}
.equip-auto-btn:active { transform: translateY(1px); }
.equip-auto-drop {
  background: linear-gradient(135deg, #0c2a3a, #0e3550);
  border-color: #4aa0d8;
  color: #bfe6ff;
}
.equip-auto-drop:hover { filter: brightness(1.18); box-shadow: 0 0 12px rgba(74, 160, 216, 0.5); }
.equip-auto-battle {
  background: linear-gradient(135deg, #3a1010, #50180c);
  border-color: #d87a4a;
  color: #ffd8bf;
}
.equip-auto-battle:hover { filter: brightness(1.18); box-shadow: 0 0 12px rgba(216, 122, 74, 0.5); }

/* ── Body split ───────────────────────────────────────────────────────────── */
.equip-win-body { flex: 1; display: flex; min-height: 0; }
.equip-left {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid #5030708a;
  padding: 16px 14px;
  overflow-y: auto;
}
.equip-right { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 12px 14px; }

/* ── Portrait + corner slots ──────────────────────────────────────────────── */
.equip-portrait-wrap {
  position: relative;
  width: 240px;
  height: 200px;
  margin: 4px auto 14px;
}
.equip-portrait-cyl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.equip-slot {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 2px solid #5a4070;
  border-radius: 10px;
  background: rgba(20, 8, 32, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.equip-slot:hover { transform: scale(1.06); }
.equip-slot.active { border-color: #c89aff; box-shadow: 0 0 12px rgba(200, 154, 255, 0.45); }
.equip-slot.empty { border-style: dashed; opacity: 0.7; }
.equip-slot-tl { top: 0; left: 0; }
.equip-slot-tr { top: 0; right: 0; }
.equip-slot-bl { bottom: 0; left: 0; }
.equip-slot-br { bottom: 0; right: 0; }
.equip-slot-ico { font-size: 29px; }
.equip-slot-ico-empty { font-size: 26px; filter: grayscale(1); opacity: 0.5; }
.equip-slot-x {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #a04040;
  background: #2a1010;
  color: #ff9a9a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: background 0.12s, color 0.12s, transform 0.1s;
}
.equip-slot-x:hover { background: #4a1515; color: #ffd0d0; transform: scale(1.12); }

/* ── Stats panel ──────────────────────────────────────────────────────────── */
.equip-stats { font-size: 14px; }
.equip-stats-head {
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: #b090d0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #5030704d;
  padding-bottom: 2px;
}
.equip-m-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 2px 2px;
  border-radius: 4px;
}
.equip-m-ico { text-align: center; }
.equip-m-lbl { color: #c0a0e0; }
.equip-m-val { font-weight: 700; color: #f0d8ff; font-variant-numeric: tabular-nums; }
.equip-m-row.equip-up { background: rgba(40, 90, 50, 0.25); }
.equip-m-row.equip-dn { background: rgba(90, 40, 40, 0.25); }
.equip-m-row.equip-up .equip-m-val,
.equip-m-row.equip-up .equip-m-new { color: #9cf0a8; }
.equip-m-row.equip-dn .equip-m-val,
.equip-m-row.equip-dn .equip-m-new { color: #ff9a9a; }
.equip-m-cur { opacity: 0.55; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.equip-tabs { display: flex; gap: 6px; flex-shrink: 0; }
.equip-tab {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #5030708a;
  border-bottom: none;
  background: #170c24;
  color: #b59cd0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.equip-tab:hover { background: #22113a; color: #e0c8ff; }
.equip-tab.active { background: #2c1648; color: #f0d8ff; border-color: #8a5ac0; }
.equip-tab-n {
  font-size: 12px;
  background: #3a1f5a;
  border-radius: 8px;
  padding: 0 5px;
  color: #d0b0f0;
}

/* ── Sort ─────────────────────────────────────────────────────────────────── */
.equip-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  flex-shrink: 0;
}
.equip-sort-lbl { font-size: 14px; color: #9a80b8; font-weight: 700; }
.equip-sort-btn {
  padding: 4px 11px;
  border-radius: 13px;
  border: 1px solid #5030708a;
  background: #170c24;
  color: #b59cd0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.equip-sort-btn:hover { background: #22113a; color: #e0c8ff; }
.equip-sort-btn.active { background: #3a1f5a; color: #f0d8ff; border-color: #a06ad0; }

/* ── List ─────────────────────────────────────────────────────────────────── */
.equip-list { flex: 1; overflow-y: auto; padding: 4px 4px 4px 0; min-height: 0; }
.equip-empty { padding: 30px 16px; text-align: center; color: #8a70a8; font-size: 15px; line-height: 1.5; }
.equip-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #170c24;
  border: 1px solid #3a285530;
  border-left: 3px solid #5a4070;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, transform 0.05s;
}
.equip-row:hover { background: #24123c; transform: translateX(2px); }
.equip-row.equipped { background: #1e2c1e; border-color: #3a7a4a55; }
.equip-row-ico { font-size: 29px; flex-shrink: 0; width: 34px; text-align: center; }
.equip-row-body { flex: 1; min-width: 0; }
.equip-row-top { font-size: 15px; font-weight: 700; color: #e8d0ff; }
.equip-row-owner {
  font-size: 12px;
  color: #c0a060;
  background: #2a2410;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
}
.equip-row-eq { font-size: 12px; color: #8fe0a0; margin-left: 6px; }
.equip-row-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.equip-stat-line { font-size: 14px; color: #b8a0d8; white-space: nowrap; }
/* Squeeze-Time & Droplet stats read brighter/whiter. */
.equip-stat-line.equip-stat-bright { color: #f2f0ff; }
/* Vertical divider between the economy (squeeze/droplet/age) and combat (xp/battle) stat groups. */
.equip-stat-div {
  flex: 0 0 auto;
  align-self: stretch;
  width: 2px;
  min-height: 14px;
  margin: 0 6px;
  background: #6a5a90;
  border-radius: 1px;
}

/* ── Equipped-slot hover tooltip (mirrors the inventory rows on the right) ── */
.equip-tip-card {
  border-left: 3px solid #5a4070;
  border-radius: 6px;
  padding: 1px 2px 1px 9px;
  text-align: left;
  min-width: 180px;
}
.equip-tip-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.equip-tip-ico { font-size: 26px; line-height: 1; flex-shrink: 0; width: 30px; text-align: center; }
.equip-tip-title { font-size: 15px; font-weight: 700; color: #e8d0ff; }
.equip-tip-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.equip-tip-explain {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid #50307040;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.equip-tip-exp { font-size: 12px; font-weight: 600; color: #a892c4; line-height: 1.35; }

/* Mobile: stack the split vertically. */
@media (max-width: 720px) {
  .equip-win-body { flex-direction: column; }
  .equip-left { width: auto; border-right: none; border-bottom: 1px solid #5030708a; }
  .equip-portrait-wrap { width: 220px; height: 180px; }
}
