/**
 * FastFormz / SO Forms — BEM-scoped front styles (CSS variables from inline style on .so-form).
 */
.so-form__wrapper {
	box-sizing: border-box;
}
.so-form__wrapper *,
.so-form__wrapper *::before,
.so-form__wrapper *::after {
	box-sizing: inherit;
}

.so-form {
	max-width: var(--so-container-max-width, 720px);
	margin: 0 auto;
	padding: var(--so-container-padding, 24px);
	background: var(--so-container-bg, #fff);
	border-radius: var(--so-container-radius, 8px);
	box-shadow: var(--so-container-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
	border-style: solid;
	border-color: var(--so-container-border-color, #c3c4c7);
	border-width: var(--so-container-border-width, 0px);
}

.so-form[data-so-container-border-shape="none"] {
	border-width: 0;
	border-color: transparent;
}

.so-form[data-so-container-border-shape="square"] {
	border-radius: 0;
}

.so-form[data-so-container-border-shape="rounded"] {
	border-radius: var(--so-container-radius, 8px);
}

.so-form__layout {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Form headline (settings): inside bordered .so-form */
.so-form__headline {
	margin: 0 0 1rem;
	line-height: 1.35;
	word-wrap: break-word;
}

.so-form__headline--plain {
	font-size: var(--so-label-size, 14px);
	font-weight: var(--so-label-weight, 600);
}

.so-form__headline__plain {
	margin: 0;
}

.so-form__headline--rich .so-form__headline__inner > :first-child {
	margin-top: 0;
}

.so-form__headline--rich .so-form__headline__inner > :last-child {
	margin-bottom: 0;
}

.so-form__headline--rich h1,
.so-form__headline--rich h2,
.so-form__headline--rich h3,
.so-form__headline--rich h4,
.so-form__headline--rich h5,
.so-form__headline--rich h6 {
	color: inherit;
	font-family: inherit;
	line-height: 1.25;
	margin: 0.45em 0;
}

.so-form__headline--rich p {
	margin: 0.4em 0;
}

.so-form__headline--rich a {
	color: inherit;
	text-decoration: underline;
}

.so-form__headline--rich strong,
.so-form__headline--rich b {
	font-weight: 700;
}

.so-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.so-form__col {
	flex: 1 1 220px;
	min-width: 0;
}

.so-form__field {
	margin-bottom: 0.75rem;
}

.so-form__label,
.so-form__legend {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--so-label-color, #1d2327);
	font-size: var(--so-label-size, 14px);
	font-weight: var(--so-label-weight, 600);
}

.so-form__input,
.so-form textarea,
.so-form select {
	width: 100%;
	max-width: 100%;
	padding: 0.55rem 0.65rem;
	background: var(--so-input-bg, #fff);
	color: var(--so-input-color, #1d2327);
	border: var(--so-input-border-width, 1px) solid var(--so-input-border, #c3c4c7);
	border-radius: var(--so-input-radius, 4px);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.so-form__input:focus,
.so-form textarea:focus,
.so-form select:focus {
	outline: none;
	border-color: var(--so-input-focus, #2271b1);
	box-shadow: 0 0 0 1px var(--so-input-focus, #2271b1);
}

.so-form__choices--horizontal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
}
.so-form__choices--vertical .so-form__choice {
	display: block;
	margin-bottom: 0.35rem;
}

.so-form__button {
	cursor: pointer;
	border: none;
	padding: 0.65rem 1.25rem;
	font-size: 1rem;
	border-radius: var(--so-button-radius, 6px);
}
.so-form__button--primary {
	background: var(--so-button-bg, #2271b1);
	color: var(--so-button-color, #fff);
}
.so-form__button--primary:hover,
.so-form__button--primary:focus {
	background: var(--so-button-bg-hover, #135e96);
	color: var(--so-button-color-hover, #fff);
}
.so-form__button--secondary {
	background: #f0f0f1;
	color: #1d2327;
	margin-right: 0.5rem;
}

.so-form__actions {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.so-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.so-form__captcha-panel {
	display: flow-root;
	margin: 1.25rem 0 0;
	padding: 1rem;
	background: #f6f7f7;
	border-radius: var(--so-input-radius, 4px);
	border: 1px solid var(--so-input-border, #c3c4c7);
}

.so-form__captcha-legend {
	float: left;
	width: 100%;
	margin: 0 0 0.35rem;
	padding: 0;
	font-size: var(--so-label-size, 14px);
	font-weight: var(--so-label-weight, 600);
	color: var(--so-label-color, #1d2327);
}

.so-form__captcha-hint {
	margin: 0 0 0.75rem;
	font-size: 14px;
	line-height: 1.45;
	color: #50575e;
}

.so-form__recaptcha-legal {
	margin: 0 0 0.75rem;
	font-size: 12px;
	line-height: 1.45;
	color: #50575e;
}

.so-form__recaptcha-legal a {
	color: #2271b1;
}

.so-form__recaptcha-v2-fieldset .so-form__recaptcha--v2 {
	min-height: 78px;
}

.so-form__rscaptcha-img {
	display: block;
	margin-bottom: 0.75rem;
	border: 1px solid #c3c4c7;
	background: #fff;
}

.so-form__rscaptcha .so-form__input {
	max-width: 14rem;
}

.so-form__terms-scroll {
	max-height: 160px;
	overflow: auto;
	border: 1px solid #c3c4c7;
	padding: 0.75rem;
	margin-bottom: 0.5rem;
	background: #fafafa;
}

.so-form__rate--stars .so-form__star input {
	position: absolute;
	opacity: 0;
}
.so-form__rate--stars .so-form__star span {
	font-size: 1.75rem;
	color: #dcdcde;
	cursor: pointer;
}
.so-form__rate--stars .so-form__star input:focus + span,
.so-form__rate--stars .so-form__star input:checked + span {
	color: #dba617;
}

.so-form__progress {
	height: 6px;
	background: #f0f0f1;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 0.75rem;
}
.so-form__progress-bar {
	height: 100%;
	background: #2271b1;
	transition: width 0.25s ease;
}

.so-form__steps {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}
.so-form__steps li {
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	background: #f0f0f1;
	font-size: 12px;
}
.so-form__steps li.is-active {
	background: #2271b1;
	color: #fff;
}

.so-form__messages {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 4px;
}
.so-form__messages--error {
	background: var(--so-message-error-bg, #fcf0f1);
	color: var(--so-message-error-color, #8a2424);
}
.so-form__messages--success {
	background: var(--so-message-success-bg, #edfaef);
	color: var(--so-message-success-color, #1e4620);
}

.so-form__help {
	font-size: 12px;
	color: #50575e;
	margin: 0.25rem 0 0;
}

.so-form__required {
	color: #d63638;
}

.so-form__modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.so-form__modal-inner {
	background: #fff;
	padding: 1.25rem;
	border-radius: 8px;
	max-width: 640px;
	max-height: 90vh;
	overflow: auto;
}

@media (max-width: 600px) {
	.so-form__row {
		flex-direction: column;
	}
}
