[data-element="timeline"] .wtps-timeline-list {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--timelinegap, 20px);
  position: relative;
}

[data-element="timeline"] .wtps-timeline-list::before {
  content: "";
  position: absolute;
  top: calc(var(--timelineiconsize, 24px) / 2);
  bottom: calc(var(--timelineiconsize, 24px) / 2);
  left: calc(var(--timelineiconsize, 24px) / 2);
  width: var(--timelinelinewidth, 2px);
  transform: translateX(-50%);
  background: var(--timelinelinecolor, rgba(0, 0, 0, 0.14));
  pointer-events: none;
}

[data-element="timeline"] .wtps-timeline-item {
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: var(--timelineitemgap, 14px);
  background: var(--timelineitembgcolor, transparent);
  padding: var(--timelineitempadding, 0px);
  border-radius: var(--timelineitemborderradius, 0px);
  border-width: var(--timelineitemborderwidth, 0px);
  border-color: var(--timelineitembordercolor, var(--bodycolorprimary));
  border-style: var(--timelineitemborderstyle, solid);
}

[data-element="timeline"] .wtps-timeline-item > .wtps-timeline-marker {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtps-timeline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--timelineiconcolor, currentColor) !important;
  background: var(--timelineiconbgcolor, var(--bodycolorbackground)) !important;
  border-radius: var(--timelineiconborderradius, 999px) !important;
  border-width: var(--timelineiconborderwidth, 0px) !important;
  border-color: var(--timelineiconbordercolor, var(--bodycolorprimary)) !important;
  border-style: var(--timelineiconborderstyle, solid) !important;
  padding: var(--timelineiconpadding, 4px) !important;
}

[data-element="timeline"] .wtps-timeline-icon svg,
[data-element="timeline"] .wtps-timeline-icon img {
  display: block;
  object-fit: contain;
  width: var(--timelineiconsize, 24px);
  height: var(--timelineiconsize, 24px);
}

[data-element="timeline"] .wtps-timeline-label {
  flex: 1;
  min-width: 0;
  color: var(--timelinetextcolor, var(--bodycolortext));
  font-size: var(--timelinetextfontsize, 16px);
}

[data-element="timeline"] .wtps-timeline-label > *:first-child {
  margin-top: 0;
}

[data-element="timeline"] .wtps-timeline-label > *:last-child {
  margin-bottom: 0;
}

/* Fecha: ocultar la fecha por defecto (modo icono) */
[data-element="timeline"] .wtps-timeline-item:not([data-marker="date"]) .wtps-timeline-date {
  display: none;
}

/* Fecha: cuando el item está en modo fecha, ocultar el wrapper del icono */
[data-element="timeline"] .wtps-timeline-item[data-marker="date"] .wtps-timeline-marker > .wrapper {
  display: none;
}

/* Fecha: mostrar el elemento de fecha usando las mismas variables que el icono */
[data-element="timeline"] .wtps-timeline-item[data-marker="date"] .wtps-timeline-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: var(--timelineiconcolor, currentColor);
  background: var(--timelineiconbgcolor, var(--bodycolorbackground));
  border-radius: var(--timelineiconborderradius, 999px);
  padding: var(--timelineiconpadding, 4px);
  min-width: calc(var(--timelineiconsize, 24px) + var(--timelineiconpadding, 4px) * 2);
  min-height: calc(var(--timelineiconsize, 24px) + var(--timelineiconpadding, 4px) * 2);
  font-size: calc(var(--timelineiconsize, 24px) * 0.45);
  border-width: var(--timelineiconborderwidth, 0px);
  border-style: var(--timelineiconborderstyle, solid);
  border-color: var(--timelineiconbordercolor, var(--bodycolorprimary));
}

/* =============================================
   DESIGN 1: Compacta — línea punteada
   ============================================= */
[data-element="timeline"].wtps-timeline-1 .wtps-timeline-list {
  gap: var(--timelinegap, 14px);
}

[data-element="timeline"].wtps-timeline-1 .wtps-timeline-list::before {
  background: none;
  width: 0;
  border-left: var(--timelinelinewidth, 1.5px) dashed var(--timelinelinecolor, rgba(0, 0, 0, 0.3));
}

[data-element="timeline"].wtps-timeline-1 .wtps-timeline-icon svg,
[data-element="timeline"].wtps-timeline-1 .wtps-timeline-icon img {
  width: var(--timelineiconsize, 18px);
  height: var(--timelineiconsize, 18px);
}

/* =============================================
   DESIGN 2: Bocadillos — burbujas con cola
   ============================================= */
[data-element="timeline"].wtps-timeline-2 .wtps-timeline-list {
  gap: var(--timelinegap, 14px);
}

[data-element="timeline"].wtps-timeline-2 .wtps-timeline-list::before {
  top: calc(var(--timelineiconsize, 30px) / 2 + var(--timelineiconpadding, 4px));
  bottom: calc(var(--timelineiconsize, 30px) / 2 + var(--timelineiconpadding, 4px));
  left: calc(var(--timelineiconsize, 30px) / 2 + var(--timelineiconpadding, 4px));
}

[data-element="timeline"].wtps-timeline-2 .wtps-timeline-item {
  align-items: center;
  background: transparent;
  padding: 0;
  border-width: 0;
}

[data-element="timeline"].wtps-timeline-2 .wtps-timeline-label {
  position: relative;
  background: var(--timelineitembgcolor, rgba(0, 0, 0, 0.055));
  border-radius: var(--timelineitemborderradius, 14px);
  padding: var(--timelineitempadding, 12px 16px);
  border-width: var(--timelineitemborderwidth, 0px);
  border-style: solid;
  border-color: var(--timelineitembordercolor, transparent);
}

[data-element="timeline"].wtps-timeline-2 .wtps-timeline-label::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 7px 9px 7px 0;
  border-color: transparent var(--timelineitembgcolor, rgba(0, 0, 0, 0.055)) transparent transparent;
}

[data-element="timeline"].wtps-timeline-2 .wtps-timeline-icon svg,
[data-element="timeline"].wtps-timeline-2 .wtps-timeline-icon img {
  width: var(--timelineiconsize, 30px);
  height: var(--timelineiconsize, 30px);
}

/* =============================================
   DESIGN 3: Horizontal — flujo izquierda a derecha
   ============================================= */
[data-element="timeline"].wtps-timeline-3 .wtps-timeline-list {
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

[data-element="timeline"].wtps-timeline-3 .wtps-timeline-list::before {
  top: calc(var(--timelineiconsize, 26px) / 2 + var(--timelineiconpadding, 4px));
  bottom: auto;
  left: 0;
  right: 0;
  width: auto;
  height: var(--timelinelinewidth, 2px);
  transform: translateY(-50%);
}

[data-element="timeline"].wtps-timeline-3 .wtps-timeline-item {
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 100px;
  padding: 0 8px;
  gap: var(--timelineitemgap, 10px);
  background: transparent;
  border-width: 0;
}

[data-element="timeline"].wtps-timeline-3 .wtps-timeline-item > .wtps-timeline-marker {
  position: relative;
  z-index: 2;
}

[data-element="timeline"].wtps-timeline-3 .wtps-timeline-label {
  text-align: center;
  font-size: var(--timelinetextfontsize, 13px);
}

[data-element="timeline"].wtps-timeline-3 .wtps-timeline-icon svg,
[data-element="timeline"].wtps-timeline-3 .wtps-timeline-icon img {
  width: var(--timelineiconsize, 26px);
  height: var(--timelineiconsize, 26px);
}

/* =============================================
   MODIFICADOR: Zigzag por breakpoint
   -d = desktop  -t = tablet  -m = mobile
   ============================================= */

@media (min-width: 1024px) {
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-list::before { left: 50%; transform: translateX(-50%); }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-d .wtps-timeline-list::before { display: block; }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-d .wtps-timeline-item { border-left: none; }
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item > .wtps-timeline-marker { grid-column: 2; grid-row: 1 / -1; align-self: center; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-column: 1; text-align: right; }
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-d:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-column: 3; text-align: left; }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(odd) .wtps-timeline-label::before { left: auto; right: -9px; border-width: 7px 0 7px 9px; border-color: transparent transparent transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)); }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(even) .wtps-timeline-label::before { left: -9px; right: auto; border-width: 7px 9px 7px 0; border-color: transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)) transparent transparent; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-list { align-items: stretch; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-list::before { top: 50%; bottom: auto; transform: translateY(-50%); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item { display: grid; grid-template-rows: 1fr auto 1fr; align-items: unset; flex-direction: unset; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item > .wtps-timeline-marker { margin: 0 auto; grid-row: 2; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-row: 1; align-self: end; padding-bottom: var(--timelineitemgap, 10px); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-d .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-row: 3; align-self: start; padding-top: var(--timelineitemgap, 10px); }
}

@media (max-width: 1024px) and (min-width: 768px) {
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-list::before { left: 50%; transform: translateX(-50%); }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-t .wtps-timeline-list::before { display: block; }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-t .wtps-timeline-item { border-left: none; }
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item > .wtps-timeline-marker { grid-column: 2; grid-row: 1 / -1; align-self: center; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-column: 1; text-align: right; }
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-t:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-column: 3; text-align: left; }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(odd) .wtps-timeline-label::before { left: auto; right: -9px; border-width: 7px 0 7px 9px; border-color: transparent transparent transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)); }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(even) .wtps-timeline-label::before { left: -9px; right: auto; border-width: 7px 9px 7px 0; border-color: transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)) transparent transparent; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-list { align-items: stretch; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-list::before { top: 50%; bottom: auto; transform: translateY(-50%); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item { display: grid; grid-template-rows: 1fr auto 1fr; align-items: unset; flex-direction: unset; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item > .wtps-timeline-marker { margin: 0 auto; grid-row: 2; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-row: 1; align-self: end; padding-bottom: var(--timelineitemgap, 10px); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-t .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-row: 3; align-self: start; padding-top: var(--timelineitemgap, 10px); }
}

@media (max-width: 767px) {
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-list::before { left: 50%; transform: translateX(-50%); }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-m .wtps-timeline-list::before { display: block; }
  [data-element="timeline"].wtps-timeline-4.wtps-timeline--zigzag-m .wtps-timeline-item { border-left: none; }
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item > .wtps-timeline-marker { grid-column: 2; grid-row: 1 / -1; align-self: center; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-column: 1; text-align: right; }
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline--zigzag-m:not(.wtps-timeline-3) .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-column: 3; text-align: left; }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(odd) .wtps-timeline-label::before { left: auto; right: -9px; border-width: 7px 0 7px 9px; border-color: transparent transparent transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)); }
  [data-element="timeline"].wtps-timeline-2.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(even) .wtps-timeline-label::before { left: -9px; right: auto; border-width: 7px 9px 7px 0; border-color: transparent var(--timelineitembgcolor, rgba(0,0,0,0.055)) transparent transparent; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-list { align-items: stretch; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-list::before { top: 50%; bottom: auto; transform: translateY(-50%); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item { display: grid; grid-template-rows: 1fr auto 1fr; align-items: unset; flex-direction: unset; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item > .wtps-timeline-marker { margin: 0 auto; grid-row: 2; position: relative; z-index: 2; }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(odd) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(odd) .wtps-timeline-date { grid-row: 1; align-self: end; padding-bottom: var(--timelineitemgap, 10px); }
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(even) .wtps-timeline-label,
  [data-element="timeline"].wtps-timeline-3.wtps-timeline--zigzag-m .wtps-timeline-item:nth-child(even) .wtps-timeline-date { grid-row: 3; align-self: start; padding-top: var(--timelineitemgap, 10px); }
}
