/* =========================================================
   DATOS · Clasificación evolución
   ========================================================= */

.datos-classification-evo-card {
  margin-top: 14px;
  background:
    linear-gradient(
      180deg,
      var(--datos-goals-soft, rgba(255,255,255,.06)) 0%,
      rgba(255,255,255,.025) 100%
    );
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 14px 16px;
  color: white;
  overflow: hidden;
}

.datos-classification-evo-body {
  width: 100%;
  min-width: 0;
}

.datos-classification-evo-graph {
  width: 100%;
  min-width: 0;
}

.datos-classification-evo-card .js-plotly-plot,
.datos-classification-evo-card .plot-container,
.datos-classification-evo-card .svg-container {
  width: 100% !important;
}


/* =========================================================
   DATOS · Clasificación evolución · selector métrica
   ========================================================= */

.datos-classif-evo-metric-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}

.datos-classif-evo-metric-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.68);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

.datos-classif-evo-metric-btn:hover {
  color: white;
  background: rgba(255,255,255,.075);
}

.datos-classif-evo-metric-btn.is-active {
  color: white;
  background:
    linear-gradient(
      90deg,
      var(--datos-goals-soft, rgba(255,255,255,.12)) 0%,
      rgba(255,255,255,.10) 100%
    );
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 18px rgba(255,255,255,.055);
}


/* =========================================================
   DATOS · Leyenda interactiva evolución clasificación
   ========================================================= */

.datos-classification-evo-graph-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.datos-classif-evo-custom-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 13px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 8px 0;
  box-sizing: border-box;
}

.datos-classif-evo-legend-item {
  appearance: none;
  -webkit-appearance: none;

  width: 55px;
  height: 55px;
  padding: 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 2px solid var(--datos-evo-line-color-border, rgba(255,255,255,.28));
  background:
    radial-gradient(
      circle at 50% 50%,
      var(--datos-evo-line-color-soft, rgba(255,255,255,.12)) 0%,
      rgba(255,255,255,.045) 66%,
      rgba(255,255,255,.025) 100%
    );

  box-shadow:
    0 0 0 1px rgba(255,255,255,.035),
    0 0 14px var(--datos-evo-line-color-soft, rgba(255,255,255,.10));

  cursor: pointer;
  opacity: .92;
  transform: translateY(0);
  overflow: hidden;
  box-sizing: border-box;

  transition:
    opacity .18s ease,
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}

.datos-classif-evo-legend-item:hover {
  opacity: 1;
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.datos-classif-evo-legend-item.is-selected {
  opacity: 1;
  border-color: var(--datos-evo-line-color, white);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 0 20px var(--datos-evo-line-color-soft, rgba(255,255,255,.20));
}

.datos-classif-evo-legend-item.is-muted {
  opacity: .24;
  filter: grayscale(.35);
}

.datos-classif-evo-legend-logo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;

  object-fit: contain;
  display: block;

  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  overflow: hidden;

  background: rgba(255,255,255,.92);
  padding: 2px;
  box-sizing: border-box;

  pointer-events: none;
}

.datos-classif-evo-legend-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,.10);
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}