/*
 * Alba form styling for UltraLav.
 *
 * Kept apart from template.css because that file is a faithful port of the legacy Joomla
 * stylesheet and should stay one. Everything the legacy file says about forms is written
 * against ChronoForms' own markup - `.form-group.gcore-form-row`,
 * `label.control-label.gcore-label-top`, `input#button16` - and Alba emits none of those.
 * Without this file the contact form renders as unstyled browser defaults: black labels
 * instead of blue, one field per row instead of three, and a grey default submit button.
 *
 * The class names below are what HoltBosse\Form actually emits:
 *   Form::display()      .form_field.field wrapping every field
 *   Input/Textarea       .field > label.label + .control > .input
 *   Select               .field > label.label + .control > .select > select
 *   FormInstance widget  button.button.is-primary
 */

.article form .field {
	margin-bottom: 18px;
}

/* the blue labels the legacy sheet gave label.control-label.gcore-label-top */
.article form .field > label.label {
	display: block;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #1176bb;
	margin-bottom: 4px;
}

/* required fields got a red asterisk in chronoforms; Alba marks them with a class only */
.article form .field.required > label.label::after {
	content: ' *';
	color: #ff0000;
	font-size: 9px;
	vertical-align: top;
}

.article form .control {
	position: relative;
}

.article form .input,
.article form select,
.article form textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	color: #696a6a;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 0;
	background-color: #fff;
}

.article form textarea {
	min-height: 90px;
	resize: vertical;
}

.article form .input:focus,
.article form select:focus,
.article form textarea:focus {
	outline: none;
	border-color: #1176bb;
}

.article form .help {
	font-size: 12px;
	color: #888;
	margin: 4px 0 0;
}

/* the submit button, styled like the legacy input#button16 */
.article form button[type="submit"] {
	font-family: 'Open Sans', sans-serif;
	color: #fff;
	font-size: .9em;
	font-weight: 700;
	text-decoration: none;
	padding: 20px;
	background-color: #167abe;
	background-image: none;
	text-shadow: none;
	height: auto;
	border: 0;
	border-radius: 0;
	margin-bottom: 22px;
	cursor: pointer;
}

.article form button[type="submit"]:hover {
	background-color: rgba(22, 122, 190, 0.8);
}

/*
 * Three across on a wide screen, matching `.form-group.gcore-form-row { width: 33% }` at
 * the same breakpoint the legacy sheet used. The comments box and the submit button take
 * the full width, as they did.
 */
@media screen and (min-width: 768px) {
	.article form .form_field {
		float: left;
		width: 33%;
		padding-right: 20px;
		box-sizing: border-box;
	}

	.article form .form_field.field_id_comments,
	.article form .form_field.field_id_website {
		float: none;
		clear: both;
		width: 100%;
		padding-right: 0;
	}

	.article form button[type="submit"] {
		clear: both;
		display: block;
	}
}
