/* ── commo.css — commodity price module styles ──────────────────────── */

/* Summary card */
.commo-card {
  flex-shrink: 0;
  min-width: 148px;
  background: white;
  border-radius: 1rem;
  padding: .875rem;
  border: 1.5px solid #f1f5f9;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.commo-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.commo-card.active {
  border-color: var(--card-color, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-color, #2563eb) 18%, transparent);
}
.dark .commo-card {
  background: #1e293b;
  border-color: #334155;
}
.dark .commo-card.active {
  border-color: var(--card-color, #2563eb);
}

/* Commodity tab pills */
.commo-tab {
  flex-shrink: 0;
  padding: .4rem 1rem;
  border-radius: 9999px;
  font-size: .8125rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.commo-tab:hover { background: #e2e8f0; color: #374151; }
.commo-tab.active { color: white; }
.dark .commo-tab { background: #1e293b; color: #94a3b8; }
.dark .commo-tab:hover { background: #334155; color: #e2e8f0; }
.dark .commo-tab.active { color: white; }

/* Range buttons */
.range-btn {
  padding: .3rem .65rem;
  border-radius: .5rem;
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.range-btn:hover { background: #f1f5f9; color: #374151; }
.range-btn.active { background: #2563eb; color: white; }
.dark .range-btn { color: #94a3b8; }
.dark .range-btn:hover { background: #1e293b; }
.dark .range-btn.active { background: #2563eb; color: white; }

/* Chart type toggle buttons */
.chart-type-btn {
  padding: .3rem .7rem;
  border-radius: .5rem;
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.chart-type-btn.active { background: #334155; color: white; }
.dark .chart-type-btn { background: #1e293b; color: #94a3b8; }
.dark .chart-type-btn.active { background: #475569; color: white; }

/* Canvas chart */
#chart-canvas {
  width: 100%;
  height: 420px;
  display: block;
}
@media (max-width: 640px) {
  #chart-canvas { height: 300px; }
}

/* OHLC bar labels/values */
.ohlc-val { font-size: .75rem; font-weight: 800; }
.ohlc-lbl { font-size: .625rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; }
