/* Top 10 Industries Supplying Production, from js/supporting-industries.js.
   Used by the product label (with label.css) and profile/footprint. */
.supporting-industries {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}
/* EPA / UN data source toggle and the factor dropdown above the ranking */
.si-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 4px;
}
.si-source {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}
.si-source-btn {
  padding: 3px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
}
.si-source-btn[aria-pressed="true"] {
  background: #3b82f6;
  color: white;
}
.si-source-btn:not([aria-pressed="true"]):not(:disabled):hover {
  background: #cbd5e1;
}
.si-source-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dark .si-source {
  background: #334155;
}
.dark .si-source-btn {
  color: #cbd5e1;
}
.dark .si-source-btn:not([aria-pressed="true"]):not(:disabled):hover {
  background: #475569;
}
/* Factor dropdown, matching the trade map's #factor control */
.si-factor {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85em;
  color: #334155;
}
.si-factor-select {
  padding: 0.25em 0.5em;
  font-size: 1em;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: inherit;
  max-width: 100%;
}
.si-factor-note {
  margin-bottom: 8px;
}
.dark .si-factor {
  color: #e2e8f0;
}
.dark .si-factor-select {
  background: #1e293b;
  border-color: #475569;
}
/* State electricity grid (eGRID) below the Energy Use ranking, colored like #stateEnergyMix */
.si-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.si-grid-title {
  font-size: 0.85em;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.si-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 7em) 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.8em;
  color: #475569;
}
.si-grid-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.si-grid-bar {
  display: flex;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
}
.si-grid-bar span {
  height: 100%;
}
.si-grid .supporting-industries-link {
  display: inline-block;
  margin-top: 6px;
}
.dark .si-grid {
  border-top-color: #334155;
}
.dark .si-grid-title {
  color: #e2e8f0;
}
.dark .si-grid-row {
  color: #cbd5e1;
}
.dark .si-grid-bar {
  background: #334155;
}
.supporting-industries-state + .supporting-industries-state {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.supporting-industries-context,
.supporting-industries-status {
  font-size: 0.8em;
  color: #64748b;
}
.supporting-industries-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.75em;
  color: #475569;
}
.si-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.si-state { background: #7c3aed; }
.si-rous { background: #38bdf8; }
.si-foreign { background: #f59e0b; }
.supporting-industries-list {
  list-style: decimal;
  margin: 0;
  padding-left: 20px;
}
.supporting-industries-list li {
  margin-bottom: 8px;
  font-size: 0.85em;
  color: #334155;
}
.si-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.si-value {
  font-weight: 600;
  white-space: nowrap;
}
.si-bar {
  display: flex;
  height: 6px;
  margin: 3px 0 2px;
  border-radius: 3px;
  overflow: hidden;
  background: #e2e8f0;
}
.si-bar span {
  height: 100%;
}
.si-split {
  font-size: 0.85em;
  color: #64748b;
}
.si-rank {
  font-weight: 600;
  margin-right: 6px;
}
.si-legend-caption {
  margin: -4px 0 8px;
  font-size: 0.75em;
}
/* Star and side hover box on the product's own manufacturing industry */
.si-own-row {
  position: relative;
  outline: none;
}
.si-own-star {
  font-size: 14px;
  line-height: 1;
  margin-left: 4px;
  color: #f59e0b;
}
.si-row-tip {
  display: none;
  position: absolute;
  left: calc(100% + 16px);
  top: -6px;
  width: 260px;
  z-index: 30;
  padding: 10px 12px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
  font-size: 0.85em;
  line-height: 1.45;
  color: #334155;
}
.si-own-row:hover .si-row-tip,
.si-own-row:focus-visible .si-row-tip {
  display: block;
}
.si-own-row:focus-visible {
  box-shadow: 0 0 0 2px #7c3aed;
  border-radius: 4px;
}
/* Product's own industry, shown apart from the ranked list when it's outside the top 10 */
.si-own-industry {
  margin: 4px 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 0.85em;
  color: #334155;
}
.si-own-label {
  font-size: 0.85em;
  color: #64748b;
  margin-bottom: 2px;
}
.supporting-industries-link {
  display: inline-block;
  font-size: 0.8em;
  color: #3b82f6;
}
.supporting-industries-note {
  margin: 8px 0 0;
  font-size: 0.75em;
  font-style: italic;
  color: #64748b;
}
.dark .supporting-industries {
  background: #1e293b;
  border-color: #334155;
}
.dark .supporting-industries-state + .supporting-industries-state {
  border-top-color: #334155;
}
.dark .supporting-industries-list li {
  color: #e2e8f0;
}
.dark .supporting-industries-legend {
  color: #cbd5e1;
}
.dark .si-bar {
  background: #334155;
}
.dark .supporting-industries-context,
.dark .supporting-industries-status,
.dark .si-split,
.dark .supporting-industries-note {
  color: #94a3b8;
}
.dark .supporting-industries-link {
  color: #60a5fa;
}
.dark .si-own-industry {
  background: #1e293b;
  color: #e2e8f0;
}
.dark .si-own-label {
  color: #94a3b8;
}
.dark .si-row-tip {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
