/* ============================================================
   inventory.css  -  Inventory panel on doll page
   ============================================================ */

.inventory-panel {
  flex: 1;
  max-width: 450px;
  width: 100%;
}

.inventory-panel h2 {
  text-align: center;
}

/* ---------- Inventory category sections ---------- */
.inv-section {
  margin-bottom: 20px;
}

.inv-section h3 {
  font-size: 0.95rem;
  color: var(--pink-dark);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--pink-light);
}

/* ---------- Mini card grid ---------- */
.inv-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-item {
  position: relative;
  width: 64px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 2px solid transparent;
  padding: 4px;
  gap: 2px;
}

.inv-item:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px var(--shadow-strong);
}

/* Single-doll equipped (legacy) */
.inv-item.equipped {
  border-color: var(--pink);
  background: var(--pink-light);
}

/* Equipped on doll 1 */
.inv-item.equipped-doll-1 {
  border-color: var(--pink);
  background: var(--pink-light);
  opacity: 0.7;
  cursor: default;
}

/* Equipped on doll 2 */
.inv-item.equipped-doll-2 {
  border-color: var(--purple, #C490D1);
  background: var(--purple-light, #F3E8FF);
  opacity: 0.7;
  cursor: default;
}

/* Selected for placement */
.inv-item.selected {
  border-color: var(--yellow, #FFD93D);
  background: #FFF5CC;
  transform: scale(1.08);
  animation: pulse-glow 0.8s ease-in-out infinite;
}

/* Doll number badge */
.doll-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.doll-badge.doll-1 { background: var(--pink-dark, #D0649A); }
.doll-badge.doll-2 { background: var(--purple-dark, #9B59B6); }

.inv-item .inv-emoji {
  font-size: 1.6rem;
}

/* SVG preview in inventory mini cards */
.inv-item .inv-emoji-svg {
  font-size: 1rem;
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inv-item .inv-emoji-svg svg {
  width: 100%;
  height: 100%;
}

.inv-item .inv-name {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
  max-height: 20px;
}

/* ---------- Delete button ---------- */
.delete-btn {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white, #fff);
  border: 2px solid #E0E0E0;
  font-size: 13px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.delete-btn:hover {
  transform: scale(1.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.inv-item:hover .delete-btn {
  display: flex;
}

/* ---------- Empty state ---------- */
.inv-empty {
  text-align: center;
  color: var(--text-light);
  padding: 40px 20px;
  font-size: 0.95rem;
}

.inv-empty .empty-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .inventory-panel {
    max-width: 100%;
  }
  .inv-item {
    width: 58px;
    height: 68px;
  }
  .inv-item .inv-emoji {
    font-size: 1.4rem;
  }
}
