.fw-form-wrap {
	--fw-gap: 0.85rem;
	--fw-form-surface: #fff;
	width: 100%;
}

.fw-form {
	position: relative;
	margin: 0;
	width: 100%;
}

/* wpautop / shortcode-block leftovers */
.fw-form > br,
.fw-form > p:empty,
.fw-form > p:not(.fw-field-error):not(.fw-response),
.fw-field > br,
.fw-honeypot > br,
.fw-field-error[hidden] {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	line-height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

.fw-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	clip: rect(0, 0, 0, 0);
}

.fw-fields {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fw-gap);
}

.fw-field {
	box-sizing: border-box;
	position: relative;
	flex: 1 1 100%;
	max-width: 100%;
	min-width: 0;
}

fieldset.fw-field {
	min-inline-size: 0;
	width: 100%;
}

.fw-width-25 { flex-basis: calc(25% - var(--fw-gap)); max-width: calc(25% - var(--fw-gap)); }
.fw-width-33 { flex-basis: calc(33.333% - var(--fw-gap)); max-width: calc(33.333% - var(--fw-gap)); }
.fw-width-50 { flex-basis: calc(50% - var(--fw-gap)); max-width: calc(50% - var(--fw-gap)); }
.fw-width-66 { flex-basis: calc(66.666% - var(--fw-gap)); max-width: calc(66.666% - var(--fw-gap)); }
.fw-width-75 { flex-basis: calc(75% - var(--fw-gap)); max-width: calc(75% - var(--fw-gap)); }
.fw-width-100 { flex-basis: 100%; max-width: 100%; }

@media (max-width: 639px) {
	.fw-width-25,
	.fw-width-33,
	.fw-width-50,
	.fw-width-66,
	.fw-width-75 {
		flex-basis: 100%;
		max-width: 100%;
	}
}

.fw-field label,
.fw-legend {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.fw-control,
.fw-field input[type="text"],
.fw-field input[type="email"],
.fw-field input[type="tel"],
.fw-field textarea,
.fw-field select {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0.75rem 0.9rem;
	border: 1px solid #c3c4c7;
	border-radius: 2px;
	background: #fff;
	font: inherit;
	line-height: 1.45;
}

.fw-field textarea {
	min-height: 8rem;
	resize: vertical;
}

.fw-field-error {
	margin: 0.35rem 0 0;
	font-size: 0.8rem;
	color: #b32d2e;
}

.fw-field.is-invalid .fw-control,
.fw-field.is-invalid input,
.fw-field.is-invalid textarea,
.fw-field.is-invalid select {
	border-color: #b32d2e;
}

.fw-submit-wrap {
	margin-top: 0.5rem;
	width: 100%;
}

.fw-recaptcha {
	margin: 0.35rem 0 0.15rem;
}

.fw-submit {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.4rem;
	border: 0;
	border-radius: 2px;
	background: #1d2327;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.fw-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.fw-response {
	margin-top: 0.85rem;
	padding: 0.85rem 1rem;
	border: 1px solid #c3c4c7;
	border-left-width: 3px;
	font-size: 0.9rem;
}

.fw-response.is-success {
	border-left-color: #00a32a;
	background: #edfaef;
}

.fw-response.is-error {
	border-left-color: #d63638;
	background: #fcf0f1;
}

.fw-choices {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.fw-choices--horizontal {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1.1rem;
}

.fw-choices label,
.fw-acceptance {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	cursor: pointer;
}

.fw-choice-text {
	line-height: 1.35;
}

/* Animated / floating labels */
.fw-form-wrap.fw-labels-animated .fw-field--float {
	position: relative;
}

.fw-form-wrap.fw-labels-animated .fw-field--float > label {
	position: absolute;
	z-index: 1;
	top: 0.95rem;
	left: 0.85rem;
	margin: 0;
	padding: 0 0.15rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: #64748b;
	pointer-events: none;
	transform-origin: left center;
	transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
}

.fw-form-wrap.fw-labels-animated .fw-field--float:focus-within > label,
.fw-form-wrap.fw-labels-animated .fw-field--float:has(input:not(:placeholder-shown)) > label,
.fw-form-wrap.fw-labels-animated .fw-field--float:has(textarea:not(:placeholder-shown)) > label {
	top: 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	color: #0f766e;
}

.fw-form-wrap.fw-labels-animated .fw-field--float .fw-control,
.fw-form-wrap.fw-labels-animated .fw-field--float input,
.fw-form-wrap.fw-labels-animated .fw-field--float textarea {
	padding-top: 1.45rem;
	padding-bottom: 0.55rem;
}

.fw-form-wrap.fw-labels-animated .fw-field--float .fw-control::placeholder,
.fw-form-wrap.fw-labels-animated .fw-field--float input::placeholder,
.fw-form-wrap.fw-labels-animated .fw-field--float textarea::placeholder {
	color: transparent;
	opacity: 0;
}

.fw-form-wrap.fw-labels-animated .fw-field--float .fw-req {
	display: none;
}

/* Beautified checkbox / radio choices — minimal control + label */
.fw-form-wrap {
	--fw-choice-accent: #0f766e;
	--fw-choice-mark: #ffffff;
	--fw-choice-border: color-mix(in srgb, currentColor 45%, transparent);
}

.fw-field--pretty {
	margin: 0;
	min-width: 0;
	min-inline-size: 0;
	width: 100%;
	padding: 0.65rem 0.9rem 0.85rem;
	border: 1px solid var(--fw-choice-border);
	border-radius: 0;
	background: transparent;
	box-sizing: border-box;
}

.fw-field--pretty > .fw-legend {
	float: none;
	display: inline-block;
	width: auto;
	max-width: calc(100% - 1rem);
	margin: 0;
	padding: 0 0.45rem;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.2;
	background: var(--fw-form-surface, #fff);
}

.fw-choices--pretty {
	gap: 0.7rem 1.25rem;
	padding: 0.35rem 0 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-sizing: border-box;
}

.fw-choices--pretty label {
	align-items: center;
	gap: 0.7rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	transition: color 0.15s ease;
}

.fw-choices--pretty label:hover {
	background: transparent;
}

.fw-choices--pretty label:hover .fw-choice-ui {
	border-color: var(--fw-choice-accent);
}

.fw-choices--pretty input[type="checkbox"],
.fw-choices--pretty input[type="radio"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
}

.fw-choices--pretty .fw-choice-ui {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	border: 1.5px solid var(--fw-choice-border);
	background: transparent;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fw-choices--pretty .fw-choice-text {
	line-height: 1.2;
}

.fw-choices--pretty input[type="radio"] + .fw-choice-ui {
	border-radius: 50%;
}

.fw-choices--pretty input[type="checkbox"] + .fw-choice-ui {
	border-radius: 4px;
}

.fw-choices--pretty input:checked + .fw-choice-ui {
	border-color: var(--fw-choice-accent);
	background: var(--fw-choice-accent);
	box-shadow: none;
}

.fw-choices--pretty input[type="radio"]:checked + .fw-choice-ui::after {
	content: "";
	display: block;
	width: 0.35rem;
	height: 0.35rem;
	border-radius: 50%;
	background: var(--fw-choice-mark);
}

.fw-choices--pretty input[type="checkbox"]:checked + .fw-choice-ui::after {
	content: "";
	display: block;
	width: 0.28rem;
	height: 0.5rem;
	margin-top: -0.1rem;
	border: solid var(--fw-choice-mark);
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
	box-sizing: border-box;
}

.fw-choices--pretty input:focus-visible + .fw-choice-ui {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fw-choice-accent) 28%, transparent);
}

.fw-choices--pretty input:checked ~ .fw-choice-text {
	font-weight: 600;
	color: inherit;
}

.fw-choices--pretty label:has(input:checked) {
	border: 0;
	background: transparent;
}

.fw-style-light,
.fw-style-dark {
	--fw-choice-accent: var(--fw-theme-accent);
}

.fw-style-dark {
	--fw-choice-mark: var(--fw-theme-accent-text);
	--fw-choice-border: color-mix(in srgb, var(--fw-theme-text) 40%, transparent);
}

.fw-style-light .fw-form-wrap.fw-labels-animated .fw-field--float:focus-within > label,
.fw-style-dark .fw-form-wrap.fw-labels-animated .fw-field--float:focus-within > label,
.fw-style-light.fw-labels-animated .fw-field--float:focus-within > label,
.fw-style-dark.fw-labels-animated .fw-field--float:focus-within > label,
.fw-style-light.fw-labels-animated .fw-field--float:has(input:not(:placeholder-shown)) > label,
.fw-style-dark.fw-labels-animated .fw-field--float:has(input:not(:placeholder-shown)) > label,
.fw-style-light.fw-labels-animated .fw-field--float:has(textarea:not(:placeholder-shown)) > label,
.fw-style-dark.fw-labels-animated .fw-field--float:has(textarea:not(:placeholder-shown)) > label {
	color: var(--fw-theme-accent);
}

.fw-req {
	color: #b32d2e;
}

/* Built-in themes (skipped when style is inherit — theme owns colors) */
.fw-style-light {
	--fw-theme-bg: #ffffff;
	--fw-theme-surface: #f8fafc;
	--fw-theme-text: #0f172a;
	--fw-theme-muted: #64748b;
	--fw-theme-line: #cbd5e1;
	--fw-theme-accent: #0f766e;
	--fw-theme-accent-text: #ffffff;
	--fw-form-surface: var(--fw-theme-bg);
	padding: 1.25rem;
	border: 1px solid var(--fw-theme-line);
	border-radius: 12px;
	background: var(--fw-theme-bg);
	color: var(--fw-theme-text);
}

.fw-style-dark {
	--fw-theme-bg: #0f172a;
	--fw-theme-surface: #1e293b;
	--fw-theme-text: #f8fafc;
	--fw-theme-muted: #94a3b8;
	--fw-theme-line: #334155;
	--fw-theme-accent: #2dd4bf;
	--fw-theme-accent-text: #042f2e;
	--fw-form-surface: var(--fw-theme-bg);
	padding: 1.25rem;
	border: 1px solid var(--fw-theme-line);
	border-radius: 12px;
	background: var(--fw-theme-bg);
	color: var(--fw-theme-text);
}

.fw-style-light .fw-control,
.fw-style-dark .fw-control,
.fw-style-light input[type="text"],
.fw-style-light input[type="email"],
.fw-style-light input[type="tel"],
.fw-style-light textarea,
.fw-style-light select,
.fw-style-dark input[type="text"],
.fw-style-dark input[type="email"],
.fw-style-dark input[type="tel"],
.fw-style-dark textarea,
.fw-style-dark select {
	border: 1px solid var(--fw-theme-line);
	border-radius: 8px;
	background: var(--fw-theme-surface);
	color: var(--fw-theme-text);
}

.fw-style-light .fw-control:focus,
.fw-style-dark .fw-control:focus {
	outline: none;
	border-color: var(--fw-theme-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fw-theme-accent) 25%, transparent);
}

.fw-style-light label,
.fw-style-dark label,
.fw-style-light .fw-legend,
.fw-style-dark .fw-legend {
	color: var(--fw-theme-muted);
}

.fw-style-light .fw-submit,
.fw-style-dark .fw-submit {
	width: 100%;
	border-radius: 8px;
	background: var(--fw-theme-accent);
	color: var(--fw-theme-accent-text);
}

.fw-style-light .fw-response,
.fw-style-dark .fw-response {
	border-color: var(--fw-theme-line);
	background: var(--fw-theme-surface);
	color: var(--fw-theme-text);
}
