/* forge/bag.css — v0.70.0
 * Inventory modal, bag slots, reward toast.
 * Map layout / HUD responsive rules live in map.css + hud.css.
 */

.forge-bag {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.forge-bag[hidden] {
  display: none !important;
}
.forge-bag-panel {
  width: min(420px, 100%);
  max-height: min(80vh, 560px);
  overflow: auto;
  background: rgba(0, 14, 8, 0.97);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.15);
}
.forge-bag-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.forge-bag-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #09f530;
  letter-spacing: 0.08em;
  flex: 1;
}
.bag-gold {
  color: #e0c060;
  font-size: 0.8rem;
}
.bag-close {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #cfe;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
.bag-hint {
  font-size: 0.72rem;
  opacity: 0.65;
  margin: 0 0 12px;
}
.bag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.bag-slot {
  aspect-ratio: 1;
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px;
  min-height: 64px;
  cursor: pointer;
}
.bag-slot.is-empty {
  opacity: 0.35;
  cursor: default;
}
.bag-slot .slot-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.bag-slot .slot-art {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: auto;
  border-radius: 4px;
}
.bag-slot.rarity-trash { border-color: rgba(120, 120, 120, 0.35); opacity: 0.9; }
.bag-slot .slot-name {
  font-size: 0.55rem;
  text-align: center;
  margin-top: 4px;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bag-slot .slot-qty {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px #000;
}
.bag-slot.rarity-common { border-color: rgba(160, 160, 160, 0.35); }
.bag-slot.rarity-uncommon { border-color: rgba(30, 180, 60, 0.65); box-shadow: inset 0 0 10px rgba(30, 180, 60, 0.12); }
.bag-slot.rarity-rare { border-color: rgba(60, 140, 255, 0.7); box-shadow: inset 0 0 10px rgba(60, 140, 255, 0.15); }
.bag-slot.rarity-epic { border-color: rgba(180, 80, 255, 0.75); box-shadow: inset 0 0 12px rgba(180, 80, 255, 0.18); }
.bag-slot.rarity-legendary { border-color: rgba(255, 150, 40, 0.85); box-shadow: inset 0 0 14px rgba(255, 150, 40, 0.2); }
.bag-empty {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
  margin: 12px 0 0;
}

/* Reward toast */
.forge-reward-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  z-index: 120;
  max-width: min(420px, 92vw);
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0, 20, 10, 0.96);
  border: 1px solid rgba(0, 255, 136, 0.45);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.2);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
  animation: toast-in 0.25s ease;
}
.forge-reward-toast[hidden] {
  display: none !important;
}
.forge-reward-toast strong { color: #09f530; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
