/* ==========================================================================
   Vertechs Forms - Front-end form styles
   ========================================================================== */

.tvs-fb-wrap {
	--tvs-fb-dark: #003887;
	--tvs-fb-border: #d5dbe5;
	--tvs-fb-error: #dc2626;
	max-width: 640px;
	margin: 0 0 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tvs-fb-form { margin: 0; }

.tvs-fb-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.tvs-fb-field {
	box-sizing: border-box;
	flex: 1 1 100%;
	min-width: 0;
}
.tvs-fb-col-100 { flex-basis: 100%; }
.tvs-fb-col-66 { flex-basis: calc(66.66% - 8px); }
.tvs-fb-col-50 { flex-basis: calc(50% - 8px); }
.tvs-fb-col-33 { flex-basis: calc(33.33% - 11px); }
.tvs-fb-col-25 { flex-basis: calc(25% - 12px); }
@media (max-width: 540px) {
	.tvs-fb-field { flex-basis: 100% !important; }
}

.tvs-fb-label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	color: #1e293b;
}
.tvs-fb-required { color: var(--tvs-fb-error); }

.tvs-fb-field--label-left {
	display: grid;
	grid-template-columns: 34% 1fr;
	align-items: start;
	gap: 10px;
}
.tvs-fb-field--label-left .tvs-fb-label { margin-top: 8px; }
@media (max-width: 540px) {
	.tvs-fb-field--label-left { display: block; }
}

.tvs-fb-input,
.tvs-fb-wrap select.tvs-fb-input,
.tvs-fb-wrap textarea.tvs-fb-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--tvs-fb-border);
	border-radius: 8px;
	padding: 11px 13px;
	font-size: 15px;
	line-height: 1.4;
	background: #fff;
	color: #1e293b;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.tvs-fb-input:focus {
	outline: none;
	border-color: var(--tvs-fb-dark);
	box-shadow: 0 0 0 3px rgba(0, 56, 135, 0.12);
}
textarea.tvs-fb-input { resize: vertical; min-height: 120px; }

.tvs-fb-choices { display: flex; flex-direction: column; gap: 8px; }
.tvs-fb-choice { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: #1e293b; cursor: pointer; }
.tvs-fb-choice input { margin-top: 3px; }
.tvs-fb-consent { font-size: 14px; }

.tvs-fb-help { display: block; font-size: 13px; color: #64748b; margin-top: 4px; }
.tvs-fb-error { display: block; font-size: 13px; color: var(--tvs-fb-error); margin-top: 4px; font-weight: 600; }
.tvs-fb-field--error .tvs-fb-input { border-color: var(--tvs-fb-error); }

.tvs-fb-section-heading { margin: 8px 0 4px; font-size: 18px; color: var(--tvs-fb-dark); }
.tvs-fb-section-desc { margin: 0; color: #64748b; font-size: 14px; }
.tvs-fb-text-block { color: #475569; font-size: 14px; }

/* Honeypot: keep it in the DOM, out of sight and out of the tab order. */
.tvs-fb-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tvs-fb-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}
.tvs-fb-actions--center { justify-content: center; }
.tvs-fb-actions--right { justify-content: flex-end; }
.tvs-fb-actions--full .tvs-submit-btn { width: 100%; }

.tvs-submit-btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	background: linear-gradient(135deg, #ffea00 0%, #d9ff00 100%);
	color: #003887;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 26px;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(217, 255, 0, 0.3);
	transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.tvs-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255, 234, 0, 0.45); }
.tvs-submit-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

.tvs-fb-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0, 56, 135, 0.25);
	border-top-color: #003887;
	border-radius: 50%;
	display: none;
	animation: tvs-fb-spin 0.7s linear infinite;
}
.tvs-fb-form.is-submitting .tvs-fb-spinner { display: inline-block; }
@keyframes tvs-fb-spin { to { transform: rotate(360deg); } }

.tvs-fb-message { margin-top: 14px; font-size: 14px; }
.tvs-fb-message.is-error { color: var(--tvs-fb-error); font-weight: 600; }
.tvs-fb-form-error {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 600;
}
.tvs-fb-success {
	padding: 18px 20px;
	border-radius: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	font-size: 15px;
}

/* Block Editor Preview */
.vertechs-form-preview-body .tvs-fb-wrap {
	margin: 0;
	max-width: 100%;
}

