/* Тема «Кошелёк (B)»: инвентарь (resources/lk-themes/wallet/views/panel/auth/inventory/index.blade.php).
 * Перекрывает inventory.css и HUD (border-radius:0 !important) через .lk-b-inv + !important.
 * Предметы — строки во всю ширину; название из data-tip-name (есть и у слотов, которые дорисовывает inventory.js). */

html.dark .lk-inv.lk-b-inv {
  --inv-surface: #1d1e23;
  --inv-border: #2c2d33;
  --inv-border-soft: #26272c;
  --inv-text: #ececee;
  --inv-dim: #a6a7ad;
  --inv-accent: #f2b94b;
  --inv-accent-2: #ffd27a;
  --inv-ok: #7fd6a3;
  --inv-danger: #ff8f86;
  font-family: "Onest", system-ui, sans-serif !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Шапка */
html.dark .lk-b-inv .lk-inv__hero {
  margin: 0;
  padding: 18px !important;
  border-radius: 20px !important;
  border: 1px solid #2c2d33 !important;
  background: #1d1e23 !important;
  box-shadow: none !important;
}
html.dark .lk-b-inv .lk-inv__title {
  font-family: "Unbounded", "Onest", system-ui, sans-serif !important;
  font-size: 1.4rem;
  color: #ececee !important;
}
html.dark .lk-b-inv .lk-inv__lead { color: #a6a7ad; font-size: 0.9rem; }
html.dark .lk-b-inv .lk-inv__chip {
  padding: 5px 12px;
  border-radius: 999px !important;
  border: 0 !important;
  background: #2a2416 !important;
  color: #f2b94b !important;
  font-weight: 700;
}

/* Сообщения */
html.dark .lk-b-inv .lk-inv__flash {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px !important;
  border: 0 !important;
  font-weight: 600;
}
html.dark .lk-b-inv .lk-inv__flash.is-ok { background: #173326 !important; color: #e3f6ea !important; }
html.dark .lk-b-inv .lk-inv__flash.is-err { background: #3a1d1b !important; color: #ffd9d5 !important; }
html.dark .lk-b-inv .lk-inv__empty {
  padding: 20px;
  border-radius: 16px !important;
  border: 1px dashed #3a3b42 !important;
  background: transparent !important;
  color: #a6a7ad;
  text-align: center;
}
html.dark .lk-b-inv .lk-inv__empty strong { color: #ececee; }

/* Режимы: сегменты */
html.dark .lk-b-inv .lk-inv__modes.lk-b-inv-modes {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px !important;
  background: #1d1e23 !important;
  border: 1px solid #2c2d33 !important;
}
html.dark .lk-b-inv .lk-inv__mode {
  flex: 1 1 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: #a6a7ad !important;
  font: inherit;
  font-weight: 600;
  box-shadow: none !important;
}
html.dark .lk-b-inv .lk-inv__mode.is-active { background: #2c2d33 !important; color: #ececee !important; }
html.dark .lk-b-inv .lk-inv__mode:focus-visible { outline: 2px solid #f2b94b; outline-offset: 2px; }
html.dark.lk-theme-wallet .lk-b-inv-hint { margin: 0 0 12px; color: #a6a7ad; font-size: 0.88rem; }

/* Колонки: персонаж + предметы */
html.dark .lk-b-inv .lk-inv__wh.lk-b-inv-wh {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
html.dark .lk-b-inv .lk-inv__wh-side,
html.dark .lk-b-inv .lk-inv__wh-main {
  min-width: 0;
  padding: 16px !important;
  border-radius: 20px !important;
  border: 1px solid #2c2d33 !important;
  background: #1d1e23 !important;
  box-shadow: none !important;
}
html.dark .lk-b-inv .lk-inv__section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #ececee;
}

/* Персонажи: на телефоне — лента карточек, на десктопе — список */
html.dark .lk-b-inv .lk-inv__char-grid--compact {
  display: flex;
  gap: 8px;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 0 4px;
  scrollbar-width: none;
}
html.dark .lk-b-inv .lk-inv__char-grid--compact::-webkit-scrollbar { display: none; }
html.dark .lk-b-inv .lk-inv__char { flex: 0 0 auto; }
html.dark .lk-b-inv .lk-inv__char-card {
  min-height: 48px;
  padding: 8px 14px 8px 26px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: #26272c !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transform: none !important;
}
html.dark .lk-b-inv .lk-inv__char:hover .lk-inv__char-card { border-color: #3a3b42 !important; }
html.dark .lk-b-inv .lk-inv__char input:checked + .lk-inv__char-card {
  border-color: #f2b94b !important;
  background: #2a2416 !important;
  box-shadow: none !important;
}
html.dark .lk-b-inv .lk-inv__char input:focus-visible + .lk-inv__char-card { outline: 2px solid #f2b94b; outline-offset: 2px; }
html.dark .lk-b-inv .lk-inv__char-status { left: 11px; background: #6f7077; }
html.dark .lk-b-inv .lk-inv__char.is-online .lk-inv__char-status { background: #7fd6a3; }
html.dark .lk-b-inv .lk-inv__char-name { font-weight: 700; color: #ececee; white-space: nowrap; }
html.dark .lk-b-inv .lk-inv__char-meta { font-size: 0.75rem; color: #a6a7ad; }

/* Шапка списка */
html.dark .lk-b-inv .lk-inv__wh-head { margin-bottom: 10px; }
html.dark .lk-b-inv .lk-inv__items-tools { display: flex; flex-wrap: wrap; gap: 6px; }
html.dark .lk-b-inv .lk-inv__linkbtn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px !important;
  border: 0 !important;
  background: #26272c !important;
  color: #ececee !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
}
html.dark .lk-b-inv .lk-inv__linkbtn:hover { background: #2c2d33 !important; }
html.dark .lk-b-inv .lk-inv__wh-status { color: #a6a7ad; font-size: 0.85rem; }

/* Предметы: строки-карточки */
html.dark .lk-b-inv .lk-inv__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}
html.dark .lk-b-inv .lk-inv__slot {
  position: relative;
  width: auto !important;
  height: auto !important;
  min-height: 56px;
  padding: 8px 12px 8px 8px;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto 22px;
  align-items: center;
  column-gap: 12px;
  place-items: center start;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: #26272c !important;
  box-shadow: none !important;
  overflow: visible;
}
html.dark .lk-b-inv .lk-inv__slot:hover { border-color: #3a3b42 !important; }
html.dark .lk-b-inv .lk-inv__slot.is-on {
  border-color: #f2b94b !important;
  background: #2a2416 !important;
}
html.dark .lk-b-inv .lk-inv__slot.is-aug::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: #b48cff;
}
html.dark .lk-b-inv .lk-inv__slot img {
  order: 0;
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 10px !important;
  background: #1d1e23;
}
html.dark .lk-b-inv .lk-inv__slot::after {
  content: attr(data-tip-name);
  order: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #ececee;
  justify-self: stretch;
}
html.dark .lk-b-inv .lk-inv__slot-qty {
  order: 2;
  position: static;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ececee;
  text-shadow: none;
  font-variant-numeric: tabular-nums;
}
html.dark .lk-b-inv .lk-inv__slot-qty::before { content: "×"; color: #a6a7ad; }
html.dark .lk-b-inv .lk-inv__slot-ench {
  left: 6px;
  top: 4px;
  padding: 1px 4px;
  border-radius: 6px;
  background: #131417;
  color: #f2b94b;
  font-size: 0.65rem;
  z-index: 1;
}
/* Отметка выбора: пустой кружок всегда, галочка — когда выбрано */
html.dark .lk-b-inv .lk-inv__slot-check,
html.dark .lk-b-inv .lk-inv__slot-check[hidden] {
  display: block !important;
  order: 3;
  position: relative;
  right: auto;
  top: auto;
  width: 22px;
  height: 22px;
  border-radius: 50% !important;
  background: transparent;
  box-shadow: inset 0 0 0 2px #55565c;
  justify-self: end;
}
html.dark .lk-b-inv .lk-inv__slot-check[hidden]::after { display: none; }
html.dark .lk-b-inv .lk-inv__slot.is-on .lk-inv__slot-check {
  background: #f2b94b;
  box-shadow: none;
}
html.dark .lk-b-inv .lk-inv__slot.is-on .lk-inv__slot-check::after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border-color: #1a1408;
  border-width: 0 2px 2px 0;
}
html.dark .lk-b-inv .lk-inv__slot-edit { order: 4; }

/* Итог и кнопка: на телефоне прилипает к низу экрана */
html.dark .lk-b-inv .lk-inv__footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 12px -16px -16px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #2c2d33;
  border-radius: 0 0 20px 20px !important;
  background: #1d1e23 !important;
}
html.dark .lk-b-inv .lk-inv__footer-copy { color: #a6a7ad; font-size: 0.9rem; }
html.dark .lk-b-inv .lk-inv__submit {
  width: 100%;
  min-height: 50px;
  border-radius: 14px !important;
  border: 0 !important;
  background: #f2b94b !important;
  color: #1a1408 !important;
  font: inherit;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html.dark .lk-b-inv .lk-inv__submit:hover:not(:disabled) { background: #ffd27a !important; }
html.dark .lk-b-inv .lk-inv__submit:disabled {
  background: #26272c !important;
  color: #6f7077 !important;
  cursor: not-allowed;
}

/* Подсказка по предмету */
html.dark .lk-inv__tip {
  border-radius: 16px !important;
  border: 1px solid #3a3b42 !important;
  background: #1d1e23 !important;
  color: #ececee !important;
}

@media (min-width: 640px) {
  html.dark .lk-b-inv .lk-inv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.dark .lk-b-inv .lk-inv__footer { flex-direction: row; align-items: center; justify-content: space-between; }
  html.dark .lk-b-inv .lk-inv__submit { width: auto; padding: 0 26px; }
}
@media (min-width: 1024px) {
  html.dark .lk-b-inv .lk-inv__wh.lk-b-inv-wh { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
  html.dark .lk-b-inv .lk-inv__char-grid--compact {
    flex-direction: column;
    max-height: 28rem;
    overflow-x: hidden;
    overflow-y: auto;
  }
  html.dark .lk-b-inv .lk-inv__char-name { white-space: normal; }
  html.dark .lk-b-inv .lk-inv__footer { position: static; margin: 14px 0 0; padding: 14px 0 0; border-radius: 0 !important; background: transparent !important; }
}
@media (prefers-reduced-motion: reduce) {
  html.dark .lk-b-inv * { transition: none !important; }
}

/* ---------- Чистовая правка инвентаря ---------- */
/* персонаж: точка, имя и статус в одну линию по центру */
.lk-theme-wallet .lk-b-inv .lk-inv__char-card {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 48px;
  padding: 8px 12px !important;
}
.lk-theme-wallet .lk-b-inv .lk-inv__char-status { position: static !important; flex-shrink: 0; margin: 0 !important; }
.lk-theme-wallet .lk-b-inv .lk-inv__char-name { flex: 1 1 auto; min-width: 0; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-theme-wallet .lk-b-inv .lk-inv__char-meta { position: static !important; margin: 0 0 0 auto !important; font-size: 12px; white-space: nowrap; }
@media (max-width: 1023px) {
  .lk-theme-wallet .lk-b-inv .lk-inv__char-card { flex-direction: column; align-items: flex-start !important; gap: 0 !important; min-height: 0; }
  .lk-theme-wallet .lk-b-inv .lk-inv__char-meta { margin: 0 !important; }
}
/* нижняя плашка «Выбрано / Перевести» — без рамки HUD, кнопка без капслока */
.lk-theme-wallet .lk-b-inv .lk-inv__footer {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 16px !important;
  background: #26272c !important;
  padding: 12px 14px !important;
  gap: 12px;
  align-items: center;
}
.lk-theme-wallet .lk-b-inv .lk-inv__footer .btn,
.lk-theme-wallet .lk-b-inv .lk-inv__footer button {
  min-height: 48px;
  border-radius: 14px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 700 !important;
}
.lk-theme-wallet .lk-b-inv .lk-inv__footer button:not(:disabled),
.lk-theme-wallet .lk-b-inv .lk-inv__footer .btn:not([disabled]) {
  background: #f2b94b !important;
  border-color: #f2b94b !important;
  color: #1a1408 !important;
}
.lk-theme-wallet .lk-b-inv .lk-inv__footer button:disabled,
.lk-theme-wallet .lk-b-inv .lk-inv__footer .btn[disabled] {
  background: #1d1e23 !important;
  border-color: #2c2d33 !important;
  color: #6f7077 !important;
}
