.sf-form {
	--sf-theme-color: #0F8A3E;
	--sf-theme-color-light: #E7F3EB;
	--sf-border-color: #E1E4E8;
	--sf-text-color: #1A1A1A;
	max-width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}
.sf-form * { box-sizing: border-box; }

.sf-field { margin-bottom: 20px; }

.sf-label,
.sf-field-name > .sf-label {
	display: block;
	font-weight: 600;
	color: var(--sf-text-color);
	margin-bottom: 8px;
	font-size: 15px;
}
.sf-required { color: #d93025; margin-left: 2px; }

.sf-form input[type="text"],
.sf-form input[type="email"],
.sf-form input[type="tel"],
.sf-form input[type="number"],
.sf-form input[type="date"],
.sf-form select,
.sf-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--sf-border-color);
	border-radius: 8px;
	font-size: 15px;
	color: var(--sf-text-color);
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.sf-form textarea { resize: vertical; min-height: 120px; }

.sf-form input:focus,
.sf-form select:focus,
.sf-form textarea:focus {
	outline: none;
	border-color: var(--sf-theme-color);
	box-shadow: 0 0 0 3px var(--sf-theme-color-light);
}

.sf-form input.sf-field-invalid,
.sf-form textarea.sf-field-invalid,
.sf-form select.sf-field-invalid {
	border-color: #d93025;
}
.sf-field-error-text {
	color: #d93025;
	font-size: 13px;
	margin-top: 6px;
}

.sf-name-row {
	display: flex;
	gap: 20px;
}
.sf-sub-field { flex: 1; display: flex; flex-direction: column; }

.sf-form input[type="file"] {
	width: 100%;
	padding: 10px 0;
	font-size: 14px;
}
.sf-file-hint {
	display: block;
	margin-top: 4px;
	color: #6b7280;
	font-size: 12px;
}

.sf-choice {
	display: block;
	font-weight: 400;
	margin-bottom: 6px;
}
.sf-choice input { width: auto; margin-right: 8px; }

/* Honeypot — hidden from real visitors */
.sf-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 0;
	overflow: hidden;
}

.sf-message {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 14px;
}
.sf-message-success { background: var(--sf-theme-color-light); color: var(--sf-theme-color); }
.sf-message-error { background: #fdecea; color: #d93025; }

/*
 * !important is used deliberately through this button block. Host themes
 * commonly apply their own generic, often circular, button resets (e.g.
 * for slider arrows or "scroll to top" widgets) that otherwise clobber
 * these buttons' width/height/white-space and squash "Previous"/"Next"
 * into tiny wrapped-text circles.
 */
/*
 * display/align-items/justify-content are scoped to :not([hidden]) below
 * rather than forced here unconditionally — forcing "display" on every
 * .sf-btn regardless of state would override the browser's native
 * [hidden] → display:none behavior and make hidden buttons (e.g. the
 * submit button before the last page) visible on every page.
 */
.sf-btn:not([hidden]),
.sf-btn-round:not([hidden]) {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}
.sf-btn {
	box-sizing: border-box !important;
	width: auto !important;
	height: auto !important;
	min-width: max-content !important;
	max-width: 100% !important;
	border: none;
	border-radius: 8px;
	padding: 14px 24px !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
	font-weight: 700;
	white-space: nowrap !important;
	text-indent: 0 !important;
	overflow: visible !important;
	writing-mode: horizontal-tb !important;
	text-orientation: mixed !important;
	direction: ltr !important;
	transform: none !important;
	cursor: pointer;
	transition: opacity .15s ease, transform .05s ease;
}
.sf-submit-btn,
.sf-next-page {
	width: 100% !important;
	background: var(--sf-theme-color);
	color: #fff;
}
.sf-submit-btn:hover,
.sf-next-page:hover { opacity: .9; }
.sf-submit-btn:active,
.sf-next-page:active { transform: scale(0.99); }
.sf-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.sf-btn-secondary {
	background: #fff;
	color: var(--sf-theme-color);
	border: 1px solid var(--sf-theme-color);
}

.sf-page-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.sf-step-indicator {
	font-size: 13px;
	color: #6b7280;
}
.sf-page-nav-arrows {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

/*
 * Small round icon buttons for Previous/Next. Fixed pixel dimensions
 * (rather than padding-based sizing) make these immune to the same
 * theme writing-mode/button-reset conflicts that broke the old
 * text-label buttons — there's no text to mangle, and the fixed
 * width/height can't collapse to a sliver.
 */
.sf-btn-round {
	box-sizing: border-box !important;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	min-height: 30px !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	border: none;
	background: var(--sf-theme-color);
	color: #fff;
	cursor: pointer;
	flex-shrink: 0 !important;
	line-height: 1 !important;
	transition: opacity .15s ease, transform .05s ease;
}
.sf-btn-round svg { display: block !important; width: 13px !important; height: 13px !important; }
.sf-btn-round:hover { opacity: .9; }
.sf-btn-round:active { transform: scale(0.95); }
.sf-btn-round.sf-btn-secondary {
	background: #fff;
	color: var(--sf-theme-color);
	border: 1px solid var(--sf-theme-color);
}

/* Responsive */
@media (max-width: 600px) {
	.sf-name-row { flex-direction: column; gap: 16px; }
	.sf-form input,
	.sf-form select,
	.sf-form textarea { font-size: 16px; } /* Prevent iOS zoom on focus */
}
