.stbf-form-wrap {
	max-width: 720px;
	margin: 0 auto;
}

/* Belt-and-suspenders: if a theme/page-builder still injects a stray <p> or
   <br> around our markup despite the whitespace-collapsing in the shortcode
   output, don't let its default spacing blow up the layout. */
.stbf-form-wrap p,
.stbf-form-wrap br {
	margin: 0;
}

.stbf-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

.stbf-section-title {
	margin: 1.5em 0 0.75em;
	padding-bottom: 0.4em;
	border-bottom: 2px solid #e2e2e2;
	font-size: 1.1em;
}

.stbf-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 4px;
}

.stbf-field {
	flex: 1 1 240px;
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
}

.stbf-field-full {
	flex: 1 1 100%;
}

.stbf-form label {
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 0.95em;
}

.stbf-required {
	color: #c0392b;
}

.stbf-form input[type="text"],
.stbf-form input[type="email"],
.stbf-form input[type="tel"],
.stbf-form input[type="number"],
.stbf-form input[type="date"],
.stbf-form input[type="time"],
.stbf-form select,
.stbf-form textarea {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	line-height: 42px;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.stbf-form textarea {
	height: auto;
	line-height: 1.4;
	padding: 10px 12px;
}

.stbf-form input:focus,
.stbf-form select:focus,
.stbf-form textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.stbf-form input.stbf-invalid,
.stbf-form select.stbf-invalid,
.stbf-form textarea.stbf-invalid {
	border-color: #c0392b;
}

.stbf-error {
	color: #c0392b;
	font-size: 0.85em;
	margin-top: 4px;
	display: block;
	min-height: 1em;
}

.stbf-submit-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.stbf-submit-btn {
	background: #c0392b;
	color: #fff;
	border: none;
	padding: 12px 28px;
	font-size: 1em;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
}

.stbf-submit-btn:hover {
	background: #a93226;
}

.stbf-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.stbf-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 3px solid #ddd;
	border-top-color: #c0392b;
	border-radius: 50%;
	animation: stbf-spin 0.7s linear infinite;
}

.stbf-spinner.is-active {
	display: inline-block;
}

@keyframes stbf-spin {
	to {
		transform: rotate(360deg);
	}
}

.stbf-form-message {
	margin-top: 16px;
	padding: 12px 14px;
	border-radius: 4px;
	display: none;
}

.stbf-form-message.is-success {
	display: block;
	background: #eafaf1;
	border: 1px solid #2ecc71;
	color: #1e8449;
}

.stbf-form-message.is-error {
	display: block;
	background: #fdecea;
	border: 1px solid #e74c3c;
	color: #c0392b;
}

/* ---------- Step indicator ---------- */
.stbf-steps-indicator {
	display: flex;
	justify-content: space-between;
	margin-bottom: 24px;
	gap: 8px;
}

.stbf-step-dot {
	flex: 1;
	text-align: center;
	font-size: 0.85em;
	font-weight: 600;
	color: #999;
	position: relative;
	padding-top: 34px;
}

.stbf-step-dot span {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 26px;
	line-height: 26px;
	border-radius: 50%;
	background: #e2e2e2;
	color: #777;
	font-size: 0.95em;
}

.stbf-step-dot.is-active {
	color: #c0392b;
}

.stbf-step-dot.is-active span {
	background: #c0392b;
	color: #fff;
}

.stbf-step-dot.is-done span {
	background: #2ecc71;
	color: #fff;
}

/* ---------- Step panels ---------- */
.stbf-step-panel {
	display: none;
}

.stbf-step-panel.is-active {
	display: block;
	animation: stbf-fade-in 0.25s ease;
}

@keyframes stbf-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.stbf-step-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
}

.stbf-btn {
	padding: 12px 26px;
	font-size: 1em;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid #c0392b;
	background: #fff;
	color: #c0392b;
}

.stbf-btn-next {
	background: #c0392b;
	color: #fff;
}

.stbf-btn-next:hover {
	background: #a93226;
}

.stbf-btn-back:hover {
	background: #fdecea;
}

/* ---------- Conditional blocks ---------- */
.stbf-conditional {
	margin-top: 4px;
}

.stbf-note {
	background: #f6f7f7;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 0.92em;
	margin: 8px 0 16px;
}

/* ---------- Radio groups ---------- */
.stbf-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stbf-radio {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400 !important;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px 12px;
	cursor: pointer;
}

.stbf-radio input {
	margin-top: 3px;
}

.stbf-radio:has(input:checked) {
	border-color: #c0392b;
	background: #fdf3f2;
}

.stbf-payment-methods .stbf-radio {
	font-weight: 600 !important;
}

/* ---------- Payment panels ---------- */
.stbf-payment-panel {
	margin: 10px 0 6px;
}

.stbf-bank-box {
	background: #f6f7f7;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 14px 16px;
}

.stbf-bank-box p {
	margin: 4px 0;
}

#stbf-paypal-button-container {
	max-width: 320px;
}

/* ---------- Success panel ---------- */
.stbf-success-panel {
	text-align: center;
	padding: 40px 20px;
}

.stbf-success-icon {
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: #2ecc71;
	color: #fff;
	font-size: 1.6em;
	margin: 0 auto 16px;
}

.stbf-success-panel h3 {
	margin-bottom: 8px;
}

#stbf-success-reference {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 16px;
	background: #fdf3f2;
	border: 1px solid #f3c6c1;
	border-radius: 4px;
	color: #c0392b;
	font-weight: bold;
	font-size: 0.95em;
}

/* flatpickr input tweaks — the date field's altInput (.stbf-alt-input) is a
   separate element from the original input, so it needs the exact same box
   model as every other field (including the time field, which flatpickr
   styles in place) to avoid a height mismatch between Pickup Date/Time. */
.stbf-form input.flatpickr-input,
.stbf-form input.stbf-alt-input {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	line-height: 42px;
	box-sizing: border-box;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}

/* ---------- File inputs ---------- */
.stbf-form input[type="file"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px dashed #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	background: #fafafa;
	box-sizing: border-box;
}

.stbf-terms-row {
	font-weight: 400 !important;
	border: none !important;
	padding: 0 !important;
}

.stbf-terms-row a {
	color: #c0392b;
	text-decoration: underline;
}

/* ---------- Terms & Conditions modal ---------- */
.stbf-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.stbf-modal-box {
	background: #fff;
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	border-radius: 8px;
	padding: 32px;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.stbf-modal-box h2 {
	margin-top: 0;
}

.stbf-modal-box ul {
	margin: 0 0 20px 20px;
	padding: 0;
}

.stbf-modal-box li {
	margin-bottom: 8px;
	line-height: 1.5;
}

.stbf-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	color: #777;
}

.stbf-modal-close:hover {
	color: #c0392b;
}

@media (max-width: 600px) {
	.stbf-row {
		flex-direction: column;
		gap: 0;
	}

	/* .stbf-field's normal "flex: 1 1 240px" sets a 240px flex-basis meant
	   to size its WIDTH when rows lay out side by side. In a column flex
	   container (which .stbf-row becomes on mobile, just above), flex-basis
	   sizes the main axis instead — which is now HEIGHT. Left unset here,
	   every field would be forced to a 240px-tall box regardless of its
	   actual (much shorter) content, leaving a large blank gap under each
	   field. Resetting the basis to auto lets each field size to its
	   content again. */
	.stbf-field {
		flex: 1 1 auto;
	}

	.stbf-steps-indicator {
		font-size: 0.8em;
	}

	.stbf-modal-box {
		padding: 24px;
	}
}
