/*
 * Forms — generic .bbw-form classes used by every static form in the
 * theme (valuation, contact, and any future forms).
 *
 * Inputs inherit base styling from components.css; this file adds:
 *   - layout (row stack, label-above-input)
 *   - 44px min-height for thumb-tap targets
 *   - required-asterisk colour
 *   - honeypot off-screen visually-hidden treatment
 *   - notice block styles for error / success states
 *   - custom inline-SVG select caret
 *
 * Loaded on any template that renders a .bbw-form.
 */

.bbw-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.bbw-form__row {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.bbw-form__row label {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--mute);
	letter-spacing: 0.01em;
	margin-bottom: var(--space-1);
}

.bbw-form__required {
	color: var(--wine);
	font-weight: 700;
}

.bbw-form input[type="text"],
.bbw-form input[type="email"],
.bbw-form input[type="tel"],
.bbw-form select,
.bbw-form textarea {
	min-height: 44px; /* generous thumb-tap target on mobile */
	padding: 0.75rem 0.875rem;
}

.bbw-form textarea {
	min-height: 120px;
	resize: vertical;
}

/* Select arrow — components.css uses appearance: none, so add a custom
   caret via background image. Inline SVG, --mute-grey stroke. */
.bbw-form select {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b6b6b' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	background-size: 12px 8px;
	padding-right: 2.5rem;
}

/*--------------------------------------------------------------
# Honeypot — visually hidden, off-screen
--------------------------------------------------------------*/

.bbw-form__hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/*--------------------------------------------------------------
# Submit row
--------------------------------------------------------------*/

.bbw-form__actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin-top: var(--space-3);
}

.bbw-form__actions .btn {
	align-self: flex-start;
	padding: var(--space-3) var(--space-5);
	font-size: var(--text-base);
}

.bbw-form__assurance {
	font-size: var(--text-xs);
	color: var(--mute);
	line-height: 1.5;
	margin: 0;
}

/*--------------------------------------------------------------
# Notices — error / success states
--------------------------------------------------------------*/

.bbw-form__notice {
	border-radius: 4px;
	padding: var(--space-3) var(--space-4);
	margin-bottom: var(--space-5);
	font-size: var(--text-sm);
	line-height: 1.5;
}

.bbw-form__notice p {
	margin: 0;
}

.bbw-form__notice--error {
	background-color: rgba(107, 31, 61, 0.06); /* --wine, very low alpha */
	border: 1px solid rgba(107, 31, 61, 0.25);
	color: var(--wine-dark);
}

.bbw-form__notice--success {
	background-color: rgba(201, 169, 97, 0.10); /* --gold, very low alpha */
	border: 1px solid rgba(201, 169, 97, 0.45);
	color: var(--ink);
}

.bbw-form__notice a {
	color: var(--wine);
	font-weight: 600;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 700px) {
	.bbw-form__actions .btn {
		align-self: stretch;
		width: 100%;
		justify-content: center;
	}
}
