/* Forest Frontier v0.9.4 — classic icon inventory.
   Density comes from layout, not from shrinking readable text. */

body.theme-ashen.screen-inventory-active .inventory-screen-panel {
  padding: 12px;
}

body.theme-ashen .inventory-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
body.theme-ashen .inventory-title-row .section-label { margin-bottom: 3px; }
body.theme-ashen .inventory-title-row h2 { margin: 0; }
body.theme-ashen .inventory-visible-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

body.theme-ashen .inventory-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
body.theme-ashen .inventory-mode-tab {
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid rgba(174, 160, 119, .32);
  border-radius: 11px;
  background: rgba(11, 17, 15, .72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
body.theme-ashen .inventory-mode-tab.active {
  border-color: rgba(84, 205, 181, .72);
  background: rgba(19, 66, 58, .5);
  color: #d7fff4;
  box-shadow: inset 0 0 0 1px rgba(84, 205, 181, .16);
}

body.theme-ashen .inventory-tools-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 9px;
}
body.theme-ashen .inventory-select-wrap {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body.theme-ashen .inventory-select-wrap select {
  width: 100%;
  min-height: 38px;
  padding: 7px 28px 7px 9px;
  border: 1px solid rgba(174, 160, 119, .28);
  border-radius: 10px;
  background: #0a100e;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

body.theme-ashen .inventory-sale-toolbar {
  display: grid;
  gap: 7px;
  margin: 0 0 9px;
  padding: 8px;
  border: 1px solid rgba(189, 132, 82, .32);
  border-radius: 12px;
  background: rgba(57, 28, 18, .28);
}
body.theme-ashen .inventory-sale-toolbar[hidden] { display: none !important; }
body.theme-ashen .inventory-sale-presets,
body.theme-ashen .inventory-sale-selection {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.theme-ashen .inventory-sale-presets { flex-wrap: wrap; }
body.theme-ashen .inventory-sale-selection { justify-content: flex-end; }
body.theme-ashen .inventory-sale-selection > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
body.theme-ashen .inventory-sale-toolbar .inventory-sell-all,
body.theme-ashen .inventory-sale-toolbar .compact-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 11px;
}

body.theme-ashen .inventory-icon-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px !important;
  align-content: start;
}
body.theme-ashen .inventory-empty-state { grid-column: 1 / -1; }
body.theme-ashen .inventory-icon-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.04;
  min-width: 0;
  min-height: 70px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(150, 145, 121, .3);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 35%, rgba(77, 112, 98, .13), transparent 56%),
    linear-gradient(155deg, rgba(20, 27, 23, .96), rgba(5, 10, 8, .98));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .018), 0 4px 14px rgba(0, 0, 0, .18);
  touch-action: manipulation;
}
body.theme-ashen .inventory-icon-cell:active { transform: translateY(1px); }
body.theme-ashen .inventory-icon-cell.uncommon { border-color: rgba(85, 179, 104, .46); }
body.theme-ashen .inventory-icon-cell.rare { border-color: rgba(67, 168, 220, .52); }
body.theme-ashen .inventory-icon-cell.epic { border-color: rgba(166, 104, 222, .54); }
body.theme-ashen .inventory-icon-cell.legendary { border-color: rgba(221, 169, 70, .6); }
body.theme-ashen .inventory-icon-cell.selected-for-sale {
  border-color: rgba(226, 185, 93, .95);
  box-shadow: inset 0 0 0 2px rgba(226, 185, 93, .55), 0 0 18px rgba(203, 139, 50, .18);
}
body.theme-ashen .inventory-icon-cell.sale-disabled { opacity: .46; filter: saturate(.55); }

body.theme-ashen .inventory-cell-icon,
body.theme-ashen .inventory-cell-icon > .item-icon {
  width: clamp(50px, 15vw, 62px);
  height: clamp(50px, 15vw, 62px);
}
body.theme-ashen .inventory-cell-icon > .item-icon { display: block; }

body.theme-ashen .inventory-compare-badge,
body.theme-ashen .inventory-lock-badge,
body.theme-ashen .inventory-selected-badge,
body.theme-ashen .inventory-level-badge,
body.theme-ashen .inventory-socket-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(3, 8, 7, .92);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
body.theme-ashen .inventory-compare-badge { top: 5px; right: 5px; font-size: 18px; }
body.theme-ashen .inventory-compare-badge.upgrade {
  border-color: rgba(103, 227, 133, .7);
  color: #79ef98;
  box-shadow: 0 0 11px rgba(73, 210, 110, .3);
}
body.theme-ashen .inventory-compare-badge.downgrade {
  border-color: rgba(206, 102, 88, .4);
  color: #c97e72;
  opacity: .82;
}
body.theme-ashen .inventory-lock-badge { top: 5px; left: 5px; color: #c5bfa9; }
body.theme-ashen .inventory-selected-badge { top: 5px; left: 5px; border-color: #e2b95d; color: #ffe1a0; }
body.theme-ashen .inventory-level-badge { bottom: 5px; left: 5px; color: #d7d0bc; }
body.theme-ashen .inventory-level-badge::before { content: 'ур.'; margin-right: 2px; color: var(--muted); font-size: 10px; }
body.theme-ashen .inventory-socket-badge { right: 5px; bottom: 5px; color: #73d8cf; }

@media (min-width: 431px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body.theme-ashen .inventory-icon-cell { min-height: 76px; }
}
@media (min-width: 700px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px !important; }
  body.theme-ashen .inventory-cell-icon,
  body.theme-ashen .inventory-cell-icon > .item-icon { width: 68px; height: 68px; }
}
@media (min-width: 1000px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  body.theme-ashen.screen-inventory-active .inventory-screen-panel { padding: 9px; }
  body.theme-ashen .inventory-mode-tabs,
  body.theme-ashen .inventory-tools-row { gap: 5px; }
  body.theme-ashen .inventory-mode-tab { min-height: 37px; padding-inline: 4px; font-size: 12px; }
  body.theme-ashen .inventory-select-wrap select { min-height: 35px; padding-left: 7px; font-size: 11px; }
  body.theme-ashen .inventory-icon-grid { gap: 5px !important; }
  body.theme-ashen .inventory-icon-cell { min-height: 67px; padding: 5px; border-radius: 11px; }
  body.theme-ashen .inventory-cell-icon,
  body.theme-ashen .inventory-cell-icon > .item-icon { width: 52px; height: 52px; }
  body.theme-ashen .inventory-compare-badge,
  body.theme-ashen .inventory-lock-badge,
  body.theme-ashen .inventory-selected-badge,
  body.theme-ashen .inventory-level-badge,
  body.theme-ashen .inventory-socket-badge { min-width: 20px; height: 20px; font-size: 10px; }
  body.theme-ashen .inventory-compare-badge { font-size: 16px; }
}
