/* market.css — Economy tab + the price arrows used across the app. */

/* --- price arrow badge (Items list, Market, Economy) --- */
.mkt-arrow { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 1px 5px; border-radius: 999px; line-height: 1.5; }
.mkt-down { color: #4ccf7a; background: rgba(76, 207, 122, .10); }
.mkt-up   { color: #e2574c; background: rgba(226, 87, 76, .10); }
.mkt-flat { color: var(--text-faint); background: transparent; }
/* arrow + price input on one line inside a table cell */
.mkt-cell { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* --- KPI strip --- */
.mkt-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.mkt-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.mkt-kpi-v { font-family: 'Cinzel', Georgia, serif; font-size: 24px; color: var(--gold-2); line-height: 1.1; }
.mkt-kpi-l { font-size: 12px; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }
.mkt-kpi-s { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.mkt-k-buy .mkt-kpi-v { color: #4ccf7a; }
.mkt-k-sell .mkt-kpi-v { color: #e2574c; }

/* --- two-up grids --- */
.mkt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.mkt-grid > .panel { margin: 0; }
.mkt-col-h { font-family: 'Cinzel', Georgia, serif; font-size: 15px; color: var(--text); margin-bottom: 8px; }

/* --- item rows in the lists --- */
.mkt-li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: inherit; cursor: pointer; }
.mkt-li:hover { background: rgba(255, 255, 255, .03); }
.mkt-li-ic { width: 22px; height: 22px; flex: none; }
.mkt-li-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mkt-li-price { font-variant-numeric: tabular-nums; color: var(--gold-2); font-size: 13px; }
.mkt-empty { color: var(--text-faint); font-size: 12.5px; padding: 10px 8px; }

/* --- recent changes feed --- */
.mkt-feed { display: flex; flex-direction: column; }
.mkt-fe { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border); }
.mkt-fe:last-child { border-bottom: 0; }
.mkt-fe:hover { background: rgba(255, 255, 255, .03); }
.mkt-fe-ic { width: 22px; height: 22px; flex: none; }
.mkt-fe-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mkt-fe-price { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--gold-2); }
.mkt-fe-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; min-width: 120px; text-align: right; }

/* --- chart panel --- */
.mkt-chart-panel { }
.mkt-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mkt-chart-title { display: flex; align-items: center; gap: 8px; font-family: 'Cinzel', Georgia, serif; font-size: 17px; color: var(--text); }
.mkt-ct-ic { width: 26px; height: 26px; }
.mkt-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.mkt-stat { font-size: 12px; color: var(--text-dim); }
.mkt-stat b { color: var(--gold-2); font-variant-numeric: tabular-nums; font-size: 14px; }

.mkt-chart { width: 100%; height: auto; display: block; }
.mkt-area { fill: rgba(201, 162, 77, .10); stroke: none; }
.mkt-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mkt-dot { fill: var(--gold-2); }
.mkt-dot-up { fill: #e2574c; }
.mkt-dot-dn { fill: #4ccf7a; }
.mkt-refline { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 4 4; opacity: .6; }
.mkt-reftext { fill: var(--text-faint); font-size: 10px; }
.mkt-axis { fill: var(--text-faint); font-size: 10px; }
.mkt-chart-empty { color: var(--text-faint); font-size: 13px; padding: 28px 10px; text-align: center; }
.mkt-chart-actions { margin-top: 10px; }

/* --- responsive --- */
@media (max-width: 860px) {
  .mkt-kpis { grid-template-columns: repeat(2, 1fr); }
  .mkt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .mkt-kpis { grid-template-columns: 1fr; }
  .mkt-fe-meta { min-width: 0; }
}
