/**
 * Divi Smart Forms — front-end styles.
 * Everything sits under .dsf-* prefixes and uses CSS variables set inline
 * from the module settings, so Divi theme styles keep winning the cascade.
 */

/* Fields hidden by logic — removed from the flow AND marked with the native
 * [data-conditional-logic] protocol so Divi's submit map skips them too. */
.dsf-hidden {
	display: none !important;
}

/* Fields hidden by steps — offscreen ghosts. People must not see them, but
 * Divi's submit JS must still treat them as visible so their values stay in
 * the submission map (otherwise the server rejects the POST). `fixed` keeps
 * them from expanding the document; a real box keeps jQuery `:visible` true. */
.dsf-step-off {
	position: fixed !important;
	left: -9999px !important;
	top: 0 !important;
	margin: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ------------------------------------------------- progress indicator */

.dsf-progress {
	--dsf-bar-bg: #e0e0e0;
	--dsf-bar-fill: #2ea3f2;
	--dsf-bar-height: 8px;
	--dsf-bar-radius: 100px;
	--dsf-label-color: #666;
	--dsf-label-size: 14px;

	margin-bottom: 1.2em;
	font-size: var(--dsf-label-size);
	color: var(--dsf-label-color);
}

.dsf-progress__track {
	position: relative;
	height: var(--dsf-bar-height);
	background: var(--dsf-bar-bg);
	border-radius: var(--dsf-bar-radius);
	overflow: hidden;
	margin-bottom: .6em;
}

.dsf-progress__fill {
	height: 100%;
	width: 0;
	background: var(--dsf-bar-fill);
	border-radius: var(--dsf-bar-radius);
	transition: width .35s ease;
}

@media (prefers-reduced-motion: reduce) {
	.dsf-progress__fill {
		transition: none;
	}
}

.dsf-steps-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: .4em;
	flex-wrap: wrap;
	align-items: center;
}

.dsf-step {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: .1em .3em;
	border-radius: 4px;
	opacity: .55;
	cursor: default;
	transition: opacity .2s ease;
}

.dsf-progress--bar .dsf-step {
	display: none; /* bar style shows progress in the track; titles optional below */
}

.dsf-progress--bar .dsf-step--active {
	display: inline-flex;
	opacity: 1;
}

.dsf-step--done {
	opacity: .85;
}

.dsf-progress--bar .dsf-step--done {
	display: none;
}

.dsf-step--active,
.dsf-step--done {
	cursor: pointer;
}

.dsf-progress--dots .dsf-step--active,
.dsf-progress--dots .dsf-step--done,
.dsf-progress--numbers .dsf-step--active,
.dsf-progress--numbers .dsf-step--done,
.dsf-progress--bar .dsf-step--active {
	opacity: 1;
}

.dsf-step__dot {
	width: .65em;
	height: .65em;
	border-radius: 50%;
	background: var(--dsf-bar-bg);
	display: inline-block;
	transition: background .2s ease, transform .2s ease;
}

.dsf-step--active .dsf-step__dot,
.dsf-step--done .dsf-step__dot {
	background: var(--dsf-bar-fill);
}

.dsf-step--active .dsf-step__dot {
	transform: scale(1.25);
}

.dsf-step__num {
	min-width: 1.7em;
	height: 1.7em;
	line-height: 1.7em;
	text-align: center;
	border-radius: 50%;
	background: var(--dsf-bar-bg);
	color: #fff;
	font-size: .85em;
	font-style: normal;
	transition: background .2s ease;
}

.dsf-step--active .dsf-step__num,
.dsf-step--done .dsf-step__num {
	background: var(--dsf-bar-fill);
}

.dsf-step__num--bar {
	display: none;
}

.dsf-step__title {
	font-style: normal;
	font-size: .92em;
	white-space: nowrap;
}

/* ------------------------------------------------------- navigation */

.dsf-nav {
	display: flex;
	gap: .6em;
	margin-top: 1em;
	justify-content: flex-end;
	clear: both;
}

.dsf-btn {
	display: inline-block;
	padding: .55em 1.4em;
	border: 1px solid var(--dsf-bar-fill);
	border-radius: 4px;
	background: var(--dsf-bar-fill);
	color: #fff;
	font-size: .9em;
	line-height: 1.4;
	cursor: pointer;
	transition: opacity .2s ease, background .2s ease;
}

.dsf-btn:hover {
	opacity: .88;
}

.dsf-btn--back {
	background: transparent;
	color: var(--dsf-bar-fill);
}

/* ------------------------------------------------------- validation */

.et_pb_contact_field.dsf-has-error {
	position: relative;
}

.dsf-error {
	display: block;
	margin-top: .3em;
	font-size: 12px;
	line-height: 1.4;
	color: #e02b2b;
}

/* ---------------------------------------------------------- review */

.dsf-review {
	margin-bottom: 1.2em;
	padding: 1em 1.2em;
	border: 1px solid var(--dsf-bar-bg);
	border-radius: 6px;
	background: rgba(0, 0, 0, .02);
}

.dsf-review__heading {
	margin: 0 0 .6em;
	font-size: 1.05em;
}

.dsf-review__list {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(120px, 32%) 1fr;
	gap: .35em .8em;
}

.dsf-review__list dt {
	font-weight: 600;
}

.dsf-review__list dd {
	margin: 0;
}

/* ------------------------------------------------- VB help panel */

.dsf-help {
	padding: 1em 1.2em;
	border: 1px dashed #2ea3f2;
	border-radius: 6px;
	background: #f7fbff;
	font-size: 13px;
	line-height: 1.6;
}

.dsf-help h4 {
	margin: 0 0 .5em;
}

.dsf-help code {
	background: #eef4fa;
	padding: .1em .35em;
	border-radius: 3px;
}

/* ------------------------------------------------- transitions */

@keyframes dsfFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes dsfSlide {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.dsf-anim-fade .et_pb_contact_field,
.dsf-anim-fade .dsf-review {
	animation: dsfFade .3s ease both;
}

.dsf-anim-slide .et_pb_contact_field,
.dsf-anim-slide .dsf-review {
	animation: dsfSlide .3s ease both;
}

@media (prefers-reduced-motion: reduce) {
	.dsf-anim-fade .et_pb_contact_field,
	.dsf-anim-slide .et_pb_contact_field,
	.dsf-anim-fade .dsf-review,
	.dsf-anim-slide .dsf-review {
		animation: none;
	}
}
