/*
 * Forge Forms front end. Inherits the theme's fonts; override the variables below
 * (on .ff-wrap or a custom class) to match a site's brand.
 */
.ff-wrap {
	--ff-accent: #2563eb;
	--ff-accent-text: #fff;
	--ff-text: inherit;
	--ff-muted: #6b7280;
	--ff-border: #d1d5db;
	--ff-bg: #fff;
	--ff-error: #b91c1c;
	--ff-radius: 6px;
	--ff-gap: 18px;
	color: var(--ff-text);
	max-width: 100%;
}
.ff-wrap *, .ff-wrap *::before, .ff-wrap *::after { box-sizing: border-box; }

.ff-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ff-gap) 16px; }
.ff-field { grid-column: 1 / -1; min-width: 0; margin: 0; }
.ff-w-half { grid-column: span 1; }
@media (max-width: 600px) { .ff-w-half { grid-column: 1 / -1; } }
.ff-field[hidden], .ff-step[hidden], .ff-wrap [hidden] { display: none !important; }

.ff-label { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; font-size: .95em; }
.ff-req { color: var(--ff-error); }
.ff-help { margin: 6px 0 0; font-size: .85em; color: var(--ff-muted); }

.ff-wrap input[type=text], .ff-wrap input[type=email], .ff-wrap input[type=tel], .ff-wrap input[type=url],
.ff-wrap input[type=number], .ff-wrap input[type=date], .ff-wrap select, .ff-wrap textarea {
	display: block; width: 100%; max-width: 100%; margin: 0;
	padding: 10px 12px; font: inherit; font-size: 1rem; line-height: 1.4; color: inherit;
	background: var(--ff-bg); border: 1px solid var(--ff-border); border-radius: var(--ff-radius);
	box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.ff-wrap textarea { min-height: 120px; resize: vertical; }
.ff-wrap input:focus, .ff-wrap select:focus, .ff-wrap textarea:focus {
	outline: none; border-color: var(--ff-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ff-accent) 25%, transparent);
}
.ff-wrap input[type=file] { display: block; width: 100%; padding: 10px; border: 1px dashed var(--ff-border); border-radius: var(--ff-radius); background: var(--ff-bg); font: inherit; }

.ff-choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.ff-choice { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; font-weight: normal; cursor: pointer; }
.ff-choice input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--ff-accent); }
.ff-consent span { font-weight: normal; }

.ff-has-error input, .ff-has-error select, .ff-has-error textarea { border-color: var(--ff-error); }
.ff-error { margin: 6px 0 0; color: var(--ff-error); font-size: .875em; }

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

.ff-progress { margin: 0 0 20px; }
.ff-progress-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ff-border) 60%, transparent); overflow: hidden; }
.ff-progress-bar span { display: block; height: 100%; background: var(--ff-accent); transition: width .25s ease; }
.ff-progress-text { margin: 6px 0 0; font-size: .85em; color: var(--ff-muted); }
/* Without JavaScript every step shows, so hide the progress UI. */
.ff-form:not(.ff-js) .ff-progress { display: none; }

.ff-turnstile { margin-top: var(--ff-gap); }
.ff-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
/*
 * Buttons are scoped to .ff-wrap so they outrank theme resets such as Hello
 * Elementor's `[type=submit], button { … }` and its :hover/:focus colors, which
 * have equal specificity to a bare .ff-btn and usually load later. Hover and
 * focus restate the colors for the same reason.
 */
.ff-wrap .ff-btn {
	appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 24px; font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
	white-space: normal; cursor: pointer;
	color: var(--ff-accent-text); background: var(--ff-accent); border: 1px solid var(--ff-accent); border-radius: var(--ff-radius);
	box-shadow: none; transition: filter .15s;
}
.ff-wrap .ff-btn:hover, .ff-wrap .ff-btn:focus {
	color: var(--ff-accent-text); background: var(--ff-accent); border-color: var(--ff-accent); text-decoration: none;
}
.ff-wrap .ff-btn:hover { filter: brightness(1.08); }
.ff-wrap .ff-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--ff-accent) 40%, transparent); outline-offset: 2px; }
.ff-wrap .ff-btn:disabled { opacity: .6; cursor: wait; }
.ff-wrap .ff-btn-secondary, .ff-wrap .ff-btn-secondary:hover, .ff-wrap .ff-btn-secondary:focus { background: transparent; color: var(--ff-accent); }
.ff-loading .ff-submit::after {
	content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
	border-radius: 50%; animation: ff-spin .7s linear infinite;
}
@keyframes ff-spin { to { transform: rotate(360deg); } }

.ff-message { margin-top: var(--ff-gap); padding: 12px 16px; border-radius: var(--ff-radius); }
.ff-message p { margin: 0; }
.ff-message-error { background: #fef2f2; color: var(--ff-error); border: 1px solid #fecaca; }
.ff-confirmation { padding: 20px; border-radius: var(--ff-radius); background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.ff-confirmation:focus { outline: none; }
.ff-confirmation > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .ff-wrap * { transition: none !important; animation: none !important; } }
