/* Equipment HUD (4 Ubrane Sloty) */
.equipment-section {
  border-top: 1px solid #2d3748;
  padding-top: 4px;
  margin-bottom: 4px;
}

.equipment-header {
  font-size: 10px;
  color: var(--ui-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stonowanie wbudowanego złotego koloru z index.html ("PPM: Zdejmij") */
.equipment-header span:last-child {
  color: var(--ui-text-muted) !important;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: start;
  align-content: start;
}

/* Sloty ekwipunku: jednolite ciemne tło, bez jaskrawych obwódek, ostre kąty */
.equip-slot {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  background: var(--ui-slot);
  border: 1px solid #2d3748;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.equip-slot:hover {
  background: var(--ui-slot-hover);
}

.equip-slot.empty {
  background: var(--ui-slot-empty);
}

.equip-slot.empty:hover {
  background: var(--ui-slot-empty-hover);
}

.equip-slot .equip-slot-tag {
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: normal;
  color: var(--ui-slot-label); /* ciemna etykieta na SZARYM slocie (Faza 7.5) */
  pointer-events: none;
  letter-spacing: 1px;
}

.equip-slot.empty .equip-slot-tag {
  color: var(--ui-slot-label);
  opacity: 0.55;
}

.equip-slot .slot-placeholder {
  width: 18px;
  height: 18px;
  opacity: 0.25;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.equip-slot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

/* Placeholder (pusty slot) pozostaje subtelnie mniejszy od prawdziwej ikony. */
.equip-slot .slot-placeholder svg {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   HUD TABS (PLECAK / TOWARZYSZ)
   ========================================================================== */
.hud-tabs-section {
  border-top: 1px solid #2d3748;
  padding-top: 4px;
  margin-bottom: 2px;
}

.hud-tabs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.hud-tab-btn {
  background: var(--ui-btn);
  border: 1px solid #2d3748;
  border-radius: 0;
  color: var(--ui-text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 1px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.12s ease;
}

.hud-tab-btn:hover {
  background: var(--ui-btn-hover);
  color: var(--ui-text-muted);
  border-color: #3a4454;
}

.hud-tab-btn.active {
  background: var(--ui-insert);
  color: #d8c27a;
  border-color: #d8c27a;
}

/* Podświetlenie przy przeciąganiu przedmiotu nad przycisk zakładki */
.hud-tab-btn.drag-target-hover {
  background: rgba(216, 194, 122, 0.22) !important;
  border-color: #d8c27a !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(216, 194, 122, 0.45);
}

.hud-tabs-content {
  position: relative;
}

.hud-tab-pane {
  min-height: 105px;
}

/* Inventory HUD */
.inventory-section {
  border-top: 1px solid #2d3748;
  padding-top: 3px;
  border-top: none;
  padding-top: 0;
}

.inventory-header {
  font-size: 10px;
  color: var(--ui-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

/* Stonowanie wbudowanego neonowego koloru z index.html ("PPM: Użyj / Załóż") */
.inventory-header span:last-child {
  color: var(--ui-text-muted) !important;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: start;
  align-content: start;
}

/* ==========================================================================
   QUICK POTION BELT (pas szybkich mikstur HP/MP) — nad sekcją plecaka
   ========================================================================== */
.potion-belt {
  border-top: 1px solid #2d3748;
  padding-top: 4px;
  margin-bottom: 4px;
}

.potion-belt-title {
  font-size: 10px;
  color: var(--ui-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.potion-slots {
  display: grid;
  grid-template-columns: 44px 44px;
  gap: 4px;
  justify-content: start;
}

.potion-slot {
  height: 44px;
  background: var(--ui-slot);
  border: 1px solid #2d3748;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.potion-slot-hp {
  border-color: #5a3a3e;
}

.potion-slot-mp {
  border-color: #3a4a6a;
}

.potion-slot svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  image-rendering: pixelated;
}

.potion-count {
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 8px;
  font-weight: 500;
  color: #e0e6ed;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Sloty plecaka: jednolite ciemne tło, ostre kąty */
.inv-slot {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  background: var(--ui-slot);
  border: 1px solid #2d3748;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.inv-slot:hover {
  background: var(--ui-slot-hover);
}

.inv-slot.empty {
  cursor: default;
}

.item-tier {
  position: absolute;
  bottom: 2px;
  left: 3px;
  font-size: 10px;
  font-weight: normal;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.inv-slot .slot-idx {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 10px;
  color: var(--ui-slot-label); /* ciemna etykieta na SZARYM slocie (Faza 7.5) */
  pointer-events: none;
}

.inv-slot:nth-child(-n+4) .slot-idx {
  font-size: 10px;
  color: rgba(216, 194, 122, 0.8);
  font-weight: normal;
}

@keyframes slotFlash {
  0% {
    /* rozbłysk JAŚNIEJSZY od szarego slotu (Faza 7.5) */
    background: #8a919d;
  }
  100% {
    /* returns to original styled by existing classes */
  }
}

.slot-flash {
  animation: slotFlash 0.3s ease-out;
}

.inv-slot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

/* Faza 2: ostre (pixelated) renderowanie ikon Oryxa (.png) i inline-SVG
   w ekwipunku, skarbcu oraz panelach łupu — bez rozmycia. */
.inv-slot img,
.inv-slot svg,
.equip-slot img,
.equip-slot svg,
.ground-slot img,
.ground-slot svg,
.vault-slot img,
.vault-slot svg {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
/* Na sztywno (hard-set): ostre renderowanie dla kontenerów slotów ekwipunku
   i plecaka — zapobiega rozmywaniu małych ikonek 8x8/16x16 w oknie ekwipunku. */
#inventory-slots img,
#inventory-grid img,
#equipment-grid img,
#ground-loot-grid img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


.slot img,
.inv-slot img,
.equip-slot img,
.ground-slot img,
.vault-slot img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

/* ItemIconAtlas składa ikony w kanwie 16×16 z bazą 12×12 (2px przezroczysty
   margines). Overscale 110% wchłania ten margines — realna grafika wypełnia
   ~82% slotu zamiast ~60% (dawny limit 80% × baza 12/16). Reguła TYLKO dla
   ikon z atlasu ([data-atlas]) w 4 torach slotów HUD — surowe sprite'y Oryx
   (fallback), ikony kart postaci / cmentarzyska pozostają nietknięte.
   `flex: none` — sloty to kontenery flex; bez tego flex-shrink skurczyłby
   ikonę z powrotem do 100% szerokości slotu. */
.inv-slot img.item-icon[data-atlas],
.equip-slot img.item-icon[data-atlas],
.ground-slot img.item-icon[data-atlas],
.vault-slot img.item-icon[data-atlas] {
  width: 110%;
  height: 110%;
  max-width: none;
  max-height: none;
  flex: none;
}

/* Slot trzyma kwadrat aspect-ratio 1:1 — ikona 110% NIE może rozciągać
   wysokości slotu (bez tego min-height:auto daje wiersze 55x60 zamiast
   55x55 przy wypełnionych slotach). Przelewanie się ikony poza obrys
   jest świadome (wchłania je 2px przezroczysty margines kanwy 16×16). */
.inv-slot,
.equip-slot,
.ground-slot,
.vault-slot {
  min-height: 0;
}

.inv-slot.dragging {
  opacity: 0.4;
  border: 1px dashed #4a5568;
}


/* ==========================================================================
   GROUND LOOT PANEL (ZIEMIA)
   ========================================================================== */
.ground-loot-panel {
  /* STICKY BOTTOM (gwarancja widoczności worka): panel ZIEMIA jest OSTATNIM
     elementem przewijanej kolumny #player-hud. Przy niskim oknie (gdy kolumna
     ma overflow-y) panel lądował pod dolną krawędzią i był ucięty. Sticky
     bottom:0 przypina go do dolnej krawędzi WIDOCZNEJ części kolumny — worek
     jest ZAWSZE widoczny, a treść nad nim się przewija.
     Modal mobilny (mobile.css) nadpisuje to na `position: static`. */
  position: sticky;
  bottom: 0;
  z-index: 3;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid #2d3748;
  border-top: 1px solid #2d3748;
  border-radius: 0;
  padding: 6px 10px;
  padding-top: 4px;
  /* Nieprzezroczysty antracyt — gdy worek jest PRZYPIĘTY, treść pod nim nie
     przebija. W normalnym układzie (kolumna się mieści) brak zmiany wizualnej. */
  background: rgba(18, 20, 26, 0.95);
  box-shadow: none;
  animation: groundLootFadeIn 0.15s ease-out;
}

@keyframes groundLootFadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ground-loot-header {
  font-size: 10px;
  font-weight: normal;
  color: var(--ui-text-muted);
  color: #d8c27a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ground-loot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: start;
  align-content: start;
}

.ground-slot {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  background: var(--ui-slot);
  border: 1px solid #2d3748;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.ground-slot:hover {
  background: var(--ui-slot-hover);
}

.ground-slot.empty {
  cursor: default;
}

.ground-slot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.ground-slot.dragging {
  opacity: 0.4;
  border: 1px dashed #4a5568;
}


/* ==========================================================================
   VAULT PANEL (SKARBIEC) — panel 4x2 (stonowany, bez złotego neona)
   ========================================================================== */
.vault-panel {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid #2d3748;
  border-radius: 0;
  padding: 6px 10px;
  background: rgba(18, 20, 26, 0.95); /* antracyt (Faza 7.5 rev.2) */
  box-shadow: none;
}

.vault-title {
  color: #d8c27a !important;
  text-shadow: none;
  font-size: 10px;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(216, 194, 122, 0.25);
  padding-bottom: 3px;
  margin-bottom: 4px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: start;
  align-content: start;
}

/* DEV-SKARBIEC (tymczasowy): 50 slotów w 4 kolumnach; panel skroluje się w pionie,
   żeby nie wypychać zawartości poza ekran. */
.dev-vault-grid {
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-scroll-thumb) var(--ui-scroll-track);
}

.vault-slot {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  background: var(--ui-slot);
  border: 1px solid #2d3748;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.vault-slot:hover {
  background: var(--ui-slot-hover);
}

.vault-slot.empty {
  background: var(--ui-slot-empty);
}

.vault-slot.empty:hover {
  background: var(--ui-slot-empty-hover);
}

.vault-slot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.vault-slot.dragging {
  opacity: 0.4;
  border: 1px dashed #4a5568;
}


/* ==========================================================================
   RAMKA SLOTU UT — podwójna srebrno-złota (Faza 6, item_visual_system_DONE.md §2.6)
   Zewnętrzna krawędź srebrna, wewnętrzna złota 1px — UT czytelne na pierwszy
   rzut oka nawet bez etykiety [UT] w tooltipie.
   ========================================================================== */
.inv-slot.slot-ut,
.equip-slot.slot-ut,
.ground-slot.slot-ut,
.vault-slot.slot-ut {
  border-color: #c3ccd9;
  box-shadow: inset 0 0 0 1px #d8c27a;
}

.inv-slot.slot-ut:hover,
.equip-slot.slot-ut:hover,
.ground-slot.slot-ut:hover,
.vault-slot.slot-ut:hover {
  box-shadow: inset 0 0 0 1px #e8d79a;
}

/* ==========================================================================
   RAMKA SLOTU SETU — 1px akcent w kolorze zestawu (Faza 7, item_visual_system_DONE.md
   §2.6, klasa `slot-set`). Kolor = zmienna --set-accent nadawana przez
   InventoryUI.slotClassFor() z SET_PALETTES[setId]. Rysowana nakładką ::after,
   więc MOŻE współistnieć z zatwierdzoną ramką `slot-ut` (nie rusza jej).
   ========================================================================== */
.inv-slot.slot-set::after,
.equip-slot.slot-set::after,
.ground-slot.slot-set::after,
.vault-slot.slot-set::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--set-accent, #eab308);
  pointer-events: none;
}


