/*
Theme Name:  Northland
Theme URI:   https://northlandroofingllc.com
Description: Custom child theme for Northland Roofing built on Hello Elementor. Ships custom Elementor widgets, page templates, and font stack (Linear Grotesk, Spline Sans, Renoric).
Author:      Codesignery
Author URI:  https://codesignery.com
Template:    hello-elementor
Version:     1.0.0
Text Domain: elementor-child
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ── Estimate Form Widget ───────────────────────────────────────────────
   Multi-step estimate request form.
   ─────────────────────────────────────────────────────────────────── */

.estimate-form-widget {
	/* Design tokens — overridable via Elementor style controls */
	--ef-maroon:    #882a2a;
	--ef-green:     #679B32;
	--ef-light-gray:#39383633;
	--ef-text-gray: #A1A1AA;
	--ef-input-bg:  #f8f9fc00;
	--ef-line-gray: #D8D8D8;
	--ef-black:     #090E12;
	--ef-error:     #dc2626;

	font-family: 'Inter', sans-serif;
	background-color: #ffffff;
	width: 100%;
	max-width: 480px;
	border-radius: 8px;
	/* Subtle border on sides + bottom; top overridden below */
	border: 1px solid #E8E8E8;
	border-top: 4px solid var(--ef-maroon);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 40px 40px 44px;
	box-sizing: border-box;
	color: #1f2937;
	margin: 0 auto;
}

.estimate-form-widget *,
.estimate-form-widget *::before,
.estimate-form-widget *::after {
	box-sizing: border-box;
}

/* ── Title ───────────────────────────────────────────────────────────── */

.ef-title {
	font-size: 32px;
	font-weight: 800;
	color: var(--ef-black);
	text-align: center;
	margin: 0 0 20px 0;
	letter-spacing: 0;
	line-height: 1;
	padding: 0;
	border: none;
}

/* ── Stepper ─────────────────────────────────────────────────────────── */

.ef-stepper {
	display: flex;
	align-items: center;
	width: 100%;           /* span full content width */
	margin-bottom: 36px;
}

.ef-stepper-item {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;        /* never shrink the dot+label pair */
}

.ef-stepper-line {
	flex: 1;               /* stretch to fill all available space */
	min-width: 8px;
	height: 2px;
	background-color: var(--ef-line-gray);
}

.step-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.step-dot.completed { background-color: var(--ef-green); border: none; }
.step-dot.active    { background-color: #ffffff; border: 2.5px solid var(--ef-green); }
.step-dot.upcoming  { background-color: var(--ef-light-gray); border: none; }
.step-label.active.completed {
	color: var(--ef-green);
}
.step-label {
	font-family: 'Spline Sans';
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	white-space: nowrap;
	transition: color 0.25s ease;
}

.step-label.completed { color: var(--ef-green); }
.step-label.active    { color: var(--ef-black); }
.step-label.upcoming  { color: var(--ef-light-gray); }

/* ── Fields ──────────────────────────────────────────────────────────── */

.ef-fields {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ef-field-row {
	display: flex;
	gap: 16px;
}

.ef-field-half {
	flex: 1;
	min-width: 0;
}

.ef-label {
	display: block;
	color: var(--ef-maroon);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
}

.ef-field-input {
	width: 100%;
	background-color: var(--ef-input-bg);
	padding: 14px 16px;
	border-radius: 4px;
	border: 1.5px solid transparent;
	font-size: 15px;
	color: var(--ef-black);
	font-family: inherit;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ef-field-input::placeholder {
	color: #6B7280;
	opacity: 1;
}

.ef-field-input:focus {
	outline: none;
	border-color: rgba(122, 34, 30, 0.3);
	box-shadow: 0 0 0 3px rgba(122, 34, 30, 0.08);
}

.ef-field-input.ef-invalid {
	border-color: var(--ef-error);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

textarea.ef-field-input {
	resize: none;
	line-height: 1.6;
}

/* ── Select ──────────────────────────────────────────────────────────── */

.ef-select-wrapper {
	position: relative;
}

.ef-select-wrapper .ef-select {
	cursor: pointer;
	padding-right: 40px;
}

.ef-select-caret {
	position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 18px;
    pointer-events: none;
	stroke: var(--ef-text-gray);
}

/* ── Validation Error ────────────────────────────────────────────────── */

.ef-error {
	display: none;
	font-size: 12px;
	color: var(--ef-error);
	margin-top: 5px;
	font-weight: 500;
}

/* ── Actions ─────────────────────────────────────────────────────────── */

.ef-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 48px;
}

.ef-actions--end {
	justify-content: flex-end;
}

.ef-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 0 4px 0;
	background: transparent;
	border: none;
	border-bottom: 2px solid currentColor;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	font-family: inherit;
	transition: opacity 0.2s ease, color 0.2s ease;
	line-height: 1;
}

.ef-btn svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.ef-btn-back {
	color: var(--ef-text-gray);
}

.ef-btn-back:hover {
	color: #4b5563;
}

.ef-btn-next,
.ef-btn-submit {
	color: var(--ef-maroon);
}

.ef-btn-next:hover,
.ef-btn-submit:hover {
	opacity: 0.75;
}

.ef-btn-submit:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Spinner inside submit button while loading */
.ef-btn-submit.ef-loading svg {
	display: none;
}

.ef-btn-submit.ef-loading::after {
	content: '';
	width: 14px;
	height: 14px;
	border: 2px solid var(--ef-maroon);
	border-top-color: transparent;
	border-radius: 50%;
	animation: ef-spin 0.65s linear infinite;
}

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

/* ── General error ───────────────────────────────────────────────────── */

.ef-general-error {
	color: var(--ef-error);
	font-size: 13px;
	margin-top: 16px;
	margin-bottom: 0;
	font-weight: 500;
	text-align: center;
}

/* ── Success State ───────────────────────────────────────────────────── */

.ef-success-message {
	text-align: center;
	padding: 32px 0;
}

.ef-success-icon {
	width: 68px;
	height: 68px;
	background-color: var(--ef-green);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	margin: 0 auto 24px;
}

.ef-success-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--ef-black);
	margin: 0 0 12px 0;
	padding: 0;
	border: none;
}

.ef-success-text {
	font-size: 15px;
	color: #4b5563;
	line-height: 1.65;
	margin: 0;
}

/* ── Anti-spam: honeypot (off-screen, not display:none so bots fill it) ─ */

.ef-honeypot {
	position: absolute;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media ( max-width: 520px ) {
	.estimate-form-widget {
		.step-label {
			font-size: 12px;
		}
	}
	.estimate-form-widget {
		padding: 32px 24px 36px;
	}

	.ef-title {
		font-size: 26px;
		margin-bottom: 24px;
	}

	/* On small screens the step labels may wrap — hide them to keep stepper compact */

	.ef-stepper-line {
		min-width: 16px;
	}

	.ef-field-row {
		flex-direction: column;
		gap: 24px;
	}

	.ef-actions {
		margin-top: 36px;
	}
}
