/*
 * Contact Us page (/contact-us/, page 36): inline forms as cards in the popup's style -
 * "Quick Enquiry" (CF7 #2183, desktop) and "Enquiry" (CF7 #1345, the copy Divi shows on phones).
 * Builds on contact-popup.css (colour variables, honeypot, validation feedback) - loaded after it, this page only.
 * Markup additions (card class, labels, hint, privacy note) come from contact-page.js; validation itself stays in contact-popup.js/.php.
 */

/* ---------- Card ---------- */
.scp-card {
	margin: 0;
	background: #fff;
	color: var(--scp-text);
	border: 1px solid #e6eaf3;
	border-radius: 16px;
	box-shadow: 0 18px 44px rgba(10, 22, 70, 0.14);
	overflow: hidden;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 15px;
}
.scp-card :is(.et_pb_code_inner, .et_pb_text_inner) > h3:first-child {
	margin: 0;
	padding: 13px 20px !important;
	background: linear-gradient(120deg, var(--scp-brand) 0%, var(--scp-accent) 100%);
	color: #fff;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
}
.scp-card :is(.et_pb_code_inner, .et_pb_text_inner) > h3:first-child span { color: inherit !important; }
.scp-card .et_pb_text_inner > p:empty { display: none; }
.scp-card .scp-sub {
	margin: 4px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.85) !important; /* Divi text module sets p colour */
}
.scp-card .wpcf7 { padding: 16px 20px 14px; }
.scp-card .wpcf7-form p { margin: 0 0 10px; padding: 0; }
/* nothing hidden should take up room */
.scp-card .wpcf7-form .hidden-fields-container { display: none; }

/* ---------- Fields ---------- */
.scp-card .scp-label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--scp-text);
}
.scp-card .scp-label .scp-req { color: var(--scp-error); margin-left: 2px; }
.scp-card .wpcf7-form-control-wrap { display: block; position: relative; }

.scp-card .wpcf7-form input.wpcf7-form-control:not([type="submit"]),
.scp-card .wpcf7-form textarea.wpcf7-form-control {
	display: block;
	width: 100% !important;
	box-sizing: border-box;
	margin: 0;
	padding: 10px 14px 10px 40px !important;
	font-size: 15px !important;
	line-height: 1.4;
	color: var(--scp-text) !important;
	background-color: var(--scp-field) !important;
	background-repeat: no-repeat !important;
	background-position: 13px 50% !important;
	background-size: 16px 16px !important;
	border: 1.5px solid var(--scp-border) !important;
	border-radius: 10px !important;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.scp-card .wpcf7-form textarea.wpcf7-form-control {
	height: 112px !important; /* narrow card: the requirement placeholder needs 4 lines */
	min-height: 70px;
	max-height: 260px;
	resize: vertical;
	background-position: 13px 12px !important;
}
.scp-card .wpcf7-form .wpcf7-form-control::placeholder { color: #9aa3b5; opacity: 1; }
/* no scrollbar on the empty box just because the placeholder is long */
.scp-card .wpcf7-form textarea.wpcf7-form-control:placeholder-shown { overflow: hidden; }
.scp-card .wpcf7-form .wpcf7-form-control:hover { border-color: #b9c3d8 !important; }
.scp-card .wpcf7-form input.wpcf7-form-control:not([type="submit"]):focus,
.scp-card .wpcf7-form textarea.wpcf7-form-control:focus {
	outline: none;
	background-color: #fff !important;
	border-color: var(--scp-accent) !important;
	box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.15);
}

/* Field icons (same as the popup) - by field name, this form's classes differ from the popup's */
.scp-card [name="Name"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important; }
.scp-card [name="Email"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E") !important; }
.scp-card :is([name="Contact"], [name="ContactNo"]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") !important; }
.scp-card :is([name="Message"], [name="Comment"]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") !important; }

/* ---------- Validation states (classes set by contact-popup.js) ---------- */
.scp-card .wpcf7-form .wpcf7-form-control-wrap.scp-valid .wpcf7-form-control { border-color: #9bd3a8 !important; }
.scp-card .wpcf7-form .wpcf7-form-control-wrap.scp-invalid .wpcf7-form-control,
.scp-card .wpcf7-form .wpcf7-form-control-wrap .wpcf7-form-control.wpcf7-not-valid {
	border-color: var(--scp-error) !important;
	background-color: var(--scp-error-bg) !important;
}
.scp-card .wpcf7-form .wpcf7-form-control-wrap.scp-invalid .wpcf7-form-control:focus,
.scp-card .wpcf7-form .wpcf7-form-control-wrap .wpcf7-form-control.wpcf7-not-valid:focus {
	background-color: #fff !important;
	box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.14) !important;
}

/* Messages under fields: compact red text with a small warning icon, instead of the pink boxes */
.scp-card .scp-error,
.scp-card .wpcf7-not-valid-tip {
	display: block;
	margin: 6px 0 0 2px;
	padding: 0 0 0 20px;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	color: var(--scp-error) !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d93025' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") no-repeat 0 1px / 15px 15px;
	border-radius: 0;
	animation: scp-in 0.18s ease-out;
}
.scp-card .scp-error:empty,
.scp-card .scp-suggest[hidden] { display: none; }
.scp-card .scp-invalid .wpcf7-not-valid-tip { display: none; }
.scp-card .scp-suggest {
	display: block;
	margin: 6px 0 0 2px;
	padding: 0;
	font-size: 12.5px;
	color: var(--scp-muted);
	background: none;
}
.scp-card .scp-suggest button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--scp-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
.scp-card .scp-hint {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin: 6px 2px 0;
	font-size: 12px;
	color: var(--scp-muted);
}
.scp-card .scp-hint .scp-count.scp-over { color: var(--scp-error); font-weight: 600; }
@keyframes scp-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---------- Submit: full-width blue button like the popup (#Submit beats style.css "#Submit { width: initial !important }") ---------- */
.scp-card .wpcf7-form p:has(> .wpcf7-submit) { margin: 14px 0 0; padding: 0; text-align: center; }
.scp-card .wpcf7-form .wpcf7-submit,
.scp-card .wpcf7-form .wpcf7-submit:hover,
.scp-card .wpcf7-form #Submit.wpcf7-submit {
	display: block;
	width: 100% !important;
	margin: 0;
	padding: 11px 20px !important;
	font-size: 16px !important;
	font-weight: 600;
	letter-spacing: 0.3px;
	line-height: 1.3 !important;
	color: #fff !important;
	background: linear-gradient(120deg, var(--scp-brand) 0%, var(--scp-accent) 100%) !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: 0 8px 20px rgba(31, 63, 191, 0.3) !important;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.scp-card .wpcf7-form .wpcf7-submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.scp-card .wpcf7-form .wpcf7-submit:focus-visible { outline: 3px solid rgba(47, 128, 237, 0.45); outline-offset: 2px; }
.scp-card .wpcf7-form .wpcf7-submit:disabled { opacity: 0.7; cursor: wait; transform: none; }
.scp-card .wpcf7-form .wpcf7-submit::after,
.scp-card .wpcf7-form .wpcf7-submit::before { display: none !important; }
/* spinner only takes room while sending (CF7 adds .submitting) */
.scp-card .wpcf7-form .wpcf7-spinner { display: none !important; }
.scp-card .wpcf7-form.submitting .wpcf7-spinner { display: block !important; margin: 8px auto 0; }
.scp-card .wpcf7-form p.scp-privacy { /* p.scp-privacy beats the ".scp-card .wpcf7-form p" margin rule */
	margin: 0;
	padding: 12px 0 0; /* space below the button */
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--scp-muted) !important;
	text-align: center;
}

/* ---------- Form-level response (sent / errors) - no reserved gap until CF7 has something to say ---------- */
.scp-card .wpcf7 form.init .wpcf7-response-output { display: none; }
.scp-card .wpcf7 form .wpcf7-response-output {
	margin: 12px 0 0 !important;
	padding: 10px 14px !important;
	border: 0 !important;
	border-left: 4px solid !important;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.45;
	text-align: left;
}
.scp-card .wpcf7 form.invalid .wpcf7-response-output,
.scp-card .wpcf7 form.unaccepted .wpcf7-response-output,
.scp-card .wpcf7 form.failed .wpcf7-response-output,
.scp-card .wpcf7 form.aborted .wpcf7-response-output,
.scp-card .wpcf7 form.spam .wpcf7-response-output {
	color: var(--scp-error);
	background: var(--scp-error-bg);
	border-color: var(--scp-error) !important;
}
.scp-card .wpcf7 form.sent .wpcf7-response-output {
	color: var(--scp-ok);
	background: var(--scp-ok-bg);
	border-color: var(--scp-ok) !important;
}

@media (max-width: 980px) {
	.scp-card { margin-top: 12px; }
}
/* Phones: a little tighter; 16px font stops iOS zooming into a field on focus */
@media (max-width: 640px) {
	.scp-card { border-radius: 14px; }
	.scp-card :is(.et_pb_code_inner, .et_pb_text_inner) > h3:first-child { padding: 12px 18px !important; font-size: 18px; }
	.scp-card .wpcf7 { padding: 14px 16px 12px; }
	.scp-card .wpcf7-form input.wpcf7-form-control:not([type="submit"]),
	.scp-card .wpcf7-form textarea.wpcf7-form-control { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.scp-card .scp-error,
	.scp-card .wpcf7-form .wpcf7-submit { animation: none; transition: none !important; }
}
