/**
 * CF7 form restyle — borderless white pill inputs, labels above fields.
 * Loads after style.css and overrides its underline-era form rules for every
 * CF7 form (enquiry, samples, quote). Palette + type stay the site's own.
 *
 * Fields are defined by their white fill against the site's warm off-white
 * background — no resting border. Focus = black ring, invalid = red ring.
 * Radii follow the site's pill buttons.
 */

/* ---- layout rhythm -------------------------------------------------- */

.wpcf7-form .wpcf7-form-control-wrap {
	position: relative;
	display: block;
	float: none;
	margin: 0 0 1.25rem;
}

/* ---- borderless white pill inputs ------------------------------------ */

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font-family: "aktiv-grotesk", sans-serif;
	font-weight: 300;
	font-size: 1.3rem;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.9);
	background-color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.95rem 1.3rem;
	margin: 0 0 1.25rem;
	appearance: none;
	transition: box-shadow 0.2s ease-out;
}

.wpcf7-form textarea {
	border-radius: 1.4rem;
	height: auto;
	min-height: 140px;
	overflow: auto;
	resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
	outline: none;
	box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.1);
}

.wpcf7-form ::placeholder {
	font-size: inherit;          /* defeat style.css's hardcoded 1.5rem */
	font-weight: 300;
	color: rgba(0, 0, 0, 0.9);   /* match the selects' title options */
	opacity: 1;                  /* Firefox dims placeholders by default */
}

/* ---- labels: text above, control below ------------------------------- */

.wpcf7-form .prj-nature {
	display: block;
	font-family: "aktiv-grotesk", sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	color: rgba(0, 0, 0, 0.8);
	margin: 0 0 1.25rem;
}

.wpcf7-form .prj-nature::after { display: none; }   /* kill the underline rule */

.wpcf7-form .prj-nature .wpcf7-form-control-wrap {
	float: none;
	display: block;
	margin: 0.45rem 0 0;
	font-size: 1.05rem;
}

/* group headings inside forms ("Your Details", "Your Project", …) */
.wpcf7-form .fs-m {
	display: block;
	margin: 1.8rem 0 1rem;
}

/* ---- selects ---------------------------------------------------------- */

.wpcf7-form select,
.wpcf7-form .select-css {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font-family: "aktiv-grotesk", sans-serif;
	font-weight: 300;
	font-size: 1.3rem;
	color: rgba(0, 0, 0, 0.9);
	background-color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.95rem 2.8rem 0.95rem 1.3rem;
	margin: 0;
	appearance: none;
	background-image: url('../img/icon_chevron_down.svg');
	background-repeat: no-repeat;
	background-position: right 1.15rem center;
	background-size: 0.9rem auto;
	cursor: pointer;
	transition: box-shadow 0.2s ease-out;
}

/* ---- checkbox groups as tappable chips -------------------------------- */

.wpcf7-form .wpcf7-checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.65rem;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item {
	display: block;
	margin: 0;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.65rem 1.15rem;
	font-size: 0.95rem;
	cursor: pointer;
	user-select: none;
	transition: box-shadow 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item-label {
	margin: 0;
	cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item label:hover {
	box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.1);
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item label:has(input:checked) {
	background-color: rgba(0, 0, 0, 0.9);
	color: #fff;
}

/* single opt-in checkbox (mailing list) stays plain, not a chip */
.wpcf7-form .mailing_list .wpcf7-list-item label {
	background: transparent;
	padding: 0;
	border-radius: 0;
}
.wpcf7-form .mailing_list .wpcf7-list-item label:has(input:checked) {
	background: transparent;
	color: inherit;
}
.wpcf7-form .mailing_list .wpcf7-list-item label:hover {
	box-shadow: none;
}

/* ---- file upload ------------------------------------------------------ */

.wpcf7-form input[type="file"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font-size: 0.95rem;
	background-color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.7rem 1.3rem 0.7rem 0.7rem;
	cursor: pointer;
}

.wpcf7-form input[type="file"]::file-selector-button {
	font-family: "aktiv-grotesk", sans-serif;
	font-size: 0.9rem;
	color: #fff;
	background: rgba(0, 0, 0, 0.9);
	border: none;
	border-radius: 999px;
	padding: 0.5rem 1.1rem;
	margin-right: 0.9rem;
	cursor: pointer;
}

/* ---- validation -------------------------------------------------------- */

/* Field-level tips use style.css's legacy treatment untouched: black box,
   white text, triangle pointing at the field. Only the gap to the pill above
   is adjusted here. No ring or border is added to the invalid field itself. */
.wpcf7-form span.wpcf7-not-valid-tip {
	margin-top: 0.6rem;
	width: 100%;
	box-sizing: border-box;
}

/* form-level response: black box, white text (matches style.css, restated
   here so validation errors never render as bare red text) */
.wpcf7 form .wpcf7-response-output {
	background-color: rgba(0, 0, 0, 0.9);
	color: #fff !important;
	border: none !important;
	border-radius: 1.4rem;
	padding: 0.9rem 1.3rem !important;
	margin: 1.25rem 0 0;
	font-size: 1rem;
	text-align: left !important;
}

/* ---- submit: solid primary at the end of a long form ------------------- */

.wpcf7-form input[type="submit"] {
	color: #fff;
	background-color: rgba(0, 0, 0, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.9);
	border-radius: 999px;
	font-size: 1.05rem;
	padding: 0.9rem 1.8rem;
	margin-top: 0.6rem;
}

.wpcf7-form input[type="submit"]:hover {
	color: rgba(0, 0, 0, 0.9);
	background-color: transparent;
}

/* ---- mobile ----------------------------------------------------------- */

@media only screen and (max-width: 760px) {
	.wpcf7-form input[type="text"],
	.wpcf7-form input[type="email"],
	.wpcf7-form textarea,
	.wpcf7-form select,
	.wpcf7-form .select-css {
		font-size: 1.15rem;              /* ≥16px-equivalent stops iOS zoom-on-focus */
		padding: 0.85rem 1.15rem;
	}
	.wpcf7-form select,
	.wpcf7-form .select-css {
		padding-right: 2.6rem;
	}
	.wpcf7-form .wpcf7-checkbox .wpcf7-list-item label {
		padding: 0.55rem 1rem;
	}
}
