/* WLCP Contact Form Style — Frontend (v4.0.1)
   Scope is controlled by body.wlcp-cf7-enabled + runtime wrapper selection.
*/

body.wlcp-cf7-enabled .wlcp-cf7-scope.wpcf7-form,
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-form{
	display:grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 12px;
}

/*
  CF7 wraps each field row inside <p> (grid item).
  Base behavior (default layout = 1 column): make every direct <p> span full width.
  Per-field spans (wlcp-span-*) can override this.
*/
body.wlcp-cf7-enabled .wlcp-cf7-scope.wpcf7-form > p:not([class*="wlcp-span-"]),
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-form > p:not([class*="wlcp-span-"]){
    grid-column: span 12;
}

/* Legacy / helpers */
body.wlcp-cf7-enabled .wlcp-cf7-scope.wpcf7-form .wlcp-cf7-block,
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-form .wlcp-cf7-block{
	grid-column: span 12;
}

/* Layout spans (assigned by runtime JS) */
body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-12{ grid-column: span 12; }
body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-8{ grid-column: span 8; }
body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-6{ grid-column: span 6; }
body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-4{ grid-column: span 4; }

@media (max-width: 767px){
	body.wlcp-cf7-enabled .wlcp-cf7-scope.wpcf7-form,
	body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-form{
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}
	body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-8,
	body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-6,
	body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-span-4{
		grid-column: span 12;
	}
}

/* Inputs */
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="text"],
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="email"],
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="tel"],
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="url"],
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="number"],
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="date"],
body.wlcp-cf7-enabled .wlcp-cf7-scope select,
body.wlcp-cf7-enabled .wlcp-cf7-scope textarea{
	width:100%;
	box-sizing:border-box;
	background: var(--wlcp-cf7-field-bg);
	color: var(--wlcp-cf7-field-text);
	border: 1px solid var(--wlcp-cf7-field-border);
	border-radius: var(--wlcp-cf7-radius);
	padding: var(--wlcp-cf7-padding);
	outline: none;
	font-size: var(--wlcp-cf7-field-font-size, inherit);
	font-weight: var(--wlcp-cf7-field-font-weight, inherit);

}

body.wlcp-cf7-enabled .wlcp-cf7-scope textarea{
	min-height: 120px;
	resize: vertical;
}

/* Labels */
body.wlcp-cf7-enabled .wlcp-cf7-scope label{
	display:block;
	margin-bottom:6px;

	font-size: var(--wlcp-cf7-label-font-size, inherit);
	font-weight: var(--wlcp-cf7-label-font-weight, inherit);
	text-transform: var(--wlcp-cf7-label-transform, none);
}

/* Submit button */
body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="submit"],
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-submit{
	background: var(--wlcp-cf7-btn-bg);
	color: var(--wlcp-cf7-btn-text);
	border: 0;
	border-radius: var(--wlcp-cf7-radius);
	padding: 12px 20px;
	cursor: pointer;
	line-height: 1.4;
	transition: all .2s;
	width: auto;
	font-size: var(--wlcp-cf7-button-font-size, inherit);
	font-weight: var(--wlcp-cf7-button-font-weight, 600);
	text-transform: var(--wlcp-cf7-button-transform, none);
}

/* Full width button (runtime adds wlcp-btn-full on submit when enabled) */
body.wlcp-cf7-enabled .wlcp-cf7-scope .wlcp-btn-full{
	width:100% !important;
}

body.wlcp-cf7-enabled .wlcp-cf7-scope input[type="submit"]:hover,
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-submit:hover{
	background: var(--wlcp-cf7-btn-hover-bg);
	color: var(--wlcp-cf7-btn-hover-text);
}

/* Validation message borders off (keep clean) */
body.wlcp-cf7-enabled .wlcp-cf7-scope div.wpcf7-validation-errors,
body.wlcp-cf7-enabled .wlcp-cf7-scope div.wpcf7-mail-sent-ok{
	border: 0;
}

/* Add spacing below captcha / Cloudflare */
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-recaptcha,
body.wlcp-cf7-enabled .wlcp-cf7-scope .g-recaptcha,
body.wlcp-cf7-enabled .wlcp-cf7-scope .cf-turnstile,
body.wlcp-cf7-enabled .wlcp-cf7-scope iframe[src*="recaptcha"],
body.wlcp-cf7-enabled .wlcp-cf7-scope iframe[src*="turnstile"]{
    margin-bottom:20px;
}

/* Remove FOUC (Flash of Unstyled Content) */
body.wlcp-cf7-enabled .wlcp-cf7-scope.wpcf7-form,
body.wlcp-cf7-enabled .wlcp-cf7-scope .wpcf7-form{
    visibility:visible;
}

/* Response Output */
.wlcp-cf7-scope .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 0 0 20px !important;
    padding: 0px !important;
    border: 0px solid #00a0d2 !important;
}

.wlcp-cf7-scope .wpcf7-spinner::before {
    background-color: #bdbdbd;
}

.wlcp-cf7-scope .wpcf7-spinner {
    background-color: #ffffff;
    margin: 10px 0px 10px 0px;
}

/* Fix List*/
.wlcp-cf7-scope .wpcf7-list-item {
  display: block;
  margin: 0 0 0 1em;
}

.wlcp-cf7-scope .wpcf7-free-text {
  display: block;
  max-width: 400px;
  margin: 8px 0 0 24px;
}
