/**
 * BMRPH magnet forms — black/teal, token-driven.
 * Variables (--bmrph-*) are injected inline from inc/brand.php; fallbacks here keep the
 * forms on-brand even if that inline block is stripped by a cache layer.
 */

.bmrph-magnet-form {
	--_black: var(--bmrph-black, #000);
	--_teal: var(--bmrph-teal, #009c9c);
	--_teal-dark: var(--bmrph-teal-dark, #007878);
	--_white: var(--bmrph-white, #fff);
	--_gray: var(--bmrph-gray, #b3b3b3);
	--_surface: var(--bmrph-surface, #111);
	--_border: var(--bmrph-border, #2a2a2a);

	box-sizing: border-box;
	max-width: 640px;
	margin: 0 auto;
	padding: 2.25rem 2rem 2.5rem;
	background: var(--_surface);
	border: 1px solid var(--_border);
	border-top: 3px solid var(--_teal);
	border-radius: 14px;
	color: var(--_white);
	font-family: inherit;
}

.bmrph-magnet-form *,
.bmrph-magnet-form *::before,
.bmrph-magnet-form *::after {
	box-sizing: border-box;
}

.bmrph-form-head {
	margin-bottom: 1.5rem;
	text-align: center;
}

.bmrph-form-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
	line-height: 1.15;
	color: var(--_white);
}

.bmrph-form-intro {
	margin: 0;
	color: var(--_gray);
	font-size: 1rem;
	line-height: 1.5;
}

.bmrph-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (max-width: 540px) {
	.bmrph-field-grid {
		grid-template-columns: 1fr;
	}
	.bmrph-magnet-form {
		padding: 1.75rem 1.25rem 2rem;
	}
}

.bmrph-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.bmrph-field-grid .bmrph-field {
	margin-bottom: 0;
}

.bmrph-field > span {
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--_white);
}

.bmrph-field em {
	font-style: normal;
	font-weight: 400;
	color: var(--_gray);
}

.bmrph-field input,
.bmrph-field select,
.bmrph-field textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	background: var(--_black);
	border: 1px solid var(--_border);
	border-radius: 8px;
	color: var(--_white);
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bmrph-field input::placeholder,
.bmrph-field textarea::placeholder {
	color: var(--_gray);
	opacity: 0.7;
}

.bmrph-field input:focus,
.bmrph-field select:focus,
.bmrph-field textarea:focus {
	outline: none;
	border-color: var(--_teal);
	box-shadow: 0 0 0 3px rgba(0, 156, 156, 0.25);
}

.bmrph-field--file input[type="file"] {
	padding: 0.6rem 0.85rem;
	cursor: pointer;
}

.bmrph-field--file input[type="file"]::file-selector-button {
	margin-right: 0.85rem;
	padding: 0.45rem 0.9rem;
	background: var(--_teal);
	color: var(--_black);
	border: 0;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}

.bmrph-btn {
	display: inline-block;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.9rem 1.5rem;
	border: 0;
	border-radius: 8px;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
}

.bmrph-btn--primary {
	background: var(--_teal);
	color: var(--_black);
}

.bmrph-btn--primary:hover {
	background: var(--_teal-dark);
	color: var(--_white);
}

.bmrph-btn:active {
	transform: translateY(1px);
}

.bmrph-btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.bmrph-form-status {
	margin: 1rem 0 0;
	min-height: 1.2em;
	font-size: 0.95rem;
	line-height: 1.45;
	text-align: center;
}

.bmrph-form-status.is-success {
	color: var(--_teal);
	font-weight: 600;
}

.bmrph-form-status.is-error {
	color: #ff8a8a;
	font-weight: 600;
}

/* Honeypot — visually + assistively hidden, still in the DOM for bots. */
.bmrph-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Form fades on success. */
.bmrph-magnet-form.is-sent .bmrph-field-grid,
.bmrph-magnet-form.is-sent .bmrph-field,
.bmrph-magnet-form.is-sent .bmrph-btn {
	opacity: 0.4;
	pointer-events: none;
}
