/* Flujo de trabajo vertical, fijo a la izquierda. Se rellena con el scroll: la
   linea avanza, los pasos se encienden y la fase en curso se destaca. */
#uc-flow {
  --p: 0%;
  /* La caja arranca en el borde izquierdo y se extiende hacia alli; su borde derecho
     queda donde estaba (12-18px + 146px). */
  --inset: clamp(12px, 1vw, 18px);
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  width: calc(var(--inset) + 146px); z-index: 40;
  padding: 16px 14px 14px calc(var(--inset) + 14px);
  background: rgba(0, 0, 0, .8);
  border: 1px solid var(--border); border-left: 0; border-radius: 0 14px 14px 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--sans); color: var(--fg);
  transition: translate .5s var(--ease), opacity .4s var(--ease);
}

/* Colapsado: se desliza a la izquierda y solo queda visible el boton */
#uc-flow.is-collapsed { translate: calc(-100% + var(--inset) + 14px) 0; }
#uc-flow.is-collapsed > :not(.uc-toggle) { opacity: 0; pointer-events: none; }
#uc-flow > :not(.uc-toggle) { transition: opacity .3s var(--ease); }

#uc-flow .uc-toggle {
  position: absolute; right: -14px; top: 18px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  background: rgba(0, 0, 0, .9); border: 1px solid var(--border-strong); color: var(--fg);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
#uc-flow .uc-toggle:hover, #uc-flow .uc-toggle:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
#uc-flow .uc-toggle svg { width: 14px; height: 14px; transition: transform .5s var(--ease); }
#uc-flow.is-collapsed .uc-toggle svg { transform: rotate(180deg); }

#uc-flow .uc-title { margin-bottom: 14px; }
#uc-flow .uc-title b {
  display: block; white-space: nowrap; font-weight: 600; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}


#uc-flow .uc-track { position: relative; }

/* Linea vertical: va del primer al ultimo punto. El relleno es una mascara que
   tapa lo que falta; el punto blanco marca la posicion del scroll. */
#uc-flow .uc-linebar {
  position: absolute; left: 3.5px; width: 3px; top: 0; height: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #d963b6 0%, #f9a072 35%, #8462c9 70%, #d963b6 100%);
}
#uc-flow .uc-mask {
  position: absolute; left: -2px; right: -2px; top: var(--p); bottom: 0;
  background: #0b0c10;
  transition: top .2s linear;
}
#uc-flow .uc-mask::before {
  content: ''; position: absolute; left: 50%; top: 0;
  width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.14), 0 0 14px rgba(255,255,255,.7);
}

/* Fases: encabezado con su nombre; la activa toma el color de la fase */
#uc-flow .uc-phase { margin: 30px 0 10px; padding-left: 22px; --c: var(--accent); transition: opacity .4s var(--ease); opacity: .5; }
#uc-flow .uc-phase.is-active { opacity: 1; }
#uc-flow .uc-phase-t, #uc-flow .uc-phase-s { display: block; line-height: 1.25; }
#uc-flow .uc-phase-t {
  font-weight: 600; font-size: var(--step--1); letter-spacing: .14em; color: var(--fg-read);
  transition: color .4s var(--ease);
}
#uc-flow .uc-phase.is-active .uc-phase-t { color: var(--c); }
#uc-flow .uc-phase-s { font-weight: 400; font-size: 12.5px; color: var(--fg-muted); }

/* Pasos: punto + etiqueta en una fila */
#uc-flow .uc-steps { list-style: none; margin: 0; padding: 0; }
#uc-flow .uc-step {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  min-height: 28px; --c: var(--accent);
}
#uc-flow .uc-dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px;
  background: rgba(255,255,255,.28);
  transition: background .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
#uc-flow .uc-step.is-lit .uc-dot { background: var(--c); transform: scale(1.2); box-shadow: 0 0 12px var(--c); }
#uc-flow .uc-label {
  font-weight: 400; font-size: 13px; line-height: 1.3; color: rgba(255,255,255,.6);
  transition: color .35s var(--ease);
}
#uc-flow .uc-step.is-lit .uc-label { color: #fff; }

@keyframes uc-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.5); } 100% { transform: scale(1.2); } }
#uc-flow .uc-step.is-lit .uc-dot { animation: uc-pop .55s var(--ease); }

/* Pantallas estrechas: la barra taparia el contenido; queda oculta */
@media (max-width: 1240px) { #uc-flow { display: none; } }
@media (prefers-reduced-motion: reduce) { #uc-flow .uc-step.is-lit .uc-dot { animation: none; } }
