.ebt-form-wrapper {
	max-width: 640px;
	font-family: inherit;
}

.ebt-form-message {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
}
.ebt-message-success { background: #e6f7ec; color: #1a7f37; border: 1px solid #1a7f37; }
.ebt-message-error { background: #fdecea; color: #b3261e; border: 1px solid #b3261e; }

.ebt-whatsapp-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 18px;
	background: #25d366;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
}
.ebt-whatsapp-cta:hover { background: #1ebe5b; color: #fff; }

/*
 * Each step is a flex row container so fields can sit side by side —
 * a field's width comes from the Style tab (Layout & Spacing → Field
 * Width & Spacing), defaulting to 100% (one per row) when no rule is
 * set for that Field ID. Row/column gaps are also Style-tab controls.
 */
.ebt-step {
	display: none;
	flex-wrap: wrap;
	row-gap: 16px;
	column-gap: 16px;
}
.ebt-step.ebt-step-active { display: flex; }

.ebt-field {
	flex: 0 0 100%;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 0; /* spacing between rows comes from .ebt-step's row-gap */
}
.ebt-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.ebt-field .ebt-sublabel { margin-top: 10px; }
.ebt-required { color: #b3261e; }

.ebt-field input[type="text"],
.ebt-field input[type="email"],
.ebt-field input[type="tel"],
.ebt-field input[type="number"],
.ebt-field input[type="date"],
.ebt-field input[type="time"],
.ebt-field input[type="datetime-local"],
.ebt-field input[type="file"],
.ebt-field textarea,
.ebt-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

.ebt-field-hidden { display: none; }

.ebt-field-error {
	color: #b3261e;
	font-size: 13px;
	margin-top: 4px;
	min-height: 16px;
}
/* When there's no error text, this element must take up ZERO space.
 * Without this, every field permanently reserved ~20px below it
 * (min-height + margin-top) regardless of the Rows Gap setting — so
 * setting Rows Gap to 0 in the panel still looked like there was a gap.
 * That reserved space wasn't row-gap at all, it was this element. */
.ebt-field-error:empty {
	margin-top: 0;
	min-height: 0;
}

.ebt-choice-group.ebt-layout-inline { display: flex; gap: 16px; flex-wrap: wrap; }
.ebt-choice-group.ebt-layout-stacked { display: flex; flex-direction: column; gap: 8px; }
.ebt-choice { font-weight: 400; display: flex; align-items: center; gap: 6px; }

.ebt-phone-group { display: flex; gap: 8px; }
.ebt-phone-group input[type="tel"] { flex: 1; min-width: 0; }

.ebt-phone-country { position: relative; flex: 0 0 150px; }

.ebt-phone-country-select,
.ebt-phone-trigger {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	box-sizing: border-box;
}
.ebt-phone-trigger {
	text-align: left;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ebt-phone-trigger:hover { border-color: #98a2b3; }

.ebt-phone-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 50;
	margin-top: 4px;
	width: max(100%, 240px);
	max-height: 280px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(16, 24, 40, .12);
	display: flex;
	flex-direction: column;
}
.ebt-phone-search {
	width: 100%;
	padding: 9px 12px;
	border: none;
	border-bottom: 1px solid #eaecf0;
	box-sizing: border-box;
	font-size: 14px;
	outline: none;
	flex-shrink: 0;
}
.ebt-phone-list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	overflow-y: auto;
}
.ebt-phone-option {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
}
.ebt-phone-option:hover { background: #f2f4f7; }
.ebt-phone-empty { padding: 10px 12px; color: #98a2b3; font-size: 13px; }

.ebt-affix { padding: 0 6px; color: #667085; }

.ebt-rating-star {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #d0d5dd;
	padding: 0 2px;
}
.ebt-rating-star.ebt-rating-active { color: #f5a623; }

.ebt-form-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px; /* fallback only — overridden by the "Spacing Above Buttons" Style control */
	flex-basis: 100%;
}

.ebt-btn {
	padding: 10px 22px;
	border-radius: 6px;
	border: none;
	font-weight: 600;
	cursor: pointer;
}
.ebt-btn-submit, .ebt-btn-next { background: #1a56db; color: #fff; }
/* No hardcoded alignment here anymore — the widget's "Button Alignment" Style
 * control (default: Right) always prints its own margin rule for
 * .ebt-btn-submit / .ebt-btn-next, so this file no longer needs to guess
 * whether a Back button is present. */
.ebt-btn-back { background: #f2f4f7; color: #344054; }
.ebt-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Step indicator */
.ebt-step-indicator {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
}
.ebt-indicator-step {
	display: flex;
	align-items: center;
	gap: 6px;
	opacity: .5;
}
.ebt-indicator-step.ebt-indicator-active,
.ebt-indicator-step.ebt-indicator-done { opacity: 1; }
.ebt-indicator-number {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #eaecf0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
}
.ebt-indicator-step.ebt-indicator-active .ebt-indicator-number,
.ebt-indicator-step.ebt-indicator-done .ebt-indicator-number {
	background: #1a56db;
	color: #fff;
}

.ebt-indicator-progress_bar .ebt-indicator-label,
.ebt-indicator-dots .ebt-indicator-label,
.ebt-indicator-dots .ebt-indicator-number { display: none; }
.ebt-indicator-dots .ebt-indicator-step { flex: 1; }
.ebt-indicator-progress_bar { position: relative; }

.ebt-hp-field { display: none; }
