/**
 * CFI Contact Us form — styles that sit on top of the existing
 * css/style.css. The form keeps the site’s grey fields and green
 * buttons, with visible labels, a lasting status message, and a
 * layout that works on a phone.
 */

/* Visible labels above each field (the old form used the input value
   as a fake placeholder and had no real <label>). */
#contact-form.cfi-contact-form {
	padding: 2px 0 0 0;
	max-width: 460px;
	position: relative;
}

#contact-form .cfi-field {
	display: block;
	margin: 0 0 14px 0;
	overflow: visible;
	clear: both;
	min-height: 0;
}

#contact-form .cfi-field > label,
#contact-form .cfi-label {
	display: block;
	float: none;
	overflow: visible;
	min-height: 0;
	margin: 0 0 5px 0;
	padding: 0;
	font-size: 13px;
	font-weight: bold;
	line-height: 18px;
	color: #343436;
}

#contact-form .cfi-req {
	color: #b00000;
	font-weight: bold;
}

#contact-form .cfi-optional {
	font-weight: normal;
	color: #666666;
	font-size: 11px;
}

/* The existing site stylesheet sets `#contact-form span { display:block }`,
   which was meant for the old error messages. Required marks and
   “optional” notes must stay on the same line as their labels. */
#contact-form span.cfi-req,
#contact-form span.cfi-optional {
	display: inline;
	margin: 0;
}

#contact-form .cfi-legend {
	margin: 0 0 12px 0;
	font-size: 12px;
	color: #555555;
}

/* Override the old 221px / float:left input sizing so fields fill
   the column and include their padding in the width. */
#contact-form .cfi-field input[type="text"],
#contact-form .cfi-field input[type="email"],
#contact-form .cfi-field input[type="tel"],
#contact-form .cfi-field select,
#contact-form .cfi-field textarea {
	float: none;
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 440px;
	margin: 0;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	color: #343436;
	background: #ededed;
	border-top: 1px solid #cdcdcd;
	border-left: 1px solid #cdcdcd;
	border-right: 1px solid #dde7ec;
	border-bottom: 1px solid #dde7ec;
	padding: 6px 14px;
	outline: none;
	position: relative;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

#contact-form .cfi-field textarea {
	overflow: auto;
	height: 145px;
	resize: vertical;
	min-height: 110px;
	max-height: 320px;
}

#contact-form .cfi-field select {
	height: 36px;
	padding-right: 28px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23343436' d='M0 0l5 6 5-6z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-color: #ededed;
	cursor: pointer;
}

#contact-form .cfi-field input:focus,
#contact-form .cfi-field select:focus,
#contact-form .cfi-field textarea:focus {
	outline: 2px solid #02bef8;
	outline-offset: 1px;
	background: #f7f7f7;
}

#contact-form .cfi-field input[aria-invalid="true"],
#contact-form .cfi-field select[aria-invalid="true"],
#contact-form .cfi-field textarea[aria-invalid="true"] {
	border-color: #c00000;
}

#contact-form .cfi-field-error {
	display: none;
	color: #c00000;
	font-size: 11px;
	line-height: 15px;
	padding-top: 6px;
	float: none;
	text-align: left;
	margin: 0;
}

#contact-form .cfi-field-error.is-visible {
	display: block;
}

/* Status area. The old script hid .success after four seconds and
   treated any HTTP 200 as success. This message stays put, and the
   script only adds .is-ok when the server returns {ok:true}. The
   existing rule `#contact-form .success {display:none}` is avoided
   by using a different class name. */
#contact-form .cfi-status {
	display: none;
	box-sizing: border-box;
	width: 100%;
	max-width: 440px;
	margin: 0 0 16px 0;
	padding: 12px 14px;
	line-height: 1.5;
	font-size: 14px;
	outline: none;
}

#contact-form .cfi-status.is-visible {
	display: block;
}

#contact-form .cfi-status.is-ok {
	color: #155724;
	background: #d4edda;
	border: 1px solid #c3e6cb;
}

#contact-form .cfi-status.is-err {
	color: #721c24;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
}

#contact-form .cfi-privacy {
	margin: 4px 0 0 0;
	padding: 0;
	font-size: 12px;
	line-height: 18px;
	color: #343436;
	clear: both;
	max-width: 440px;
}

#contact-form .cfi-privacy a {
	color: #0288b8;
}

/* Honeypot: visually hidden but present in the DOM (some bots skip
   display:none fields). Not focusable, not announced. */
#contact-form .cfi-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Real <button> elements, styled to match the site’s .button1 links. */
#contact-form .buttons2 {
	overflow: hidden;
	text-align: right;
	position: relative;
	clear: both;
	padding-top: 16px;
}

#contact-form .buttons2 button.button1 {
	display: inline-block;
	border: 0;
	cursor: pointer;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	line-height: 18px;
	text-decoration: none;
	text-align: center;
	color: #ffffff;
	background: #6a6a6a url("../images/bg_link.gif") 0 0 repeat;
	padding: 7px 27px 8px;
	margin-top: 0;
	margin-left: 20px;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

#contact-form .buttons2 button.button1:hover,
#contact-form .buttons2 button.button1:focus {
	background: #1e2021;
	color: #ffffff;
	outline: 2px solid #02bef8;
	outline-offset: 2px;
}

#contact-form .buttons2 button.button1:disabled {
	opacity: 0.65;
	cursor: wait;
	background: #1e2021;
}

@media only screen and (max-width: 767px) {
	#contact-form.cfi-contact-form {
		max-width: none;
	}
	#contact-form .cfi-field input[type="text"],
	#contact-form .cfi-field input[type="email"],
	#contact-form .cfi-field input[type="tel"],
	#contact-form .cfi-field select,
	#contact-form .cfi-field textarea,
	#contact-form .cfi-status,
	#contact-form .cfi-privacy {
		width: 100%;
		max-width: none;
	}
}

@media only screen and (max-width: 479px) {
	#contact-form .buttons2 {
		text-align: left;
		padding-right: 0;
	}
	#contact-form .buttons2 button.button1 {
		margin: 0 12px 8px 0;
	}
}
