/* =========================================================
   trade-panels.styles.css — shared Upgrader / Exchange UI
   Panels, inventory item cards, filter groups.
   ========================================================= */

.trade-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  margin: 24px 0 28px;
}
.trade-slot {
  background: linear-gradient(180deg, var(--card), #17233a);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  min-height: 220px;
}
.trade-slot__icons { display: flex; gap: 10px; }
.trade-slot__icon {
  width: 56px; height: 56px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--border);
}
.trade-slot__icon svg { width: 26px; height: 26px; }
.trade-slot__label { font-weight: 700; font-size: 15px; }
.trade-slot__sub { color: var(--muted); font-size: 12.5px; margin-top: -8px; }
.trade-slot__total {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 20px; font-weight: 800;
}
.trade-slot__total .plus { font-size: 13px; color: var(--green); font-weight: 700; }
.trade-slot__total .mult { font-size: 13px; color: var(--orange-hi); font-weight: 700; }

.trade-wheel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
}
.trade-wheel__ring {
  position: relative;
  width: 190px; height: 190px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--bg-2) 76%, transparent 77% 100%),
    conic-gradient(var(--blue-hi) 0deg, var(--border) 0deg);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--border);
}
.trade-wheel__value { font-size: 30px; font-weight: 800; }
.trade-wheel__caption { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.trade-wheel__arrow {
  position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  color: var(--blue-hi);
}
.trade-wheel__arrow svg { width: 16px; height: 16px; }

.trade-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}
.trade-balance { display: flex; align-items: center; gap: 12px; }
.trade-balance__label { font-size: 13px; font-weight: 600; }
.trade-balance__amt { font-size: 12.5px; color: var(--muted); }
.toggle {
  position: relative;
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--border);
  flex-shrink: 0;
  border: 0;
}
.toggle::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease);
}
.toggle.is-on { background: var(--blue); }
.toggle.is-on::after { transform: translateX(18px); }

.mult-group { display: flex; gap: 8px; }
.mult-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-weight: 700; font-size: 13px;
  transition: all .2s;
}
.mult-btn:hover { border-color: var(--blue-hi); color: #fff; }
.mult-btn.is-active {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: transparent; color: #fff;
}

.trade-action { display: flex; justify-content: center; margin-bottom: 32px; }

/* ---- Panels: inventory / catalog ---- */
.trade-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.trade-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 320px;
}
.trade-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.trade-panel__head h2 {
  margin: 0; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.trade-panel__count { color: var(--muted); font-weight: 500; font-size: 13px; }
.trade-panel__sort {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px;
  color: var(--text-2); font-size: 12px; font-weight: 600;
}
.trade-panel__sort svg { width: 11px; height: 11px; }

.trade-search { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.trade-search input {
  flex: 1; min-width: 140px;
  height: 38px; border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f1a2c; color: #fff;
  padding: 0 12px 0 34px; font-size: 13px;
  position: relative;
}
.trade-search__field { position: relative; flex: 1; min-width: 140px; }
.trade-search__field svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: var(--muted); pointer-events: none;
}
.trade-search__field input { width: 100%; }
.trade-search input.price-input { max-width: 100px; padding-left: 12px; flex: none; }

.trade-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px; color: var(--muted); font-size: 13.5px; text-align: center;
  min-height: 180px;
}
.trade-empty svg { width: 34px; height: 34px; opacity: .5; }

/* ---- Inventory item cards ---- */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
.inv-item {
  position: relative;
  background: linear-gradient(180deg, var(--card-2), #1a2740);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px 10px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.inv-item:hover {
  transform: translateY(-3px);
  border-color: rgba(79,155,255,.5);
  box-shadow: var(--shadow);
}
.inv-item__tags {
  position: absolute; top: 6px; left: 6px; right: 6px;
  display: flex; justify-content: space-between;
}
.skin-badge {
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  padding: 2px 5px; border-radius: 4px;
}
.skin-badge--st { color: var(--orange-hi); background: rgba(245,158,11,.14); }
.inv-item__hex {
  position: relative;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin-top: 10px;
}
.inv-item__hex svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.inv-item__hex img { position: relative; width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.inv-item__name { font-size: 11.5px; font-weight: 700; color: #eaf1f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.inv-item__weapon { font-size: 10px; color: var(--muted); }
.inv-item__price { font-size: 12px; font-weight: 800; color: var(--orange-hi); margin-top: 2px; }

.trade-pagination {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 16px; color: var(--muted); font-size: 13px;
}
.trade-pagination button {
  width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  display: grid; place-items: center;
}
.trade-pagination button:hover { border-color: var(--blue-hi); color: #fff; }
.trade-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.trade-pagination button svg { width: 12px; height: 12px; }

/* ---- Filter side panel (Exchange only) ---- */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.filter-group { border-top: 1px solid var(--border-soft); padding: 10px 0; }
.filter-group:first-child { border-top: 0; padding-top: 0; }
.filter-group__head {
  width: 100%; background: transparent; border: 0; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px;
  padding: 6px 2px;
}
.filter-group__head .chev { color: var(--muted); transition: transform .25s var(--ease); }
.filter-group.is-open .filter-group__head .chev { transform: rotate(180deg); }
.filter-group__body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .25s var(--ease);
}
.filter-group.is-open .filter-group__body { grid-template-rows: 1fr; }
.filter-group__body > div { overflow: hidden; padding-top: 6px; }
.filter-check {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 4px; font-size: 13px; color: var(--text-2);
  cursor: pointer;
}
.filter-check input { accent-color: var(--blue); width: 15px; height: 15px; }
.filter-check .rarity-dot { width: 4px; height: 14px; border-radius: 2px; display: inline-block; }
.filter-price-row { display: flex; gap: 8px; }
.filter-price-row input {
  width: 100%; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: #0f1a2c;
  color: #fff; padding: 0 10px; font-size: 12.5px;
}
.filter-cta { margin-top: 8px; }

@media (max-width: 1100px) {
  .trade-hero { grid-template-columns: 1fr; }
  .trade-panels { grid-template-columns: 1fr; }
  .inv-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .trade-controls { flex-direction: column; align-items: stretch; }
  .inv-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
