/**
 * Contact Form 7 layouts: Contact form (Figma 37:192, states 37:456) and the Get a Quote stepper
 * (37:12524 … 37:13296). Base input colours / borders / radius come from the Elementor kit form styles.
 */

/* ---------- Fields ---------- */
.avx-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 16px;
}

.avx-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.avx-field--full {
	grid-column: 1 / -1;
}

.avx-field label,
.avx-field__label {
	color: var(--avx-text-primary);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
}

.avx-field .wpcf7-form-control-wrap {
	display: block;
}

.wpcf7 .avx-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.wpcf7 .avx-field select,
.wpcf7 .avx-field textarea {
	width: 100%;
	min-height: 52px;
	padding: 14px 16px;
	border: 1px solid var(--avx-border);
	border-radius: 12px;
	background: var(--avx-surface);
	color: var(--avx-text-primary);
	font-family: var(--avx-font);
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 .avx-field textarea {
	min-height: 120px;
	resize: vertical;
}

.wpcf7 .avx-field select {
	padding-right: 44px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%233c4566' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.wpcf7 .avx-field ::placeholder {
	color: var(--avx-text-muted);
	opacity: 1;
}

.wpcf7 .avx-field input:focus,
.wpcf7 .avx-field select:focus,
.wpcf7 .avx-field textarea:focus {
	border-color: var(--avx-orange-500);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(242, 107, 31, 0.15);
}

/* Error state (37:456): red border + message below the field. */
.wpcf7 .avx-field .wpcf7-not-valid,
.wpcf7 .avx-field [aria-invalid="true"] {
	border-color: var(--avx-error);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.wpcf7 .wpcf7-not-valid-tip {
	margin-top: 6px;
	color: var(--avx-error);
	font-size: 13px;
	font-weight: 500;
}

/* Consent checkbox. */
.avx-field--consent {
	margin-top: 20px;
	color: var(--avx-text-secondary);
	font-size: 14px;
	line-height: 1.55;
}

.avx-field--consent .wpcf7-list-item {
	margin: 0;
}

.avx-field--consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 500;
	cursor: pointer;
}

.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
	accent-color: var(--avx-orange-500);
}

.avx-field--consent input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
}

/* Submit. */
.avx-form__submit {
	margin-top: 20px;
}

.wpcf7 .avx-form__submit input[type="submit"],
.wpcf7 .avx-quote__nav input[type="submit"] {
	width: 100%;
	min-height: 52px;
	padding: 16px 28px;
	border: 0;
	border-radius: 12px;
	background: var(--avx-orange-500);
	color: #fff;
	font-family: var(--avx-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.wpcf7 .avx-form__submit input[type="submit"]:hover,
.wpcf7 .avx-quote__nav input[type="submit"]:hover {
	background: var(--avx-orange-active);
}

.avx-form__note {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 16px 0 0;
	color: var(--avx-text-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

.avx-form__note::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("../images/icons/lock.svg") center / contain no-repeat;
	mask: url("../images/icons/lock.svg") center / contain no-repeat;
}

/* Response banners: success / error (37:456). */
.wpcf7 form .wpcf7-response-output {
	margin: 20px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--avx-border);
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: rgba(22, 163, 74, 0.3);
	background: rgba(22, 163, 74, 0.08);
	color: var(--avx-success);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
	border-color: rgba(220, 38, 38, 0.3);
	background: rgba(220, 38, 38, 0.06);
	color: var(--avx-error);
}

/* ---------- Get a Quote stepper ---------- */
.avx-quote__steps {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	max-width: 800px;
	margin: 0 auto 36px;
	padding: 0;
	list-style: none;
}

.avx-quote__step-dot {
	position: relative;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--avx-text-muted);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.55;
	text-align: center;
}

.avx-quote__step-dot:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 22px;
	left: calc(50% + 34px);
	right: calc(-50% + 34px);
	height: 3px;
	border-radius: 2px;
	background: var(--avx-border);
}

.avx-quote__step-dot.is-done:not(:last-child)::after {
	background: var(--avx-success);
}

.avx-quote__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--avx-border);
	border-radius: 50%;
	background: var(--avx-surface);
	color: var(--avx-text-secondary);
	font-size: 16px;
	font-weight: 700;
}

.avx-quote__step-dot.is-current {
	color: var(--avx-text-primary);
	font-weight: 700;
}

.avx-quote__step-dot.is-current .avx-quote__num {
	border-color: var(--avx-orange-500);
	background: var(--avx-orange-500);
	color: #fff;
}

.avx-quote__step-dot.is-done .avx-quote__num {
	border-color: var(--avx-success);
	background: var(--avx-success);
	color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.avx-quote__card {
	max-width: 800px;
	margin: 0 auto;
	padding: 40px;
	border: 1px solid var(--avx-border);
	border-radius: 28px;
	background: var(--avx-surface);
	box-shadow: var(--avx-shadow-elevated);
}

.avx-quote__panel {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.avx-quote__panel[hidden] {
	display: none;
}

.avx-quote__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}

.avx-quote__panel-head legend {
	float: left;
	padding: 0;
	color: var(--avx-text-primary);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.4px;
	outline: 0;
}

.avx-quote__percent {
	flex: none;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--avx-bg-subtle);
	color: var(--avx-text-secondary);
	font-size: 12px;
	font-weight: 700;
}

.avx-quote__hint {
	margin: -12px 0 20px;
	color: var(--avx-text-muted);
	font-size: 16px;
}

.avx-quote__panel > .avx-field,
.avx-quote__panel > .avx-form__grid {
	margin-bottom: 20px;
}

.avx-quote__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--avx-border);
}

.avx-quote__nav input[type="submit"] {
	width: auto !important; /* CF7 submit fills its wrapper elsewhere; here it sits right. */
}

.avx-quote__nav .avx-quote__back,
.avx-quote__nav .avx-quote__next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 14px 24px;
	border-radius: 12px;
	font-family: var(--avx-font);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

.avx-quote__nav .avx-quote__back {
	border: 1.5px solid var(--avx-navy-900);
	background: transparent;
	color: var(--avx-text-primary);
}

.avx-quote__nav .avx-quote__back:hover {
	background: var(--avx-bg-subtle);
}

.avx-quote__nav .avx-quote__next {
	border: 0;
	background: var(--avx-orange-500);
	color: #fff;
}

.avx-quote__nav .avx-quote__next::after {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../images/icons/arrow-right.svg") center / contain no-repeat;
	mask: url("../images/icons/arrow-right.svg") center / contain no-repeat;
}

.avx-quote__nav .avx-quote__next:hover {
	background: var(--avx-orange-active);
}

/* Service choice cards (37:12747). */
.avx-choice-cards .wpcf7-checkbox {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.avx-choice-cards .wpcf7-list-item {
	margin: 0;
}

.avx-choice-cards label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	padding: 12px 16px;
	border: 1px solid var(--avx-border);
	border-radius: 14px;
	background: var(--avx-surface);
	color: var(--avx-text-primary);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.avx-choice-cards .wpcf7-list-item-label {
	flex: 1 1 auto;
}

.avx-choice-cards .wpcf7-list-item-label::before {
	content: "";
	display: inline-block;
	width: 36px;
	height: 36px;
	margin-right: 12px;
	vertical-align: middle;
	border-radius: 10px;
	background: var(--avx-bg-subtle) var(--avx-choice-icon) center / 20px no-repeat;
	float: left;
}

.avx-choice-cards input[type="checkbox"] {
	order: 2;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
}

.avx-choice-cards label:has(input:checked) {
	border: 2px solid var(--avx-orange-500);
	background: var(--avx-orange-100);
}

.avx-choice-cards .wpcf7-list-item:nth-child(1) { --avx-choice-icon: url("../images/icons/search.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(2) { --avx-choice-icon: url("../images/icons/megaphone.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(3) { --avx-choice-icon: url("../images/icons/layout.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(4) { --avx-choice-icon: url("../images/icons/code.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(5) { --avx-choice-icon: url("../images/icons/pen.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(6) { --avx-choice-icon: url("../images/icons/smartphone.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(7) { --avx-choice-icon: url("../images/icons/sparkles.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(8) { --avx-choice-icon: url("../images/icons/bot.svg"); }
.avx-choice-cards .wpcf7-list-item:nth-child(9) { --avx-choice-icon: url("../images/icons/network.svg"); }

/* Pill radios (project type, budget, timeline, contact method). */
.avx-pills .wpcf7-radio {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.avx-pills .wpcf7-list-item {
	margin: 0;
}

.avx-pills label {
	display: inline-flex;
	align-items: center;
	padding: 12px 18px;
	border: 1px solid var(--avx-border);
	border-radius: 999px;
	background: var(--avx-surface);
	color: var(--avx-text-secondary);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.avx-pills input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.avx-pills label:has(input:checked) {
	border-color: var(--avx-orange-500);
	background: var(--avx-orange-100);
	color: var(--avx-orange-500);
}

.avx-pills label:has(input:focus-visible) {
	outline: 2px solid var(--avx-orange-500);
	outline-offset: 2px;
}

/* Upload drop zone (37:12976). */
.avx-upload {
	position: relative;
}

.avx-upload label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 28px 16px 64px;
	border: 1.5px dashed var(--avx-border);
	border-radius: 16px;
	background: var(--avx-bg-subtle);
	text-align: center;
	cursor: pointer;
}

.avx-upload label::before {
	content: "";
	width: 28px;
	height: 28px;
	margin-bottom: 6px;
	background: var(--avx-orange-500);
	-webkit-mask: url("../images/icons/upload.svg") center / contain no-repeat;
	mask: url("../images/icons/upload.svg") center / contain no-repeat;
}

.avx-upload label strong {
	color: var(--avx-text-primary);
	font-size: 16px;
}

.avx-upload label span {
	color: var(--avx-text-muted);
	font-size: 14px;
	font-weight: 400;
}

.avx-upload .wpcf7-form-control-wrap {
	position: absolute;
	right: 16px;
	bottom: 16px;
	left: 16px;
}

.avx-upload input[type="file"] {
	width: 100%;
	color: var(--avx-text-secondary);
	font-size: 14px;
}

/* Summary (37:13345). */
.avx-quote__summary {
	margin: 4px 0 8px;
	padding: 20px;
	border-radius: 16px;
	background: var(--avx-bg-subtle);
}

.avx-quote__summary strong {
	display: block;
	margin-bottom: 12px;
	color: var(--avx-text-primary);
	font-size: 16px;
}

.avx-quote__summary dl {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 24px;
	margin: 0;
}

.avx-quote__summary dt {
	color: var(--avx-text-muted);
	font-size: 13px;
	font-weight: 500;
}

.avx-quote__summary dd {
	margin: 2px 0 0;
	color: var(--avx-text-primary);
	font-size: 14px;
	font-weight: 700;
}

/* Success screen (37:13492) — Elementor container shown by quote.js. */
.avx-quote-success {
	display: none !important; /* Elementor sets display:flex on containers; hidden until the request is sent. */
}

.avx-quote-success.is-visible {
	display: flex !important;
}

.elementor-editor-active .avx-quote-success {
	display: flex !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.avx-form__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.avx-quote__card {
		padding: 22px;
		border-radius: 20px;
	}

	.avx-quote__steps {
		margin-bottom: 24px;
	}

	.avx-quote__label {
		display: none;
	}

	.avx-quote__step-dot.is-current .avx-quote__label {
		display: none;
	}

	.avx-quote__num {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.avx-quote__step-dot:not(:last-child)::after {
		top: 17px;
		left: calc(50% + 24px);
		right: calc(-50% + 24px);
	}

	.avx-quote__panel-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		margin-bottom: 20px;
	}

	.avx-quote__panel-head legend {
		font-size: 20px;
	}

	.avx-choice-cards .wpcf7-checkbox {
		grid-template-columns: 1fr;
	}

	.avx-quote__summary dl {
		grid-template-columns: 1fr;
	}

	.avx-pills label {
		padding: 10px 14px;
		font-size: 14px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.avx-choice-cards .wpcf7-checkbox {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Small phones (≤ 480px): Back + Next/Submit share the row instead of overflowing it. */
@media (max-width: 480px) {
	.avx-quote__nav {
		position: relative;
		gap: 10px;
	}

	.avx-quote__nav > :not(.wpcf7-spinner) {
		flex: 1 1 0;
		min-width: 0;
	}

	.avx-quote__nav .avx-quote__back,
	.avx-quote__nav .avx-quote__next {
		justify-content: center;
		padding: 14px 12px;
		font-size: 15px;
	}

	.wpcf7 .avx-quote__nav input[type="submit"] {
		width: 100% !important; /* overrides the desktop "auto" above */
		padding: 14px 12px;
		font-size: 15px;
	}

	.avx-quote__nav .wpcf7-spinner {
		position: absolute;
		top: -28px;
		right: 0;
		margin: 0;
	}
}
