/* ============================================================
   ITEM VAULT — Premium Inventory Suite
   item-menu.css
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
#inventory-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(2, 1, 14, 0.98);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: itmSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes itmSlideIn {
  from { opacity: 0; transform: scale(1.05); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Header ─────────────────────────────────────────────── */
.itm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(90deg, #0a0640 0%, #05031e 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.itm-title {
  font-family: var(--px);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow: 0 0 15px var(--gold-glow);
}

.itm-close {
  background: transparent;
  border: 1px solid #3a2870;
  color: #c0b8e8;
  font-family: var(--vt);
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.itm-close:hover { border-color: #c084fc; color: #fff; box-shadow: 0 0 10px #c084fc50; }

/* ── Tab Navigation ──────────────────────────────────────── */
.itm-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.itm-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--px);
  font-size: 0.6rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.itm-tab.active {
  color: var(--gold);
  background: rgba(255, 207, 92, 0.05);
  border-bottom-color: var(--gold);
}

/* ── Body Layout ─────────────────────────────────────────── */
.itm-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ── Item List Pane ─────────────────────────────────────── */
.itm-list-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.itm-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.itm-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.itm-entry:hover { background: rgba(255, 255, 255, 0.05); }
.itm-entry.active {
  background: rgba(96, 80, 184, 0.15);
  border-color: rgba(96, 80, 184, 0.4);
  box-shadow: inset 0 0 10px rgba(96, 80, 184, 0.2);
}

.itm-entry-icon { font-size: 1.4rem; flex-shrink: 0; }
.itm-entry-name { flex: 1; font-size: 0.95rem; color: #e2e8f0; }
.itm-entry-qty { font-family: var(--vt); font-size: 1.1rem; color: var(--gold); }

/* ── Item Detail Pane (Showcase) ───────────────────────── */
.itm-detail-pane {
  width: 320px;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.25);
  padding: 24px;
  flex-shrink: 0;
  min-height: 0;
  overflow-y: auto;
}

.itm-showcase-box {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.itm-showcase-box::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, var(--rarity-col, transparent) 0%, transparent 70%);
  opacity: 0.4;
  z-index: -1;
}

.itm-detail-name {
  font-family: var(--px);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 4px;
  color: var(--gold);
}

.itm-detail-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.itm-detail-desc {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--gold-dim);
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  border-radius: 0 8px 8px 0;
  margin-bottom: 30px;
}

.itm-use-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #3a2870, #1a1650);
  border: 1px solid var(--border-hi);
  color: #fff;
  font-family: var(--px);
  font-size: 0.75rem;
  letter-spacing: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.itm-use-btn:hover:not(:disabled) {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 80, 184, 0.4);
}

.itm-use-btn:active:not(:disabled) { transform: translateY(0); }
.itm-use-btn:disabled { opacity: 0.4; cursor: default; filter: grayscale(1); }

/* ── Target Picker Overlay ─────────────────────────────── */
.itm-target-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 1, 14, 0.9);
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.itm-target-grid {
  width: 100%;
  max-width: 500px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.itm-target-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.itm-target-card:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.itm-target-card.disabled { opacity: 0.4; filter: grayscale(1); cursor: default; }

.itm-target-name { font-family: var(--px); font-size: 0.85rem; }
.itm-target-bar-bg { height: 6px; background: rgba(0,0,0,0.4); border-radius: 3px; overflow: hidden; }
.itm-target-bar-fill { height: 100%; transition: width 0.4s; }

/* ── Rarity Colors ─────────────────────────────────────── */
.rarity-common    { --rarity-col: #94a3b8; }
.rarity-uncommon  { --rarity-col: #4ade80; }
.rarity-rare      { --rarity-col: #8b5cf6; }
.rarity-legendary { --rarity-col: #facc15; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .itm-body { flex-direction: column; }
  .itm-detail-pane { width: 100%; height: auto; border-left: none; border-top: 1px solid var(--border); }
  .itm-target-grid { grid-template-columns: 1fr; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .itm-header { padding: 8px 16px; }
  .itm-tab { padding: 8px; }
  .itm-detail-pane { width: 260px; padding: 16px; }
  .itm-showcase-box { width: 60px; height: 60px; font-size: 2rem; margin-bottom: 10px; }
  .itm-detail-desc { padding: 10px; margin-bottom: 15px; font-size: 0.85rem; }
}
