/*
Theme Name: Bricks-children
Theme URI: http://www.dwolf-solutions.com
Author: Manuel Sánchez
Author URI: http://www.dwolf-solutions.com
Description: Child Theme del tema Bricks
Version: 1.0
Template: bricks
*/

@import url("../bricks/style.css");

/*Línea temporal*/

/*Versión desktop*/
/* CONTENEDOR GENERAL */
.timeline {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 0;
}

/* barra gris base */
.timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  left: var(--track-left, 0);
  width: var(--track-width, 0);
  height: 10px;
  background: #e0e0e0;
  z-index: 1;
}

/* barra azul */
.timeline::after {
  content: "";
  position: absolute;
  top: 20px;
  left: var(--track-left, 0);
  height: 10px;
  background: #22274b;
  z-index: 2;
  width: calc(
    ((var(--fase-orden) - 1) / 6) * var(--track-width, 0)
  );
}
.timeline::before,
.timeline::after {
  height: 20px;   /* Grosor deseado */
  top: 24px;      /* Ajusta verticalmente para centrar los markers */
}


/* Paso */
.timeline-step {
  position: relative;
  flex: 1 0 0;      /* <- todos los steps mismo ancho, ignorando el contenido */
  min-width: 0;     /* evita que el texto fuerce el ancho */
  text-align: center;
  z-index: 3;
}


.timeline-marker {
  width: 20px;     /* Antes 12 */
  height: 50px;    /* Antes 34 */
  margin: -12px auto 0; /* Ajusta para que “muerda” la barra */
  border-radius: 2px; /* Opcional */
}


.timeline-marker--completed {
  background: #22274b;
}

.timeline-marker--pending {
  background: #e0e0e0;
}

.timeline-label {
  display: block;
  margin-top: 12px;
  margin-left: 0;
  margin-right: 0;
  font-size: 15px;
  font-weight: 700;
}

/*Versión móvil*/
/* Por defecto (desktop): no mostramos el porcentaje */
.timeline-percent{
  display:none;
}

/* ===== MÓVIL ===== */
@media (max-width: 767px){

  /* Ocultar steps visuales (markers + labels) */
  .timeline-step,
  .timeline-marker,
  .timeline-label{
    display:none !important;
  }

  /* Convertimos .timeline en una barra simple */
  .timeline{
    padding: 12px 0 28px;  /* deja hueco para el % debajo */
  }

  /* Barra gris: ocupa todo el ancho del contenedor */
  .timeline::before{
    left: 0 !important;
    width: 100% !important;
    top: 12px !important;
    height: 20px;         /* ajusta grosor si quieres */
    border-radius: 999px; /* opcional */
  }

  /* Barra azul: ancho según % (lo setea el JS) */
  .timeline::after{
    left: 0 !important;
    width: calc(var(--progress, 0) * 1%) !important;
    top: 12px !important;
    height: 20px;
    border-radius: 999px; /* opcional */
  }

  /* Porcentaje debajo, colocado donde acaba la barra azul */
  .timeline-percent{
    display:block;
    position: absolute;
    top: 31px; /* debajo de la barra */
    left: calc(var(--progress, 0) * 1%);
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
  }
}



/* Diseño del donut*/
/* Bloque completo (donut + texto) */
.dw-donut-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.dw-donut-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem; /* antes no teníamos o era muy pequeño */
}


/* Donut de inversión DWITS */
/* Bloque completo (donut + texto) */
.dw-donut-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
}

/* Contenedor del donut */
.dw-donut {
  --donut-size: 180px;
  --track-color: #e2e8f0; /* gris disponible */
  --fill-color:  #0c0c66; /* azul cliente */
  --stroke-width: 24;     /* MÁS GORDO, pero sin cortar */

  position: relative;
  width: var(--donut-size);
  height: var(--donut-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG ocupa todo el contenedor */
.dw-donut__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

/* Círculo de fondo */
.dw-donut__track {
  fill: none;
  stroke: var(--track-color);
  stroke-width: var(--stroke-width);
}

/* Círculo de progreso */
.dw-donut__fill {
  fill: none;
  stroke: var(--fill-color);
  stroke-width: var(--stroke-width);
  stroke-linecap: butt;
  stroke-dasharray: 0 999;
  stroke-dashoffset: 0;
}

/* Porcentaje en el centro */
.dw-donut__value {
  position: absolute;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}

/* Texto bajo el donut (leyenda) */
.dw-donut__detail,
.dw-donut__detail p {
  font-size: 17px !important;  /* prueba con 1rem o 1.1rem si quieres más */
  line-height: 1.4;
  text-align: center;
  font-weight: 900;
}


/* Ajuste en móviles */
@media (max-width: 768px) {
  .dw-donut {
    --donut-size: 240px;
  }
}