/* Purpose: Callback request form (Contact Form 7) — mirrors the previous Elementor Pro form styling. */

.fs-form {
	--fs-form-gap:            20px;
	--fs-form-field-bg:       #ffffff;
	--fs-form-field-color:    var(--e-global-color-text, #232323);
	--fs-form-field-font:     var(--e-global-typography-text-font-family, "Heebo"), sans-serif;
	--fs-form-field-size:     15px;
	--fs-form-field-leading:  1.4;
	--fs-form-field-height:   40px;
	--fs-form-field-pad:      8px 16px;
	--fs-form-textarea-pad:   5px 14px;
	--fs-form-accent:         #C29652;
	--fs-form-accent-text:    #ffffff;
	--fs-form-btn-hover-bg:   #ffffff;
	--fs-form-btn-font:       var(--e-global-typography-accent-font-family, "Roboto"), sans-serif;
	--fs-form-btn-weight:     var(--e-global-typography-accent-font-weight, 500);
	--fs-form-btn-pad:        12px 40px;
	--fs-form-msg-color:      #ffffff;
	--fs-form-error:          #ff6b6b;
	--fs-form-duration:       300ms;
}

/* Grid — 2 columns on every breakpoint (matches previous col-50 / sm-50 layout) */
.fs-form .fs-form__grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fs-form-gap);
}

.fs-form .fs-form__group {
	display: block;
	margin: 0;
	min-width: 0;
}

.fs-form .fs-form__group--half {
	flex: 0 0 calc(50% - var(--fs-form-gap) / 2);
}

.fs-form .fs-form__group--full {
	flex: 0 0 100%;
}

.fs-form .fs-form__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fs-form .wpcf7-form-control-wrap {
	display: block;
}

/* Fields */
.fs-form .fs-form__field.wpcf7-form-control {
	display: block;
	width: 100%;
	min-height: var(--fs-form-field-height);
	height: var(--fs-form-field-height);
	margin: 0;
	padding: var(--fs-form-field-pad);
	font-family: var(--fs-form-field-font);
	font-size: var(--fs-form-field-size);
	font-weight: 400;
	line-height: var(--fs-form-field-leading);
	color: var(--fs-form-field-color);
	background-color: var(--fs-form-field-bg);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: all var(--fs-form-duration);
}

.fs-form .fs-form__field.wpcf7-textarea {
	height: auto;
	padding: var(--fs-form-textarea-pad);
	resize: vertical;
}

.fs-form .fs-form__field::placeholder {
	color: var(--fs-form-field-color);
	opacity: 0.6;
}

.fs-form .fs-form__field:focus-visible {
	outline: 2px solid var(--fs-form-accent);
	outline-offset: 0;
}

/* Math captcha — question + answer rendered as one field */
.fs-form .fs-form__group--captcha label {
	display: flex;
	align-items: stretch;
	height: var(--fs-form-field-height);
	background-color: var(--fs-form-field-bg);
}

.fs-form .fs-form__group--captcha .wpcf7-quiz-label {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 0 8px 0 12px;
	font-family: var(--fs-form-field-font);
	font-size: var(--fs-form-field-size);
	font-weight: 500;
	color: var(--fs-form-field-color);
	white-space: nowrap;
	border-right: 1px solid rgba(35, 35, 35, 0.15);
}

.fs-form .fs-form__group--captcha .fs-form__field.wpcf7-quiz {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 100%;
	min-height: 0;
	padding-right: 10px;
	padding-left: 10px;
}

@media (min-width: 480px) {
	.fs-form .fs-form__group--captcha .fs-form__field.wpcf7-quiz {
		padding-right: 16px;
		padding-left: 16px;
	}
}

/* Submit — full width, gold with white hover */
.fs-form .fs-form__group--submit {
	position: relative;
}

.fs-form .fs-form__submit.wpcf7-submit {
	display: block;
	width: 100%;
	min-height: var(--fs-form-field-height);
	margin: 0;
	padding: var(--fs-form-btn-pad);
	font-family: var(--fs-form-btn-font);
	font-size: 16px;
	font-weight: var(--fs-form-btn-weight);
	line-height: 1.2;
	color: var(--fs-form-accent-text);
	background-color: var(--fs-form-accent);
	border: 1px solid var(--fs-form-accent);
	border-radius: 0;
	cursor: pointer;
	transition: all var(--fs-form-duration);
}

.fs-form .fs-form__submit.wpcf7-submit:hover,
.fs-form .fs-form__submit.wpcf7-submit:focus-visible {
	color: var(--fs-form-accent);
	background-color: var(--fs-form-btn-hover-bg);
}

.fs-form .fs-form__submit.wpcf7-submit:disabled {
	cursor: wait;
	opacity: 0.8;
}

.fs-form .wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 12px;
	margin: -12px 0 0;
}

/* Validation + response messages (form sits on dark background) */
.fs-form .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-family: var(--fs-form-field-font);
	font-size: 13px;
	color: var(--fs-form-error);
}

@media (min-width: 480px) {
	.fs-form .fs-form__group--captcha .wpcf7-quiz-label {
		padding: 0 12px 0 16px;
	}
}

.fs-form .fs-form__group--captcha .wpcf7-not-valid-tip {
	position: static;
}

.fs-form .wpcf7-response-output {
	margin: var(--fs-form-gap) 0 0;
	padding: 10px 16px;
	font-family: var(--fs-form-field-font);
	font-size: var(--fs-form-field-size);
	color: var(--fs-form-msg-color);
}

.fs-form.sent .wpcf7-response-output {
	border-color: var(--fs-form-accent);
}

/* Light variant — form placed on a white background (home page consultation card) */
.fs-form.fs-form--light {
	--fs-form-field-bg:    #f3f4f6;
	--fs-form-msg-color:   var(--e-global-color-text, #232323);
	--fs-form-error:       #d63638;
}

.fs-form.fs-form--light .fs-form__field.wpcf7-form-control,
.fs-form.fs-form--light .fs-form__group--captcha label {
	border: 1px solid rgba(29, 37, 47, 0.12);
}

.fs-form.fs-form--light .fs-form__group--captcha .fs-form__field.wpcf7-quiz {
	border: 0;
}

/* Compact variant — desktop only, keeps the home consultation card close to its original height.
   Row 1: Name | Email · Row 2: Mobile | Question · Row 3: Captcha | Submit */
@media (min-width: 1025px) {
	.fs-form.fs-form--compact {
		--fs-form-gap: 12px;
	}

	.fs-form.fs-form--compact .fs-form__grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fs-form.fs-form--compact .fs-form__group--name     { grid-area: 1 / 1; }
	.fs-form.fs-form--compact .fs-form__group--email    { grid-area: 1 / 2; }
	.fs-form.fs-form--compact .fs-form__group--mobile   { grid-area: 2 / 1; }
	.fs-form.fs-form--compact .fs-form__group--question { grid-area: 2 / 2; }
	.fs-form.fs-form--compact .fs-form__group--captcha  { grid-area: 3 / 1; }
	.fs-form.fs-form--compact .fs-form__group--submit   { grid-area: 3 / 2; }

	/* Question box matches the single-line fields beside it */
	.fs-form.fs-form--compact .fs-form__field.wpcf7-textarea {
		height: var(--fs-form-field-height);
		min-height: var(--fs-form-field-height);
		padding: var(--fs-form-field-pad);
		overflow: hidden;
		resize: none;
	}

	.fs-form.fs-form--compact .fs-form__submit.wpcf7-submit {
		height: var(--fs-form-field-height);
		padding-top: 0;
		padding-bottom: 0;
	}
}
