/* ============================================================
   smgr · css/pages/viz_evolucion_estadisticas.css — "La ACB en números"
   (visualizacion_evolucion_estadisticas.php).
   · Controles FUERA del #captureArea (namespace .eve-), en estilo Foco.
   · Tarjeta capturable oscura (#2d3748) como la del triple, 1100px de ancho
     natural, todo scopeado bajo #captureArea.
   ============================================================ */

/* ---------- Controles ---------- */
.eve-tools {
  margin: var(--sp-4) auto 0;
  max-width: 1100px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 13px;
}
.eve-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.eve-presets__lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.eve-chip {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--ink); border: 1px solid transparent;
}
.eve-chip:hover { border-color: var(--accent); }

.eve-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eve-axis {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.eve-axis__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.eve-axis__title { font-weight: 700; color: var(--ink); }
.eve-axis__title small { font-weight: 500; color: var(--muted); }

.eve-pills { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.eve-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 10px; border-radius: var(--r-pill);
  background: #f4f3ee; font-weight: 600; color: var(--ink); font-size: 12.5px;
}
.eve-pill i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.eve-pill button {
  border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  width: 20px; height: 20px; border-radius: 50%; color: var(--muted);
}
.eve-pill button:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.eve-empty { color: var(--muted); font-size: 12.5px; }

.eve-tools select {
  font: inherit; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  max-width: 100%;
}
.eve-tools select:focus-visible, .eve-tools button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.eve-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.eve-seg button {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border: 0; background: #fff; color: var(--muted);
}
.eve-seg button + button { border-left: 1px solid var(--line); }
.eve-seg button.on { background: var(--ink); color: #fff; }

.eve-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.eve-field { display: flex; flex-direction: column; gap: 4px; }
.eve-field > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.eve-checks { align-items: center; gap: 8px 18px; }
.eve-checks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink); }
.eve-checks label[hidden] { display: none; }
.eve-link { font: inherit; font-size: 12.5px; border: 0; background: none; color: var(--accent-deep); cursor: pointer; text-decoration: underline; padding: 0; }
.eve-hint { font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 720px) {
  .eve-axes { grid-template-columns: 1fr; }
  .eve-tools { padding: 14px 12px; }
}

/* Tooltip (en <body>, fuera de la captura) */
.eve-tip {
  position: fixed; z-index: 50; pointer-events: none;
  background: #1a202c; color: #e2e8f0; border-radius: 8px; padding: 8px 10px;
  font: 12px/1.45 'Inter', sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.eve-tip b { color: #fff; }
.eve-tip div { display: flex; align-items: center; gap: 6px; }
.eve-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- Tarjeta capturable ---------- */
#captureArea {
  font-family: 'Inter', sans-serif;
  background: #2d3748;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 1100px;
}
#captureArea * { box-sizing: border-box; }

#captureArea .chart-header { padding: 20px 30px 0; display: flex; align-items: center; gap: 15px; }
#captureArea .chart-header__txt { min-width: 0; flex: 1; }
#captureArea .chart-header h2 { color: #fff; font-size: 22px; font-weight: 800; line-height: 1.25; }
#captureArea .chart-header p { color: #a0aec0; font-size: 12px; margin-top: 4px; }
#captureArea [contenteditable] { outline: none; border-radius: 4px; cursor: text; }
#captureArea [contenteditable]:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
#captureArea [contenteditable]:focus { box-shadow: 0 0 0 1px #d4a76a; }

#captureArea .legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 14px 24px 4px; }
#captureArea .lg-item { display: inline-flex; align-items: center; gap: 8px; color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
#captureArea .lg-item em { font-style: normal; color: #a0aec0; font-weight: 500; }
#captureArea .lg-bar { display: inline-block; width: 16px; height: 11px; border-radius: 2px; }
#captureArea .lg-line { display: inline-block; width: 22px; height: 3px; border-radius: 2px; }

#captureArea #eveChart { padding: 0 6px; }

#captureArea .chart-notes { display: flex; gap: 12px; padding: 6px 30px 10px; }
#captureArea .chart-notes[hidden] { display: none; }
#captureArea .note {
  flex: 1; background: rgba(255,255,255,0.05);
  border-left: 3px solid #d4a76a; border-radius: 6px; padding: 10px 14px;
}
#captureArea .note-label { color: #a0aec0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
#captureArea .note-value { color: #fff; font-size: 22px; font-weight: 800; margin-top: 2px; }
#captureArea .note-sub { color: #cbd5e0; font-size: 12px; margin-top: 2px; }

#captureArea .chart-foot { display: flex; flex-direction: column; gap: 2px; padding: 4px 30px 10px; }
#captureArea .chart-foot span { color: #a0aec0; font-size: 11px; line-height: 1.4; }

#captureArea .chart-footer {
  padding: 10px 20px; text-align: center; font-size: 12px;
  display: flex; justify-content: center; gap: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
#captureArea .chart-footer span { color: #fff; opacity: 0.8; }
