/* Flowaivo Step Box — frontend styles
   Structure only. Colour, size, spacing and typography all come from the
   Elementor panel, so panel settings never lose a specificity fight. */

.fsb-box {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	transition: transform 0.28s ease, box-shadow 0.28s ease,
		background-color 0.28s ease;
}

/* --- Badge --------------------------------------------------------------- */

.fsb-badge {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	line-height: 1;
	transition: background-color 0.28s ease, color 0.28s ease,
		transform 0.28s ease, border-color 0.28s ease;
}

.fsb-badge-text {
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.fsb-badge img {
	display: block;
	height: auto;
	max-width: 100%;
}

.fsb-badge svg {
	width: 1em;
	height: 1em;
}

/* --- Content ------------------------------------------------------------- */

.fsb-content {
	min-width: 0;
}

.fsb-title {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	transition: color 0.22s ease;
}

.fsb-description {
	margin: 0;
	font-size: 16px;
	line-height: 1.7;
}

/* --- Whole-box link ------------------------------------------------------ */

.fsb-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.fsb-link:hover,
.fsb-link:focus {
	text-decoration: none;
}

.fsb-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
	border-radius: 4px;
}

/* --- Badge position ------------------------------------------------------ */

.fsb-pos-left .fsb-box {
	flex-direction: row;
}

.fsb-pos-right .fsb-box {
	flex-direction: row-reverse;
}

.fsb-pos-top .fsb-box {
	flex-direction: column;
	align-items: flex-start;
}

/* When the badge sits on top, let the content alignment drive the badge too,
   so a centred step box centres its circle as well. */
.fsb-pos-top .fsb-content {
	width: 100%;
}

.fsb-pos-top .fsb-box:has(.fsb-content[style*="center"]) {
	align-items: center;
}

.fsb-pos-top .fsb-box:has(.fsb-content[style*="right"]) {
	align-items: flex-end;
}

/* --- Connector line ------------------------------------------------------ */

.fsb-connector-yes .fsb-badge::after {
	content: "";
	position: absolute;
	top: 50%;
	left: calc(100% + 14px);
	width: 120px;
	border-top-width: 2px;
	border-top-style: dashed;
	border-top-color: #d6ddea;
	pointer-events: none;
}

.fsb-pos-right.fsb-connector-yes .fsb-badge::after {
	left: auto;
	right: calc(100% + 14px);
}

/* A connector between columns only makes sense while the columns sit side by
   side, so it is dropped as soon as the layout stacks. */
@media screen and (max-width: 1024px) {
	.fsb-connector-yes .fsb-badge::after {
		display: none;
	}
}

/* --- Mobile stacking ----------------------------------------------------- */

@media screen and (max-width: 767px) {
	.fsb-stack-yes .fsb-box {
		flex-direction: column;
		align-items: flex-start;
	}

	.fsb-stack-yes .fsb-content {
		width: 100%;
	}
}

/* --- Motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.fsb-box,
	.fsb-badge,
	.fsb-title {
		transition: none;
	}

	.fsb-box:hover {
		transform: none !important;
	}

	.fsb-box:hover .fsb-badge {
		transform: none !important;
	}
}
