/* ===================================================
   Forma Hem Contact — Form Styles

   Every colour goes through the Forma Hem theme's --fh-* custom properties, so
   the form tracks the theme automatically. The fallbacks are the theme's own
   values, which keeps the form presentable on any other theme too.
   =================================================== */

/* --- Layout --- */
.fhcon-wrapper {
	width: 100%;
}

.fhcon-fields {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.fhcon-field {
	display: flex;
	flex-direction: column;
}

.fhcon-row--2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

@media (max-width: 640px) {
	.fhcon-row--2col {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* The honeypot must not add a gap to the flex column. */
.fhcon-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --- Label --- */
.fhcon-label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	line-height: 1.5rem;
	color: var(--fh-muted-foreground, #69625b);
}

.fhcon-required {
	margin-left: 2px;
	color: var(--fh-accent, #ad8c5a);
	letter-spacing: 0;
}

/* --- Inputs --- *
   Hairline rules rather than boxes, matching the theme's .fh-form. Repeated
   here (not inherited) so the form still reads correctly outside the theme. */
.fhcon-input,
.fhcon-select,
.fhcon-textarea {
	width: 100%;
	border: 0;
	border-bottom: 1px solid var(--fh-border, #dbd7cf);
	border-radius: 0;
	background-color: transparent;
	padding-block: 1rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--fh-foreground, #241e1a);
	transition: border-color 0.3s var(--fh-ease, cubic-bezier(0.16, 1, 0.3, 1));
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.fhcon-textarea {
	resize: none;
	line-height: 1.625;
}

.fhcon-select {
	background-image: linear-gradient(45deg, transparent 50%, var(--fh-muted-foreground, #69625b) 50%),
	                  linear-gradient(135deg, var(--fh-muted-foreground, #69625b) 50%, transparent 50%);
	background-position: calc(100% - 12px) 1.55rem, calc(100% - 7px) 1.55rem;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	padding-right: 2rem;
}

.fhcon-input::placeholder,
.fhcon-textarea::placeholder {
	color: var(--fh-muted-foreground, #69625b);
	opacity: 1;
}

.fhcon-input:focus,
.fhcon-select:focus,
.fhcon-textarea:focus {
	outline: none;
	border-color: var(--fh-accent, #ad8c5a);
}

/* --- Submit Row --- */
.fhcon-submit-row {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.fhcon-required-note {
	font-size: 0.8rem;
	line-height: 1.625;
	color: var(--fh-muted-foreground, #69625b);
}

/* --- Submit Button ---
   .fh-btn.fh-btn--accent carries the look when the theme is active; these
   rules only add what a <button> needs and stand in when it is not. */
.fhcon-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	border: 1px solid var(--fh-accent, #ad8c5a);
	border-radius: var(--fh-radius, 2px);
	padding: 1rem 2.25rem;
	background-color: var(--fh-accent, #ad8c5a);
	color: var(--fh-accent-foreground, #15110d);
	font-family: inherit;
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.5s var(--fh-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.fhcon-submit-btn:hover:not(:disabled) {
	opacity: 0.85;
}

.fhcon-submit-btn:disabled {
	opacity: 0.55;
	pointer-events: none;
	cursor: not-allowed;
}

/* --- Spinner --- */
.fhcon-spinner {
	display: inline-block;
	width: 0.85rem;
	height: 0.85rem;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: fhcon-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes fhcon-spin {
	to { transform: rotate(360deg); }
}

/* --- Feedback Messages ---
   Same shape as the theme's .fh-notice. */
.fhcon-feedback {
	margin-bottom: 2rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--fh-border, #dbd7cf);
	background-color: rgb(var(--fh-secondary-rgb, 237 231 222) / 0.5);
	font-size: 0.875rem;
	line-height: 1.625;
}

.fhcon-feedback.fhcon-success {
	border-color: var(--fh-accent, #ad8c5a);
}

.fhcon-feedback.fhcon-error {
	border-color: #b33832;
	color: #b33832;
}

/* --- Compact Variant --- */
.fhcon-compact .fhcon-fields {
	gap: 1.5rem;
}

.fhcon-compact .fhcon-row--2col {
	gap: 1.5rem;
}

.fhcon-compact .fhcon-input,
.fhcon-compact .fhcon-select,
.fhcon-compact .fhcon-textarea {
	padding-block: 0.75rem;
	font-size: 0.9375rem;
}

.fhcon-compact .fhcon-select {
	background-position: calc(100% - 12px) 1.3rem, calc(100% - 7px) 1.3rem;
}

.fhcon-compact .fhcon-submit-btn {
	padding: 0.85rem 1.75rem;
}

.fhcon-compact .fhcon-feedback {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
}

/* --- On the dark CTA band, invert the copy that would otherwise disappear --- */
.fh-section--dark .fhcon-label,
.fh-section--dark .fhcon-required-note {
	color: rgb(var(--fh-primary-foreground-rgb, 248 245 240) / 0.6);
}

.fh-section--dark .fhcon-input,
.fh-section--dark .fhcon-select,
.fh-section--dark .fhcon-textarea {
	border-bottom-color: rgb(var(--fh-primary-foreground-rgb, 248 245 240) / 0.3);
	color: var(--fh-primary-foreground, #f8f5f0);
}

.fh-section--dark .fhcon-feedback {
	color: var(--fh-primary-foreground, #f8f5f0);
	background-color: rgb(var(--fh-primary-foreground-rgb, 248 245 240) / 0.06);
}

/* --- reCAPTCHA badge --- */
.grecaptcha-badge {
	visibility: visible !important;
	opacity: 0.7;
	transition: opacity 0.3s;
}

.grecaptcha-badge:hover {
	opacity: 1;
}
