/* Form Studio — front-end form styles.
   Deliberately light so theme styles can win; scoped under .fst-form-wrap. */

.fst-form-wrap {
	--fst-accent: #1e40af;
	--fst-error: #b91c1c;
	--fst-radius: 6px;
	max-width: 720px;
}

.fst-form-title { margin: 0 0 6px; }
.fst-form-description { margin: 0 0 18px; opacity: 0.85; }

.fst-form fieldset {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.fst-field { margin-bottom: 18px; }

.fst-label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}
.fst-req { color: var(--fst-error); }

.fst-field input[type="text"],
.fst-field input[type="email"],
.fst-field input[type="tel"],
.fst-field input[type="url"],
.fst-field input[type="number"],
.fst-field input[type="date"],
.fst-field input[type="time"],
.fst-field select,
.fst-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 9px 12px;
	border: 1px solid #9ca3af;
	border-radius: var(--fst-radius);
	font: inherit;
	box-sizing: border-box;
	background: #fff;
	color: #111827;
}
.fst-field select[multiple] { min-height: 110px; }

.fst-field input:focus,
.fst-field select:focus,
.fst-field textarea:focus {
	outline: 2px solid var(--fst-accent);
	outline-offset: 1px;
	border-color: var(--fst-accent);
}

.fst-choice {
	display: block;
	margin: 4px 0;
	font-weight: 400;
	cursor: pointer;
}
.fst-choice input { margin-right: 6px; }

.fst-name-parts { display: flex; gap: 12px; }
.fst-name-part { flex: 1; display: flex; flex-direction: column; }
.fst-name-part small { margin-top: 3px; opacity: 0.7; }

.fst-field-description {
	margin: 5px 0 0;
	font-size: 0.88em;
	opacity: 0.8;
}
.fst-file-hint { display: block; margin-top: 4px; opacity: 0.75; font-size: 0.85em; }

.fst-section-title {
	margin: 8px 0 4px;
	padding-bottom: 6px;
	border-bottom: 2px solid #e5e7eb;
}

/* widths */
.fst-width-half  { width: calc(50% - 8px); display: inline-block; vertical-align: top; margin-right: 8px; }
.fst-width-third { width: calc(33.33% - 8px); display: inline-block; vertical-align: top; margin-right: 8px; }
@media (max-width: 600px) {
	.fst-width-half, .fst-width-third { width: 100%; display: block; margin-right: 0; }
	.fst-name-parts { flex-direction: column; gap: 8px; }
}

/* labels-left layout */
.fst-form.fst-labels-left .fst-field:not(.fst-field-html):not(.fst-field-section) {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 4px 14px;
	align-items: start;
}
.fst-form.fst-labels-left .fst-label { padding-top: 9px; margin: 0; }
.fst-form.fst-labels-left .fst-field-description,
.fst-form.fst-labels-left .fst-field-error { grid-column: 2; }
@media (max-width: 600px) {
	.fst-form.fst-labels-left .fst-field { display: block; }
}

/* errors */
.fst-field-error {
	margin: 5px 0 0;
	color: var(--fst-error);
	font-size: 0.88em;
	font-weight: 600;
}
.fst-has-error input,
.fst-has-error select,
.fst-has-error textarea {
	border-color: var(--fst-error);
}

/* honeypot: moved off-screen (display:none would tip off some bots) */
.fst-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 1px;
	overflow: hidden;
}

/* buttons */
.fst-page-footer {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}
.fst-btn {
	padding: 10px 22px;
	border: 0;
	border-radius: var(--fst-radius);
	background: var(--fst-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.fst-btn:hover { filter: brightness(1.12); }
.fst-btn:disabled { opacity: 0.6; cursor: wait; }
.fst-btn-prev { background: #6b7280; }
.fst-captcha { margin-right: 6px; }

/* progress */
.fst-progress {
	height: 8px;
	border-radius: 4px;
	background: #e5e7eb;
	overflow: hidden;
	margin-bottom: 4px;
}
.fst-progress-bar {
	height: 100%;
	background: var(--fst-accent);
	transition: width 0.25s ease;
}
.fst-progress-text { font-size: 0.85em; opacity: 0.75; margin: 0 0 16px; }

/* messages */
.fst-form-message {
	padding: 12px 16px;
	border-radius: var(--fst-radius);
	margin-bottom: 16px;
}
.fst-form-message.fst-success {
	background: #ecfdf5;
	border: 1px solid #34d399;
	color: #065f46;
}
.fst-form-message.fst-error {
	background: #fef2f2;
	border: 1px solid #f87171;
	color: #991b1b;
}

@media (prefers-reduced-motion: reduce) {
	.fst-progress-bar { transition: none; }
}
