/* ============================================================
   Parallel Sets specific styles
   ============================================================ */

.dimension-list {
  display: grid;
  gap: 8px;
}

.dimension-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e4e8ef;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.dimension-item.is-disabled {
  opacity: 0.54;
}

.dimension-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 650;
}

.dimension-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #2563eb;
}

.dimension-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dimension-move {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4dbe5;
  border-radius: 6px;
  background: #f8fafc;
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 800;
}

.dimension-move:disabled {
  cursor: default;
  opacity: 0.34;
}

.compact-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
}

.compact-controls .panel-label {
  grid-column: 1 / -1;
  margin-top: 8px;
  margin-bottom: -2px;
}

.compact-controls .panel-label:first-child {
  margin-top: 0;
}

.compact-controls input[type="range"] {
  width: 100%;
  accent-color: #2563eb;
}

.compact-controls span {
  min-width: 34px;
  color: #4b5563;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.parsets-svg {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 1) 42%),
    #fff;
}

.parsets-title {
  fill: #111827;
  font-size: 17px;
  font-weight: 760;
}

.parsets-subtitle {
  fill: #667085;
  font-size: 11px;
}

.dimension-axis-label {
  fill: #111827;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-anchor: middle;
}

.category-bar {
  cursor: pointer;
  fill: #f9fafb;
  stroke: #111827;
  stroke-opacity: 0.2;
  transition:
    fill 0.15s ease,
    stroke-opacity 0.15s ease;
}

.category-group:hover .category-bar {
  fill: #fff;
  stroke-opacity: 0.45;
}

.category-label {
  fill: #1f2937;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.category-value {
  fill: #6b7280;
  font-size: 10px;
  pointer-events: none;
}

.ribbon-layer.is-muted .parsets-ribbon {
  opacity: 0.08 !important;
}

.ribbon-layer.is-muted .parsets-ribbon.is-highlighted {
  opacity: 0.92 !important;
  stroke-opacity: 0.56;
}

.parsets-ribbon {
  cursor: pointer;
  mix-blend-mode: multiply;
  stroke: rgba(17, 24, 39, 0.16);
  stroke-width: 0.7;
  transition:
    opacity 0.15s ease,
    stroke-opacity 0.15s ease;
}

.parsets-ribbon:hover {
  stroke: rgba(17, 24, 39, 0.46);
  stroke-width: 1;
}

.axis-guide {
  stroke: #d9dee7;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-error {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #b42318;
  font-size: 0.92rem;
  text-align: center;
  padding: 24px;
}

#dvz-legend {
  position: absolute;
  z-index: 4;
  max-width: min(240px, 42%);
  max-height: 70%;
  overflow: auto;
  border: 1px solid rgba(217, 222, 231, 0.88);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 9px 10px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

#dvz-legend.top-right {
  top: 12px;
  right: 12px;
}

#dvz-legend.bottom-right {
  right: 12px;
  bottom: 12px;
}

#dvz-legend:empty,
#dvz-legend.none {
  display: none;
}

.legend-title {
  margin-bottom: 7px;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0;
  min-width: 0;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 2px;
}

.legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  #dvz-legend {
    max-width: 56%;
  }

  .category-label,
  .category-value {
    font-size: 10px;
  }
}
