/* ecFence Child - the application forms, wearing the page's own clothes.
 * ---------------------------------------------------------------------
 * The application pages were hand-built HTML. Turning them into real
 * Contact Form 7 forms keeps every label, class and wrapper the design had,
 * but CF7 adds markup of its own around each field:
 *
 *     label > span.wpcf7-form-control-wrap > input.ecs4
 *
 * where the design had  label > input.ecs4.  The site's own rules use the
 * direct-child combinator, so that one extra span is enough to make every
 * field fall back to the browser's default styling - 21px tall, inset
 * border, square corners.
 *
 * Rather than guess, each value below was measured off an untouched page
 * (Distributor Application) and reproduced exactly. The two files should be
 * pixel-identical; if the design changes, re-measure rather than eyeball.
 *
 * One thing deliberately NOT restated here: the card's own padding. That is
 * an inline style on each page's own form element, and it differs by page -
 * 38px 40px 40px on the application pages, 36px 40px 40px on Warranty. The
 * swap keeps that element as a <div> around the shortcode, so every page
 * carries its own value. Do not add a padding rule for the form here; it
 * would be wrong on at least one page the day it was written.
 */

/* CF7's wrappers carry no styling of their own here - take them out of the
   box tree entirely so the label's own layout applies to the field, exactly
   as it did before. */
.wpcf7-form .wpcf7-form-control-wrap,
.wpcf7-form .wpcf7-form-control.wpcf7-checkbox,
.wpcf7-form .wpcf7-list-item {
	display: contents;
}

/* ---- text fields ------------------------------------------------------ */

.wpcf7-form input.ecs4,
.wpcf7-form textarea.ecs4,
.wpcf7-form select.ecs4 {
	width: 100%;
	box-sizing: border-box;
	display: block;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #e2e5e9;
	border-radius: 6px;
	background: #fff;
	color: #101828;
	font-family: inherit;
	font-size: 15px;
	line-height: normal;
}

.wpcf7-form input.ecs4::placeholder,
.wpcf7-form textarea.ecs4::placeholder {
	color: #9aa4b2;
}

.wpcf7-form input.ecs4:focus,
.wpcf7-form textarea.ecs4:focus,
.wpcf7-form select.ecs4:focus {
	outline: none;
	border-color: #79e002;
	box-shadow: 0 0 0 3px rgba(121, 224, 2, .18);
}

/* ---- the upload rows on Warranty / Garantia ---------------------------
   Contact Form 7 takes exactly one file per [file] tag: there is no
   "multiple" option in the plugin, and its upload handler has no branch for
   a field whose name is an array - the community workaround that relies on
   one would be trusting an unwritten path with a claimant's evidence. So the
   drop-zone holds four ordinary file fields instead, stacked, and all four
   are wired into the mail Attachments box. */

.wpcf7-form input.ecs4[type="file"] {
	padding: 10px 12px;
	font-size: 13px;
	color: #475467;
	cursor: pointer;
}

/* ---- the industry checkboxes ------------------------------------------
   The design draws these as chips: a bordered label holding the box and its
   wording side by side. CF7 prints the wording a second time inside the
   field, which is where "FencingFencing" came from - so its copy is hidden
   and the label's own text is left to do the job. */

.wpcf7-form .wpcf7-list-item-label {
	display: none;
}

.wpcf7-form input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	flex: none;
	accent-color: #79e002;
}

/* ---- submit ----------------------------------------------------------- */
/* The design styles a <button class="ecs2">; CF7 emits <input type="submit">
   with the same class, which those rules never reach. Same look, restated. */

.wpcf7-form input.ecs2[type="submit"] {
	padding: 15px 34px;
	border: 0;
	border-radius: 22px;
	background: #79e002;
	color: #0b0c0d;
	font-family: "EC Fence", "Gotham Rounded", inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: filter .15s ease;
}

.wpcf7-form input.ecs2[type="submit"]:hover {
	filter: brightness(.94);
}

.wpcf7-form input.ecs2[type="submit"]:disabled {
	opacity: .6;
	cursor: default;
}

.wpcf7-form .wpcf7-spinner {
	margin: 0 0 0 12px;
	vertical-align: middle;
}

/* ---- the messages CF7 shows after a submission ------------------------ */
/* CF7 prints this box on every page load and only fills it once something
   has happened, so it must not draw an empty outlined bar under the button.
   :empty is the only safe test. Do NOT add [aria-hidden="true"] here: CF7
   writes that attribute server-side and never changes it - the string appears
   exactly once in its script, always set to "true", and not on this element -
   so hiding on it hides every confirmation message forever. That shipped in
   1.31.3 and took two rounds to spot. */

.wpcf7 form.wpcf7-form .wpcf7-response-output:empty {
	display: none;
}

/* No panel and no rule - just the words, centred.
 *
 * Every selector here is written as `.wpcf7 form.wpcf7-form ...` rather than
 * the shorter `.wpcf7-form ...`. That is deliberate: Contact Form 7's own
 * stylesheet sets `border: 2px solid` on `.wpcf7 form .wpcf7-response-output`,
 * which outranks a two-class selector and was drawing a box round the message
 * - and tinting its edge CF7 green - no matter what we asked for. Matching its
 * shape and adding one class takes the rule back. */

.wpcf7 form.wpcf7-form .wpcf7-response-output {
	margin: 26px 0 4px;
	padding: 4px 0 0;
	border: 0;
	border-radius: 0;
	background: none;
	text-align: center;
	color: #101828;
	font-family: "Gotham Rounded", inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.wpcf7 form.wpcf7-form.sent .wpcf7-response-output {
	border: 0;
	color: #be70f1;
	font-size: 24px;
}

/* "One or more fields have an error" and its friends. Blue rather than amber
   by request - this is the state a visitor sees most often, and it reads as a
   prompt to look again rather than as an alarm. */
.wpcf7 form.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7 form.wpcf7-form.unaccepted .wpcf7-response-output,
.wpcf7 form.wpcf7-form.payment-required .wpcf7-response-output {
	border: 0;
	color: #63b0cd;
	font-size: 18px;
}

.wpcf7 form.wpcf7-form.failed .wpcf7-response-output,
.wpcf7 form.wpcf7-form.aborted .wpcf7-response-output {
	border: 0;
	color: #a8341f;
	font-size: 18px;
}

@media (max-width: 560px) {
	.wpcf7 form.wpcf7-form.sent .wpcf7-response-output {
		font-size: 20px;
	}
}

/* A field that failed validation, and the note under it.
 *
 * Lavender rather than red, by request - the same #be70f1 the sent message
 * uses. An empty box is not an error, it is a nudge, and red reads as alarm.
 *
 * One lavender, #be70f1, everywhere - border, note and sent message - by
 * request on 29 August. This replaced a deeper #8e3fc4 on the note alone.
 *
 * The trade-off, recorded rather than argued: #be70f1 measures about 4.6:1 on
 * the dark forms (Saluda, Say Hello) and about 3.1:1 on the white application
 * cards. 13px text wants 4.5:1, so it is comfortable on dark and thin on
 * light. Weight 600 is doing what it can. If the light forms ever read as
 * faint, the fix is a deeper tone scoped to those pages only - not a global
 * change, which would take the dark forms away from the brand colour. */
.wpcf7-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: #be70f1;
	font-size: 13px;
	font-weight: 600;
}

.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid,
.wpcf7-form select.wpcf7-not-valid {
	border-color: #be70f1;
}

@media (prefers-reduced-motion: reduce) {
	.wpcf7-form input.ecs2[type="submit"] {
		transition: none;
	}
}

/* ---- topic chips (Say Hello / Saluda) ---------------------------------
 *
 * The note forms use a radio group drawn as the pill buttons the page had
 * before a real form replaced the mailto block.
 *
 * Scoped to .ecchips on purpose. Two rules above - .wpcf7-list-item
 * {display:contents} and .wpcf7-list-item-label {display:none} - exist so the
 * application forms can use the page's own consent wording instead of CF7's.
 * Unscoped, those two would collapse every chip and hide its text, and the
 * topic control would render as four invisible buttons.
 */

.wpcf7-form .ecchips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpcf7-form .ecchips .wpcf7-list-item {
	display: inline-flex;
	margin: 0;
}

.wpcf7-form .ecchips label {
	display: inline-flex;
	margin: 0;
	cursor: pointer;
}

/* The real control is still there for keyboard and screen readers. It is just
   not the thing being drawn. */
.wpcf7-form .ecchips input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.wpcf7-form .ecchips .wpcf7-list-item-label {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid #e2e5e9;
	border-radius: 999px;
	background: #ffffff;
	color: #101828;
	cursor: pointer;
	font-family: 'EC Fence', 'Sora', sans-serif;
	font-weight: 700;
	font-size: 12.5px;
	line-height: 1;
	padding: 9px 15px;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wpcf7-form .ecchips label:hover .wpcf7-list-item-label {
	border-color: #79e002;
}

/* Filled, not tinted - the same green and the same near-black text as the
   submit button above, so a chosen chip reads as a pressed control rather
   than a faintly highlighted one. Dark on #79e002 measures about 10:1. */
.wpcf7-form .ecchips input[type="radio"]:checked + .wpcf7-list-item-label {
	border-color: #79e002;
	background: #79e002;
	color: #0b0c0d;
}

/* Hiding the input must not take the focus ring with it. */
.wpcf7-form .ecchips input[type="radio"]:focus-visible + .wpcf7-list-item-label {
	outline: 2px solid #79e002;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.wpcf7-form .ecchips .wpcf7-list-item-label {
		transition: none;
	}
}
