/* =========================================================================
 * creador.css — Estilos del creador de recursos (editor visual).
 * Complementa shared/css/base.css.
 * ========================================================================= */

.ed-main { padding: 18px 16px 40px; max-width: 1000px; margin: 0 auto; }

/* barra de herramientas */
.ed-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ed-tool {
  border: 1.5px solid #dbe1ea; background: #fff; border-radius: 11px;
  padding: 8px 13px; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.ed-tool svg { width: 15px; height: 15px; }
.ed-tool:hover { border-color: #6366f1; color: #4f46e5; }
.ed-tool.on { background: #6366f1; border-color: #6366f1; color: #fff; }
.ed-tool-sep { width: 1px; height: 24px; background: rgba(148, 163, 184, .4); margin: 0 4px; }
.ed-peso { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #64748b; font-weight: 600; }
.ed-peso input {
  width: 52px; padding: 7px 9px; border-radius: 10px; border: 1.5px solid #dbe1ea;
  font-family: var(--font-mono); font-size: 12px;
}
.ed-hint { font-size: 11px; color: #94a3b8; margin: 0 0 10px; line-height: 1.5; min-height: 16px; }

/* lienzo */
.ed-canvas-card { padding: 14px; margin-bottom: 14px; }
.ed-canvas {
  /* tema para los escenarios (fuera de .sv-root, hay que declararlo aquí) */
  --c-a: #e5484d;
  --c-b: #3b82f6;
  --c-ok: #22c55e;
  --c-card: #ffffff;
  --c-text: #1e293b;
  --c-accent: #8b5cf6;
  position: relative; border-radius: 14px;
  background:
    radial-gradient(rgba(148, 163, 184, .28) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  border: 1.5px dashed rgba(148, 163, 184, .4);
  min-height: 300px;
}
.ed-canvas svg { width: 100%; height: auto; display: block; overflow: visible; }
.ed-canvas .gv-node { cursor: pointer; }
.ed-canvas.herr-mover .gv-node { cursor: grab; }
.ed-canvas .gv-edge-hit { stroke: transparent; stroke-width: 16; cursor: pointer; }
.ed-canvas .gv-conn-src .gv-circle { stroke: #f59e0b; stroke-width: 4; }

/* escenarios DOM (arreglo / lista) dentro del lienzo */
.ed-dom-stage { padding: 34px 14px; }
.ed-dom-stage .av-el, .ed-dom-stage .lv-node { cursor: pointer; }

/* línea de tiempo de pasos */
.ed-steps-card { padding: 14px 16px; margin-bottom: 14px; }
.ed-steps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ed-steps-title { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: #64748b; }
.ed-steps-btns { display: flex; gap: 5px; }
.ed-mini {
  width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid #dbe1ea; background: #fff;
  color: #475569; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.ed-mini svg { width: 14px; height: 14px; }
.ed-mini:hover { border-color: #6366f1; color: #4f46e5; }
.ed-timeline { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px 8px; }
.ed-step {
  flex: none; width: 120px; text-align: left; cursor: pointer;
  border: 1.5px solid #dbe1ea; background: #fff; border-radius: 12px; padding: 8px 10px;
  transition: all .15s;
}
.ed-step:hover { border-color: #a5b4fc; }
.ed-step.on { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); }
.ed-step-num { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #6366f1; }
.ed-step-msg {
  font-size: 10.5px; color: #475569; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 26px;
}

/* propiedades del paso seleccionado */
.ed-props { display: grid; grid-template-columns: 1fr 150px 90px; gap: 10px; margin-top: 10px; }
.ed-props label {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: 1.3px;
  color: #64748b; margin-bottom: 4px; text-transform: uppercase;
}
.ed-props input, .ed-props select {
  width: 100%; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #dbe1ea;
  font-family: var(--font-mono); font-size: 12px; background: #fff;
}
.ed-props select { font-family: var(--font-ui); }
.ed-props input:focus, .ed-props select:focus { outline: none; border-color: #6366f1; }
@media (max-width: 700px) { .ed-props { grid-template-columns: 1fr; } }

/* leyenda de estados */
.ed-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ed-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: #64748b; }
.ed-leg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* vista previa */
#preview { display: none; }
.ed-previewing #editor { display: none; }
.ed-previewing #preview { display: block; }
