/* ═══════════════════════════════════
   TRADE PAGE — trade.css
   ═══════════════════════════════════ */

.trade-hero {
  background: linear-gradient(135deg, #0a0a1f 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}
.trade-hero h1 { font-size: clamp(1.8rem,4vw,2.8rem); margin-bottom: 0.6rem; }
.accent { color: var(--accent); }
.trade-hero-sub { color: var(--text-muted); max-width: 600px; font-size: 1.05rem; }

/* ── Trade Calculator ── */
.trade-calc-section { margin: 2rem auto; }
.trade-calc-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .trade-calc-wrap {
    grid-template-columns: 1fr;
  }
  .trade-verdict-col { order: 3; }
  #getSide { order: 2; }
  #giveSide { order: 1; }
}

.trade-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
}
.trade-side h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.trade-items { min-height: 80px; margin-bottom: 0.8rem; }
.no-items-msg { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 1rem 0; }

.trade-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.trade-item-row:last-child { border-bottom: none; }
.ti-info { flex: 1; }
.ti-info strong { display: block; font-size: 0.9rem; }
.ti-detail { font-size: 0.75rem; color: var(--text-muted); }
.ti-value { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.ti-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.ti-remove:hover { color: #f06060; background: #3a1a1a; }

.add-item-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 0.75rem;
}
.add-item-btn:hover { background: var(--surface-raised, #22224a); border-color: var(--accent); }

.trade-total { font-size: 0.88rem; color: var(--text-muted); text-align: right; }
.trade-total-value { font-size: 1rem; font-weight: 700; }

/* ── Verdict column ── */
.trade-verdict-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 3rem;
}
@media (max-width: 768px) { .trade-verdict-col { padding-top: 0; } }

.calc-trade-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.calc-trade-btn:hover { opacity: 0.85; }

.verdict-display { min-width: 160px; text-align: center; }
.verdict-placeholder { font-size: 0.82rem; color: var(--text-muted); padding: 0.5rem; max-width: 140px; }

.verdict-result {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
}
.verdict-label { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.verdict-nums { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.verdict-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }

.vd-win  { border-color: #50d090; }
.vd-win .verdict-label  { color: #50d090; }
.vd-fair { border-color: #f0c060; }
.vd-fair .verdict-label { color: #f0c060; }
.vd-loss { border-color: #f06060; }
.vd-loss .verdict-label { color: #f06060; }

/* ── Modal ── */
.item-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-inner h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.modal-inner label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.25rem; margin-top: 0.8rem; }
.modal-inner select, .modal-inner input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}
.modal-inner select option {
  background: #1a1a2e;
  color: #e0e0e0;
}
.modal-inner select:focus, .modal-inner input:focus { border-color: var(--accent); }
.modal-inner select[multiple] { padding: 0.25rem; }
.modal-preview { margin-top: 0.9rem; font-size: 0.9rem; color: var(--text-muted); }
.modal-preview strong { color: var(--accent); }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.btn { display: inline-block; padding: 0.65rem 1.2rem; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 0.9rem; cursor: pointer; border: none; transition: opacity 0.15s; }
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { opacity: 0.85; }
.btn-ghost { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ── Tips ── */
.trade-tips { margin-bottom: 2.5rem; }
.trade-tips h2 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tip-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; }
.tip-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.tip-card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.tip-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; margin: 0; }

/* ── Most Traded ── */
.trade-most { margin-bottom: 2.5rem; }
.trade-most h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.section-sub { color: var(--text-muted); margin-bottom: 1.2rem; font-size: 0.9rem; }
.most-traded-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }
.mt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; border-top: 3px solid var(--border); }
.mt-hot { border-top-color: var(--accent); }
.mt-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.mt-rarity { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.72rem; font-weight: 700; margin-bottom: 0.4rem; }
.mt-value { font-size: 0.82rem; color: var(--text-muted); }
.mt-trade { font-size: 0.88rem; font-weight: 700; color: var(--accent); margin: 0.2rem 0; }
.mt-why { font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }

/* Rarity colors (shared) */
.rarity-badge, .mt-rarity { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.rarity-common    { background:#3a4a2a; color:#7ec850; }
.rarity-uncommon  { background:#2a4a3a; color:#50e0a0; }
.rarity-rare      { background:#2a3a5a; color:#60a0f0; }
.rarity-epic      { background:#3a2a5a; color:#b060f0; }
.rarity-legendary { background:#4a3a1a; color:#f0c060; }
.rarity-mythical  { background:#4a1a4a; color:#e060e0; }
.rarity-divine    { background:#3a2010; color:#f08040; }

/* ── FAQ ── */
.trade-faq { max-width: 780px; margin-bottom: 3rem; }
.trade-faq h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.6rem; overflow: hidden; }
.faq-item summary { padding: 0.85rem 1rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: "›"; font-size: 1.2rem; transform: rotate(90deg); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(270deg); }
.faq-item p { padding: 0 1rem 0.85rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; margin: 0; }
.no-results { text-align: center; padding: 2rem; color: var(--text-muted); }
