.tm-pipeline-slider {
  --tm-accent: #e7312a;
  --tm-card-bg: #f4f6f7;
  --tm-radius: 14px;

  --tm-border: rgba(var(--teal), 0.18);
  --tm-border-strong: rgba(var(--teal), 0.32);

  width: 100%;
}

.tm-ps-inner {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 25px;

	@media (max-width: 768px) {
		grid-template-columns: 1fr;
	}
}


/* Arrows */
.tm-ps-arrow {
  pointer-events: all;
	background: #fff;
	border: 1.5px solid rgb(var(--teal));
	border-radius: 3px;
	padding: 12px;
	cursor: pointer;
	transition: var(--transition);

	img {
		transition: var(--transition);
	}

	&:disabled {
		opacity: 0.3;
		cursor: not-allowed;
	}
	&:not(:disabled) {
		&.tm-ps-next {
			&:hover {
				img {
					transform: translateX(3px);
				}
			}
		}
		&.tm-ps-prev {
			&:hover {
				img {
					transform: translateX(-3px);
				}
			}
		}
	}
}

@media (max-width: 768px) {
  .tm-ps-arrow {
    justify-self: center;
  }
}

/* Card + snap scroller */
.tm-ps-card {
  background: var(--tm-card-bg);
  border-radius: var(--tm-radius);
  padding: 28px 28px 40px;
}

@media (max-width: 768px) {
  .tm-ps-card {
    padding: 22px 18px;
  }
}

.tm-ps-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  /* Hide scrollbar (best-effort) */
  scrollbar-width: none;
}

.tm-ps-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tm-ps-track {
  display: flex;
  gap: 0;
}

.tm-ps-panel {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.tm-ps-slide {
  text-align: center;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 25px;
}

.tm-ps-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--tm-accent);
}

.tm-ps-icon svg {
  width: 32px;
  height: 32px;
}

.tm-ps-text {
  margin: 0 auto;
  max-width: 716px;
}

.tm-ps-text p {
  margin: 0;
}

/* Bottom pipeline nav (segmented + animated progress) */
.tm-ps-nav {
  margin-top: 80px;
	display: grid;
	grid-template-columns: 64px 1fr 64px;
	gap: 24px;
}

/* Row */
.tm-ps-steps {
  display: flex;
  align-items: center;
  width: 100%;
	grid-column: 2 / 3;
}

/* Step button */
.tm-ps-step {
  border: none;
  background: transparent;
  padding: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Icon: no circle background (matches your reference style) */
.tm-ps-stepicon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: rgba(var(--teal), 0.25);
  transition: color 0.18s ease, transform 0.18s ease;

	* {
		fill: rgba(var(--teal), 0.25);
	}
}

.tm-ps-stepicon svg {
  width: 32px;
  height: 32px;
}

/* Completed step */
.tm-ps-step.is-complete .tm-ps-stepicon * {
  fill: var(--tm-accent);
}

/* Active step */
.tm-ps-step.is-active .tm-ps-stepicon * {
	fill: var(--tm-accent);
}

/* Connector between steps: dot — line — dot */
.tm-ps-connector {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: 0 18px;
  min-width: 40px;
}

.tm-ps-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(var(--teal), 0.18);
}

/* Base line + fill layer */
.tm-ps-conn-line {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  border-radius: 2px;
  background: rgba(var(--teal), 0.18);
  overflow: hidden;
}

.tm-ps-conn-line::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;

  /* fill color (use accent if you want): var(--tm-accent) */
  background: rgba(var(--teal), 0.26);

  transform: scaleX(0);
  transform-origin: left center;
}

/* Only animate after init to avoid initial-load animation */
.tm-pipeline-slider.is-ready .tm-ps-conn-line::after,
.tm-pipeline-slider.is-ready .tm-ps-conn-dot {
  transition: transform 260ms ease, background-color 260ms ease;
}

/* Completed segments fill + dots */
.tm-ps-connector.is-complete .tm-ps-conn-line::after {
  transform: scaleX(1);
}

.tm-ps-connector.is-complete .tm-ps-conn-dot {
  background: var(--tm-accent);
}


@media (max-width: 768px) {

	.tm-pipeline-slider {
		padding-bottom: 58px;
	}

	.tm-ps-nav {
		margin-top: 0px;
		grid-template-columns: 1fr;
	}

	.tm-ps-steps {
		grid-column: 1/-1;
	}

  .tm-ps-step {
    width: 19px;
    height: 19px;
  }

  .tm-ps-stepicon {
    width: 19px;
    height: 19px;
  }

  .tm-ps-stepicon svg {
    width: 19px;
    height: 19px;
  }

  .tm-ps-connector {
    padding: 0 10px;
  }

  /* Put arrows below card on mobile */
  .tm-ps-inner {
    grid-template-areas:
      "card"
      "arrows";
    grid-template-columns: 1fr;
		position: relative;
  }

  .tm-ps-card {
    grid-area: card;
		min-width: 100%;
  }
	
  /* Simple arrow row: keep both visible */

	.tm-ps-arrow {
		padding: 6px 15px;
	}

  .tm-ps-prev,
  .tm-ps-next {
		justify-self: center;
		grid-area: arrows;
  }

  .tm-ps-prev {
    position: absolute;
    right: calc(50% + 15px);
		bottom: -77px;
  }

  .tm-ps-next {
    position: absolute;
		left: calc(50% + 15px);
		bottom: -77px;
  }
}
