/* Lushline Gardens Contact Form
   Brand colour extracted from official reference: #478565
   No drop shadows anywhere, per brand guidance. Borders define depth instead. */

.lgf-wrap {
	--lgf-green: #478565;
	--lgf-green-dark: #3a6e53;
	--lgf-green-tint: #eaf3ee;
	--lgf-text: #26312c;
	--lgf-muted: #6b7a72;
	--lgf-border: #dfe6e2;
	--lgf-error: #c0392b;
	--lgf-radius: 14px;
	--lgf-radius-sm: 10px;

	max-width: 640px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lgf-text);
	box-sizing: border-box;
	/* Belt-and-braces: nothing inside this widget should ever be able to
	   push the page's horizontal scroll width out, even transiently. */
	max-width: min(640px, 100%);
	overflow-x: hidden;
}
.lgf-wrap *, .lgf-wrap *::before, .lgf-wrap *::after { box-sizing: border-box; }

.lgf-form {
	background: #ffffff;
	border: 1px solid var(--lgf-border);
	border-radius: var(--lgf-radius);
	padding: 32px;
	box-shadow: none;
	/* Establishes a positioning context for .lgf-honeypot and clips it -
	   without this, the honeypot's `left: -9999px` offset still counts
	   toward the page's scrollable width and causes horizontal scroll
	   on mobile even though the field is invisible. */
	position: relative;
	overflow-x: hidden;
}

@media (max-width: 560px) {
	.lgf-form { padding: 22px 18px; }
}

/* --- Progress --- */
.lgf-progress { margin-bottom: 28px; }
.lgf-progress-track {
	height: 4px;
	background: var(--lgf-border);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 14px;
}
.lgf-progress-fill {
	height: 100%;
	width: 25%;
	background: var(--lgf-green);
	border-radius: 4px;
	transition: width 0.35s ease;
}
.lgf-progress-steps {
	list-style: none;
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 0;
}
.lgf-step-dot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex: 1;
	text-align: center;
}
.lgf-step-dot span {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--lgf-border);
	color: var(--lgf-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	transition: background 0.25s ease, color 0.25s ease;
}
.lgf-step-dot em {
	font-style: normal;
	font-size: 11px;
	color: var(--lgf-muted);
	display: none;
}
@media (min-width: 480px) {
	.lgf-step-dot em { display: block; }
}
.lgf-step-dot.is-active span,
.lgf-step-dot.is-done span {
	background: var(--lgf-green);
	color: #ffffff;
}
.lgf-step-dot.is-active em { color: var(--lgf-text); font-weight: 600; }

/* --- Honeypot (visually hidden, still in tab order excluded) --- */
.lgf-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lgf-form-error {
	background: #fdecea;
	border: 1px solid #f3c4bd;
	color: var(--lgf-error);
	padding: 12px 14px;
	border-radius: var(--lgf-radius-sm);
	font-size: 13.5px;
	margin-bottom: 20px;
}

/* --- Steps / fieldsets --- */
.lgf-step { border: 0; margin: 0; padding: 0; display: none; }
.lgf-step.is-active { display: block; animation: lgf-fade-in 0.3s ease; }
@keyframes lgf-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.lgf-step-legend {
	font-size: 17px;
	font-weight: 700;
	color: var(--lgf-text);
	margin: 0 0 18px;
	padding: 0;
}

/* --- Layout: rows for side-by-side fields --- */
.lgf-row {
	display: flex;
	gap: 16px;
	margin-bottom: 4px;
}
.lgf-row .lgf-field { flex: 1; min-width: 0; }
@media (max-width: 520px) {
	.lgf-row { flex-direction: column; gap: 0; }
}

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

.lgf-field label,
.lgf-group-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--lgf-text);
	margin-bottom: 6px;
}
.lgf-req { color: var(--lgf-green-dark); }
.lgf-optional { font-weight: 400; color: var(--lgf-muted); }

.lgf-field input[type="text"],
.lgf-field input[type="email"],
.lgf-field input[type="tel"],
.lgf-field select,
.lgf-field textarea {
	width: 100%;
	font-size: 15px;
	font-family: inherit;
	color: var(--lgf-text);
	background: #ffffff;
	border: 1px solid var(--lgf-border);
	border-radius: var(--lgf-radius-sm);
	padding: 12px 14px;
	transition: border-color 0.2s ease;
	box-shadow: none;
}
.lgf-field textarea { resize: vertical; min-height: 100px; }

.lgf-field input:focus-visible,
.lgf-field select:focus-visible,
.lgf-field textarea:focus-visible {
	outline: none;
	border-color: var(--lgf-green);
	box-shadow: 0 0 0 3px var(--lgf-green-tint);
}

.lgf-field.has-error input,
.lgf-field.has-error select,
.lgf-field.has-error textarea {
	border-color: var(--lgf-error);
}
.lgf-error-msg {
	display: block;
	color: var(--lgf-error);
	font-size: 12.5px;
	margin-top: 5px;
	min-height: 0;
}

.lgf-char-count {
	text-align: right;
	font-size: 11.5px;
	color: var(--lgf-muted);
	margin-top: 4px;
}

/* --- Conditional fields --- */
.lgf-conditional { display: none; }
.lgf-conditional.is-visible { display: block; animation: lgf-fade-in 0.25s ease; }

/* --- Contact method selector (rectangular, 12px corners) --- */
.lgf-pill-group { display: flex; gap: 10px; flex-wrap: wrap; }
.lgf-pill {
	position: relative;
	border: 1px solid var(--lgf-border);
	border-radius: 12px;
	padding: 9px 18px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--lgf-muted);
	cursor: pointer;
	transition: all 0.2s ease;
}
.lgf-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.lgf-pill:has(input:checked) {
	background: var(--lgf-green);
	border-color: var(--lgf-green);
	color: #ffffff;
}
.lgf-pill:has(input:focus-visible) { outline: 2px solid var(--lgf-green); outline-offset: 2px; }

/* --- Dropzone --- */
.lgf-dropzone {
	border: 1.5px dashed var(--lgf-border);
	border-radius: var(--lgf-radius-sm);
	padding: 26px 16px;
	text-align: center;
	color: var(--lgf-muted);
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.lgf-dropzone svg { color: var(--lgf-green); }
.lgf-dropzone p { margin: 8px 0 0; font-size: 13.5px; }
.lgf-browse-link { color: var(--lgf-green-dark); font-weight: 700; text-decoration: underline; }
.lgf-dropzone.is-dragover { border-color: var(--lgf-green); background: var(--lgf-green-tint); }
.lgf-dropzone:focus-visible { outline: 2px solid var(--lgf-green); outline-offset: 2px; }

.lgf-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.lgf-preview-item {
	position: relative;
	border: 1px solid var(--lgf-border);
	border-radius: var(--lgf-radius-sm);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #f5f7f6;
}
.lgf-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lgf-preview-item .lgf-file-icon {
	display: flex; align-items: center; justify-content: center;
	height: 100%; font-size: 11px; color: var(--lgf-muted); text-align: center; padding: 4px;
}
.lgf-preview-remove {
	position: absolute;
	top: 3px; right: 3px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: rgba(38, 49, 44, 0.7);
	color: #fff;
	border: none;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}

/* --- Buttons --- */
.lgf-step-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 24px;
}
.lgf-btn {
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	border-radius: var(--lgf-radius-sm);
	padding: 12px 22px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
	box-shadow: none;
}
.lgf-btn-primary {
	background: var(--lgf-green);
	color: #ffffff;
}
.lgf-btn-primary:hover { background: var(--lgf-green-dark); }
.lgf-btn-ghost {
	background: #ffffff;
	color: var(--lgf-text);
	border-color: var(--lgf-border);
}
.lgf-btn-ghost:hover { border-color: var(--lgf-muted); }
.lgf-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.lgf-btn:focus-visible { outline: 2px solid var(--lgf-green-dark); outline-offset: 2px; }

.lgf-btn-submit { display: inline-flex; align-items: center; gap: 8px; }
.lgf-spinner {
	display: none;
	width: 14px; height: 14px;
	border: 2px solid rgba(255,255,255,0.5);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: lgf-spin 0.7s linear infinite;
}
.lgf-btn-submit.is-loading .lgf-spinner { display: inline-block; }
.lgf-btn-submit.is-loading .lgf-btn-label { opacity: 0.85; }
@keyframes lgf-spin { to { transform: rotate(360deg); } }

/* --- Mobile: no step-by-step wizard ---
   Below this width the form is one continuous scroll: every fieldset
   is shown at once, the step progress indicator is hidden, and the
   Next/Back controls disappear (only the final Submit button remains).
   JS mirrors this via isMobileView() so validation still checks every
   field, not just the field group nearest the submit button. */
@media (max-width: 680px) {
	.lgf-progress { display: none; }

	.lgf-step {
		display: block !important;
		padding-top: 22px;
		border-top: 1px solid var(--lgf-border);
	}
	.lgf-step[data-step="1"] { padding-top: 0; border-top: 0; }
	.lgf-step.is-active { animation: none; }
	.lgf-step-legend { display: none; }

	/* Hide the Next / Back controls between fieldsets; keep only the
	   final row, which holds the real Submit button. */
	.lgf-step:not([data-step="4"]) .lgf-step-actions { display: none; }
	.lgf-step[data-step="4"] .lgf-step-actions { justify-content: flex-end; }
	.lgf-step[data-step="4"] .lgf-step-actions [data-action="prev"] { display: none; }
}

/* --- Success state --- */
.lgf-success {
	text-align: center;
	padding: 40px 24px;
	background: #ffffff;
	border: 1px solid var(--lgf-border);
	border-radius: var(--lgf-radius);
	animation: lgf-fade-in 0.35s ease;
	box-sizing: border-box;
}
/* Author styles win over the UA stylesheet's [hidden]{display:none},
   so flex must be scoped to :not([hidden]) or this would always show. */
.lgf-success:not([hidden]) {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
@media (max-width: 560px) {
	.lgf-success { padding: 30px 16px; }
}
.lgf-success-icon { color: var(--lgf-green); margin-bottom: 12px; }
.lgf-success p { font-size: 15px; color: var(--lgf-text); line-height: 1.6; max-width: 420px; margin: 0 auto; }
