/* ── POWDER PAGE ──────────────────────────────────────────────────────── */

body.powder-page {
  background: var(--bg);
}

.powder-body {
  padding: 0 0 80px;
}

.powder-cta {
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  padding: 56px 0;
}

/* ── BRAND SELECT ─────────────────────────────────────────────────────── */
.brand-select {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 8px 32px 8px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s;
  flex-shrink: 0;
  max-width: 160px;
}
.brand-select:focus { border-color: rgba(255,212,59,0.35); }
.brand-select option { background: #0d0f1a; color: var(--text); }

/* ── TABLE COLUMNS ────────────────────────────────────────────────────── */
.col-product { min-width: 200px; }
.col-pbrand  { min-width: 100px; }
.col-ptype   { min-width: 90px; }
.col-burn    { min-width: 130px; }
.col-use     { min-width: 76px; }
.col-temp    { min-width: 80px; }

.td-pbrand {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.75);
}

/* ── TYPE BADGES ──────────────────────────────────────────────────────── */
.type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.type-ball     { background: rgba(52,152,219,0.12); color: #5dade2; border: 0.5px solid rgba(52,152,219,0.25); }
.type-extruded { background: rgba(46,204,113,0.10); color: #58d68d; border: 0.5px solid rgba(46,204,113,0.20); }
.type-disc     { background: rgba(155,89,182,0.12); color: #bb8fce; border: 0.5px solid rgba(155,89,182,0.25); }
.type-flake    { background: rgba(230,126,34,0.10); color: #f0a070; border: 0.5px solid rgba(230,126,34,0.20); }
.type-other    { background: rgba(255,255,255,0.05); color: var(--muted); border: 0.5px solid var(--border); }

/* ── BURN RATE CELL (table) ───────────────────────────────────────────── */
.burn-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.burn-rank {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.burn-bar-wrap {
  width: 80px;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}

.burn-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  min-width: 2px;
  transition: width 0.3s ease;
}

/* ── BURN SCALE (detail panel) ────────────────────────────────────────── */
.burn-scale {
  margin-bottom: 4px;
}

.burn-scale-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  margin-bottom: 10px;
  overflow: visible;
}

.burn-scale-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, hsl(216,72%,55%) 0%, hsl(173,72%,55%) 25%, hsl(90,65%,55%) 50%, hsl(38,80%,55%) 75%, hsl(10,80%,55%) 100%);
  border-radius: 3px;
}

.burn-scale-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
}

.burn-scale-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 0.3px;
}

.burn-scale-labels .burn-scale-rank {
  color: var(--accent);
  font-weight: 700;
}

/* ── USE TAGS (table — single letter) ────────────────────────────────── */
.use-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  margin-right: 2px;
}
.use-pistol        { background: rgba(52,152,219,0.12); color: #5dade2; border: 0.5px solid rgba(52,152,219,0.25); }
.use-rifle         { background: rgba(46,204,113,0.10); color: #58d68d; border: 0.5px solid rgba(46,204,113,0.20); }
.use-shotgun       { background: rgba(230,126,34,0.10); color: #f0a070; border: 0.5px solid rgba(230,126,34,0.20); }
.use-magnum-pistol { background: rgba(52,152,219,0.18); color: #5dade2; border: 0.5px solid rgba(52,152,219,0.40); }
.use-magnum-rifle  { background: rgba(46,204,113,0.16); color: #58d68d; border: 0.5px solid rgba(46,204,113,0.35); }

/* Full use tags (detail panel) */
.use-tag-full {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.use-tag-full.use-pistol        { background: rgba(52,152,219,0.12); color: #5dade2; border: 0.5px solid rgba(52,152,219,0.25); }
.use-tag-full.use-rifle         { background: rgba(46,204,113,0.10); color: #58d68d; border: 0.5px solid rgba(46,204,113,0.20); }
.use-tag-full.use-shotgun       { background: rgba(230,126,34,0.10); color: #f0a070; border: 0.5px solid rgba(230,126,34,0.20); }
.use-tag-full.use-magnum-pistol { background: rgba(52,152,219,0.18); color: #5dade2; border: 0.5px solid rgba(52,152,219,0.40); }
.use-tag-full.use-magnum-rifle  { background: rgba(46,204,113,0.16); color: #58d68d; border: 0.5px solid rgba(46,204,113,0.35); }

/* ── TEMP BADGE ───────────────────────────────────────────────────────── */
.temp-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.temp-low      { color: #58d68d; }
.temp-moderate { color: var(--accent); }
.temp-high     { color: #e74c3c; }

/* ── DISCONTINUED BADGE ───────────────────────────────────────────────── */
.badge-discontinued {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(231,76,60,0.08);
  border: 0.5px solid rgba(231,76,60,0.20);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #c0392b;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── POWDER FILTER ROW 1 override (adds db-actions) ──────────────────── */
.powder-page .filter-row-1 {
  flex-wrap: nowrap;
}

/* ── USE LEGEND ───────────────────────────────────────────────────────── */
.use-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 8px;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
}
.use-legend-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.8px;
  color: var(--dim);
  margin-right: 2px;
}
.use-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
}
.use-legend .use-tag {
  width: 14px;
  height: 14px;
  font-size: 7px;
}

/* ── CALIBER CHIPS BAR ────────────────────────────────────────────────── */
.caliber-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 8px;
}
.caliber-chips-bar:empty { display: none; }

.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,212,59,0.10);
  border: 0.5px solid rgba(255,212,59,0.28);
  border-radius: 4px;
  padding: 2px 5px 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
}

.cal-chip-remove {
  background: none;
  border: none;
  color: var(--accent);
  opacity: 0.5;
  cursor: pointer;
  padding: 0 0 0 3px;
  font-size: 14px;
  line-height: 1;
}
.cal-chip-remove:hover { opacity: 1; }

/* ── CALIBER SUGGESTIONS ──────────────────────────────────────────── */
.caliber-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #12142a;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  z-index: 200;
  display: none;
}
.caliber-suggestions.open { display: block; }

.cal-suggestion {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}
.cal-suggestion:hover { background: rgba(255,255,255,0.05); }
.cal-suggestion-match { color: var(--accent); font-weight: 700; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .detail-panel { width: 100%; min-width: unset; max-width: unset; border-left: none; box-shadow: none; }
  .filter-row-2 { gap: 8px; }
  .chip { padding: 3px 8px; font-size: 8px; }
  .col-temp, .col-pbrand { display: none; }
  .cta-content { grid-template-columns: 1fr; }
  .email-capture { flex-direction: column; }
  .email-input, .btn-primary { width: 100%; }
  .brand-select { max-width: 120px; font-size: 10px; }
  .db-sep { display: none; }
  .db-actions { gap: 8px; }
}

@media (max-width: 520px) {
  .col-ptype { display: none; }
  .result-count { display: none; }
  .burn-bar-wrap { width: 56px; }
}

@media (max-width: 420px) {
  .db-action-btn { font-size: 8px; }
  .burn-bar-wrap { width: 40px; }
}

/* ── BURN RATE BAND HEADERS ────────────────────────────────────────────── */
.band-header {
  background: rgba(255,255,255,0.025) !important;
  cursor: default !important;
  pointer-events: none;
}
.band-header td {
  padding: 10px 14px 6px;
  border-bottom: none;
}
.band-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.band-label {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-right: 10px;
}
.band-sub {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 0.3px;
}

/* ── CALIBER HINT ──────────────────────────────────────────────────────── */
.caliber-hint {
  padding: 5px 34px 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.2px;
  line-height: 1.5;
}
.caliber-hint strong {
  color: var(--muted);
  font-weight: 700;
}
