/*
 * Theme Name: NewToBC 2021
 * Description: Based on Timber Starter Theme by Upstatement
 * Version: 0.3.1
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Tags: bootstrap, wordpress
 * Text Domain: newtobc
 *
 * This theme, like WordPress, is licensed under the GPL.
*/

/*
 * Theme overrides. Plain CSS, no build step: src/scss and dist/ are frozen.
 * Enqueued from functions.php after the dist bundle (handle n2bc_styles).
 */

/* ==========================================================================
   Ninja Forms
   Replaces the Ninja Forms Layout & Styles add-on.
   - Library Champions forms carry the form wrapper class n2bc_lib-champ-form.
   - Two columns: the field whose container class is n2bc-col-break starts
     the right-hand column. Cloned forms keep both classes.
   - Contact Us is form 1.
   ========================================================================== */

/* Success message, all forms */
.nf-form-cont .nf-response-msg {
	margin: 20px 0;
	padding: 1.3em 10px 0;
	border: 2px solid #63ad35;
	color: #63ad35;
	font-size: 18px;
	font-weight: 500;
	text-align: center;
}

/* Library Champions forms */
.nf-form-cont.n2bc_lib-champ-form {
	max-width: 1200px;
	width: auto;
}

.n2bc_lib-champ-form .submit-container input.ninja-forms-field {
	padding: 10px 55px;
	border-radius: 0 1rem;
	background-color: #2a7b9b;
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	text-transform: uppercase;
}

.n2bc_lib-champ-form .submit-container input.ninja-forms-field:hover {
	background-color: #9fc54d;
	color: #fff;
}

/* Single-column Library Champions forms (Sign up): the inset the add-on's cells gave */
.n2bc_lib-champ-form nf-fields-wrap:not(:has(> nf-field .n2bc-col-break)) {
	display: block;
	padding: 0 4%;
}

@media only screen and (max-width: 600px) {
	.n2bc_lib-champ-form nf-fields-wrap:not(:has(> nf-field .n2bc-col-break)) {
		padding: 0 5px;
	}
}

/* Two columns from 601px; one column below, as before */
@media only screen and (min-width: 601px) {
	.nf-form-cont nf-fields-wrap:has(> nf-field .n2bc-col-break) {
		display: block;
		column-count: 2;
		column-gap: 8%;
	}

	.nf-form-cont nf-fields-wrap:has(> nf-field .n2bc-col-break) > nf-field {
		display: block;
		-webkit-column-break-inside: avoid;
		break-inside: avoid;
	}

	.nf-form-cont nf-fields-wrap:has(> nf-field .n2bc-col-break) > nf-field:has(.n2bc-col-break) {
		-webkit-column-break-before: always;
		break-before: column;
	}

	/* The "Please Complete" heading spans both columns, as before */
	.nf-form-cont nf-fields-wrap:has(> nf-field .n2bc-col-break) > nf-field:has(.n2bc_lib-champ-form-heading) {
		column-span: all;
	}

	/* First and last name stack inside the left column, as before */
	.nf-form-cont nf-fields-wrap:has(> nf-field .n2bc-col-break) .one-half {
		float: none;
		width: 100%;
		margin-left: 0;
	}
}

/* The heading's old -4% offset (Customizer CSS) matched the add-on's cell padding, which is gone */
.n2bc_lib-champ-form .n2bc_lib-champ-form-heading {
	margin-left: 0;
}

/* Contact Us (form 1): white labels and button on the teal panel */
#nf-form-1-cont .nf-field-label label {
	color: #fff;
	font-weight: 400;
}

#nf-form-1-cont .nf-response-msg {
	color: #fff;
}

#nf-form-1-cont .submit-container input.ninja-forms-field {
	padding: 10px 100px;
	border-radius: 0 1rem;
	background-color: #fff;
	color: #2a7b9b;
	font-size: 20px;
	font-weight: 400;
	text-transform: uppercase;
}

#nf-form-1-cont .submit-container input.ninja-forms-field:hover {
	background-color: #9fc54d;
	color: #fff;
}
