/* Structural styles only — visual styling comes from the theme's .contact
   rules, which target the same label-wrapped controls the old form used. */

.bscf-form .bscf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bscf-form {
	/* Own container so the pairing below keys off the FORM's width, not the
	   window's. The bodysoul footer card is 654px wide at a 768px viewport but
	   520px at 1024px, where the footer turns multi-column — a viewport query
	   would pair the fields on the wrong screens. */
	container-type: inline-size;
	/* Anchor for the sent panel, which covers the fields rather than replacing
	   them: the card keeps its height, so nothing around it jumps. */
	position: relative;
}

.bscf-form fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

/* Contact name + email on one row, subject + number on the next, once each
   column can still hold a usable control. Two explicit tracks, so the pairs
   stay as authored however wide the form gets. Message and submit are in
   their own fieldset and stay full width.
   Threshold + gap both trimmed 2026-08-30 (bodysoul footer feedback: the
   4-across footer tier read as cramped well above its hard minimum) — a
   narrower pairing point plus a tighter gutter both lower how wide the
   form's OWN column needs to be, which is what the footer grid's breakpoint
   math is keeping clear in the first place. See bodysoulnzupdate's
   _main-footer.scss for the recomputed footer-side breakpoints. */
@container (min-width: 440px) {
	.bscf-fields {
		display: grid;
		grid-template-columns: 1fr 1fr;
		/* em, not rem: the gutter tracks the form's own type, so it stays in
		   proportion on a site with a different root size. */
		column-gap: 0.75em;
	}
}

.bscf-form label {
	display: block;
	margin-bottom: 0.75rem;
}

/* The sign-up hides the phone and message labels with [hidden]; any display
   a theme gives labels would otherwise outrank the UA rule. */
.bscf-form [hidden] {
	display: none !important;
}

.bscf-optional {
	font-weight: normal;
	text-transform: none;
	letter-spacing: normal;
}

.bscf-response {
	margin-top: 0.75rem;
	padding: 0.6rem 0.9rem;
	border-radius: 4px;
	border: 1px solid var(--bodysoul-border, var(--pal-line, #ccc));
}

.bscf-response.is-success {
	border-color: var(--bodysoul-action-book, var(--pal-action, #1e7a6b));
	color: var(--bodysoul-action-book, var(--pal-action, #1e7a6b));
}

.bscf-response.is-error {
	border-color: #b32d2e;
	color: #b32d2e;
}

/* ---------------------------------------------------------------- sent state

   The panel covers the form once a message is away. Structure only — type,
   colour and buttons come from the theme; the values below are what a
   theme-less install needs to still read as a finished thing. */

.bscf-success {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	align-content: safe center;
	justify-items: center;
	gap: 0.6em;
	padding: 1.5em 1em;
	overflow-y: auto;
	text-align: center;
	background: var(--bscf-sent-bg, var(--bodysoul-surface-accent, var(--pal-surface, #fff)));
	animation: bscf-sent-in 300ms ease-out both;
}

.bscf-success-mark {
	margin: 0;
	line-height: 0;
	color: var(--bodysoul-action-book, var(--pal-action, #1e7a6b));
}

.bscf-success p,
.bscf-success .bscf-success-title {
	margin: 0;
	max-width: 46ch;
}

.bscf-success-title {
	font-size: 1.5em;
}

.bscf-success-booking {
	margin-top: 0.4em;
}

.bscf-success-actions,
.bscf-success-again {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}

.bscf-success-actions {
	margin-top: 0.2em;
}

@keyframes bscf-sent-in {
	from { opacity: 0; transform: translateY(0.5em); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bscf-success {
		animation: none;
	}
}
