/* Easton Lead Capture — frontend styles
   Colours are exposed as CSS variables so they can be overridden
   from the theme / Elementor custom CSS to match the brand exactly:

   .elc-postcode-box, .elc-form-wrap { --elc-accent: #0e6b3a; }
*/

.elc-postcode-box,
.elc-form-wrap {
	--elc-accent: #0e6b3a;        /* brand green — adjust to match theme */
	--elc-accent-dark: #0a5230;
	--elc-text: #1f2937;
	--elc-muted: #6b7280;
	--elc-border: #d1d5db;
	--elc-error: #b91c1c;
	--elc-radius: 8px;
	font-family: inherit;
	color: var(--elc-text);
}

/* The hidden attribute must always win over our own display rules
   (and over theme/Elementor button styles). Without this, error
   messages and the Back/Submit buttons render before they should. */
.elc-postcode-box [hidden],
.elc-form-wrap [hidden] {
	display: none !important;
}

/* ---------- Buttons ---------- */

.elc-btn {
	display: inline-block;
	padding: 14px 26px;
	border: 0;
	border-radius: var(--elc-radius);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s ease, transform .1s ease;
}
.elc-btn-primary {
	background: var(--elc-accent);
	color: #fff;
}
.elc-btn-primary:hover { background: var(--elc-accent-dark); }
.elc-btn-primary:active { transform: translateY(1px); }
.elc-btn-primary:disabled { opacity: .65; cursor: wait; }
.elc-btn-back {
	background: transparent;
	color: var(--elc-muted);
	padding-left: 10px;
	padding-right: 10px;
}
.elc-btn-back:hover { color: var(--elc-text); }
.elc-btn:focus-visible {
	outline: 3px solid var(--elc-accent);
	outline-offset: 2px;
}

/* ---------- Homepage postcode box (white pill + red CTA) ---------- */

.elc-postcode-box {
	--elc-cta: #f0421c;        /* red CTA button — tweak to match brand */
	--elc-cta-dark: #d33413;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border-radius: 999px;
	padding: 8px 8px 8px 28px;
	max-width: 640px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
	position: relative;
	font-family: inherit;      /* uses the theme / Elementor default font */
}
.elc-postcode-box.elc-has-error {
	box-shadow: 0 12px 34px rgba(0, 0, 0, .18), 0 0 0 2px var(--elc-error);
}
.elc-postcode-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 17px;
	color: var(--elc-text);
	padding: 12px 4px;
	text-transform: uppercase;
}
.elc-postcode-input::placeholder {
	color: #9aa0a6;
	text-transform: none;
}
.elc-postcode-input:focus {
	outline: none;
	border: 0;
	box-shadow: none;
}
.elc-postcode-box .elc-btn-primary {
	background: var(--elc-cta);
	border-radius: 999px;
	padding: 16px 32px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .6px;
	text-transform: uppercase;
	white-space: nowrap;
	flex: none;
}
.elc-postcode-box .elc-btn-primary:hover { background: var(--elc-cta-dark); }
.elc-postcode-error {
	position: absolute;
	top: calc(100% + 8px);
	left: 28px;
	color: var(--elc-error);
	font-size: 14px;
	text-shadow: 0 1px 2px rgba(255, 255, 255, .6);
}
.elc-sr-only {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Multi-step form ---------- */

.elc-form-wrap {
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--elc-border);
	border-radius: 14px;
	padding: 28px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
}

.elc-progress {
	height: 8px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 12px;
}
.elc-progress-bar {
	height: 100%;
	background: var(--elc-accent);
	border-radius: 999px;
	transition: width .3s ease;
}
.elc-step-label {
	font-size: 14px;
	color: var(--elc-muted);
	margin: 0 0 20px;
}
.elc-step-current { font-weight: 700; color: var(--elc-text); }

.elc-lead-form fieldset.elc-step {
	display: none;
	border: 0;
	padding: 0;
	margin: 0;
	animation: elc-fade .25s ease;
}
.elc-lead-form fieldset.elc-step.is-active { display: block; }

@keyframes elc-fade {
	from { opacity: 0; transform: translateX(12px); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.elc-lead-form fieldset.elc-step { animation: none; }
	.elc-progress-bar { transition: none; }
}

.elc-field { margin-bottom: 18px; }
.elc-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 15px;
}
.elc-field input[type="text"],
.elc-field input[type="tel"],
.elc-field input[type="email"],
.elc-field textarea,
.elc-field select {
	width: 100%;
	padding: 13px 14px;
	font-size: 16px;
	border: 1px solid var(--elc-border);
	border-radius: var(--elc-radius);
	background: #fff;
	box-sizing: border-box;
}
.elc-field input:focus,
.elc-field textarea:focus,
.elc-field select:focus {
	outline: none;
	border-color: var(--elc-accent);
	box-shadow: 0 0 0 3px rgba(14, 107, 58, .18);
}
.elc-field .elc-uppercase { text-transform: uppercase; max-width: 220px; }

.elc-invalid { border-color: var(--elc-error) !important; }
.elc-error {
	display: block;
	color: var(--elc-error);
	font-size: 13.5px;
	margin-top: 5px;
}
.elc-req { color: var(--elc-error); }

.elc-consent label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 14.5px;
	cursor: pointer;
}
.elc-consent input[type="checkbox"] {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	accent-color: var(--elc-accent);
	flex: none;
}

.elc-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
}
.elc-nav .elc-btn-next,
.elc-nav .elc-btn-submit { margin-left: auto; }

.elc-form-message {
	margin-top: 14px;
	color: var(--elc-error);
	font-size: 14.5px;
}

/* Honeypot — visually removed, still in the DOM for bots */
.elc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	opacity: 0;
}

/* ---------- Thank-you state ---------- */

.elc-thankyou { text-align: center; padding: 24px 8px; }
.elc-thankyou-icon {
	width: 56px; height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--elc-accent);
	color: #fff;
	font-size: 30px;
	line-height: 56px;
}
.elc-thankyou h3 { margin: 0 0 8px; }
.elc-thankyou-text { color: var(--elc-muted); margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 520px) {
	.elc-form-wrap { padding: 20px 16px; }
	.elc-postcode-box {
		flex-wrap: wrap;
		border-radius: 28px;
		padding: 10px 10px 10px 18px;
	}
	.elc-postcode-box .elc-btn-primary {
		flex: 1 1 100%;
		padding: 15px 20px;
	}
	.elc-postcode-error { left: 18px; }
	.elc-field .elc-uppercase { max-width: none; }
}
