/*	Name:	Facile Forms Framework
	Author:	Patrick O'Neill
	URL:	http://www.patrick-oneill.com/article/2008/facile-forms-framework/
	Desc:	Facile Forms Framework (FFF) is a basic set of guidelines for
			building flexible, attractive, and accessible (X)HTML forms 
			and styling them with lightweight, but comprehensive CSS.  Some 
			selectors are over-complicated ("form fieldset legend" instead
			of just "legend") for the purpose of encouraging valid (X)HTML.
*/

/*	Provide wrapping for float containers.  This is by no 
	means the only way to provide cross-browser clearing, 
	but it's the method I usually use!
	
	URL:	http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/
*/
.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }

/*	Basic body styles.  These are independent of the FFF 
	and are only used for demo purposes.
*/
body {
	padding: 0 0 50px 0;
	background: #A6BAC1 url(images/bg.jpg) repeat-x center top;
	font: normal normal normal 62.5%/1 Verdana, sans-serif;
	color: #333;
	text-align: center;
}

a:link, a:visited {
	color: #3186BB;
	text-decoration: underline;
}

a:hover, a:focus, a:active {
	color: #000;
	text-decoration: none;
}

#intro {
	width: 600px;
	padding: 20px 20px 0 20px;
	margin: 0 auto;
	text-align: left;
	line-height: 1.5em;
}

	#intro h1 {
		margin: 0 0 10px 0;
		font-size: 1.5em;
	}

	#intro p { margin: 0 0 20px 0; }

/*	Form, Fieldset, and Legend
	--------------------------
	Many of these styles - particularly those applied to <form> are only there to make the example pretty.  Change them at your leisure!   
*/

form {
	width: 600px;
	/* Removed the bottom padding so the fieldsets' bottom margin can take over. */
	padding: 20px 20px 0 20px;
	border: none;
	margin: 0 auto;
	font-size: 1.1em;
	line-height: 1.6em;
	text-align: left;
	position: relative;
}

form fieldset {
	border: none;
	/* Last <div> provides the bottom border, so not needed. */
	margin: 0 0 20px 0;
	/* Usually inherited by div.e */
	background: #fff url(images/menu_bg.jpg) repeat-x left top;
	padding: 15px;
	display: block;
	width: 570px;
	padding-top: 35px;
	overflow: hidden;
}

form fieldset legend span {
	padding: 10px 10px;
	border: none;
	margin: 0px;
	/* Recommended: give this the same background color/style as div.o (to contrast with fieldset) */
	background: url(images/menu_hover.jpg) repeat-x left top;
	height: 35px;
	color: #fff;
	position: relative;
	top: 17.5px;
}

/*	Divs
	----
*/

form fieldset div {
	padding: 10px 0;
	border: none;
	position: relative;
}

	form fieldset div.o {
		/* Styles for odd divs. Generally, div.e isn't needed as it will inherit the fieldset background. */
		background-color: #e6f1f5;
	}

	form fieldset div.buttons {
		/* Buttons div has no label, so it uses padding to horizontally align its contents to the inputs. */
		padding: 10px 0 10px 210px;
	}
	
	form fieldset div.scroller {
		width: 420px;
		height: 150px;
		overflow: auto;
		margin: 0px auto 20px;
		border: 1px solid #A6BAC1;
		padding: 0px 0px 15px 10px;
}

/*	Paragraphs
	----------
*/

form fieldset p.title {
	margin: 10px 5px;
	font-size: 12px;
	font-weight: bold;
	color: #698c99;
}

form fieldset div p {
	/*clear: both;*/
	/* Same as text inputs and such.  Just to line everything up! */
	width: 325px;
	padding: 5px 10px 0 0;
	/* Same as label width + label margin. */
	margin: 0 0 0 210px;
	font-size: 9px;
}

form fieldset div p.center {
	clear: both;
	/* Same as text inputs and such.  Just to line everything up! */
	text-align:center;
	font-size: 12px;
}

	form fieldset div.buttons p {
		/* Buttons div has padding to make up for label width, so no left margin on paragraph is necessary. */
		margin: 0;
	}

	form fieldset div.scroller p {
		margin-left: 0px;
		width: auto;
		font-size: 12px;
	}
	
	form fieldset div.checkboxes-radios div p {
		margin-left: 0px;
	}

/*	Labels 
	------
*/

form fieldset div.text label, 
/* Since each radio or checkbox needs a label, we use an <h6> to label the group! */
form fieldset div.checkboxes-radios h6, 
form fieldset div.select-single label,
form fieldset div.select-multiple label {
	float: left;
	width: 200px;
	margin: 0 10px 0 0;
	text-align: right;
}

	form fieldset div.checkboxes-radios label { margin: 0 10px 0 0; }

/*	Inputs, Textareas, Radios, Checkboxes, Selects and Related 
	----------------------------------------------------------
*/

form fieldset div label input {
	vertical-align:top;
}

form fieldset div.text input,
form fieldset div.text textarea,
form fieldset div.checkboxes-radios div, 
form fieldset div.select-single select,
form fieldset div.select-multiple select {
	/* Checkboxes and radios are each contained in a second div to keep them aligned with their <h6> "label". */
	float: left;
	width: 310px;
	margin: 0 10px 0 0;
}

form fieldset div.checkboxes-radios div {
	width: 360px;
	margin: 0px;
}

form fieldset div.text input,
form fieldset div.text textarea,
form fieldset div.select-single select,
form fieldset div.select-multiple select {
	border: 1px solid #cac9b9;
}

	form fieldset div.text textarea { overflow: auto; }

	form fieldset div.text textarea, 
	form fieldset div.select-multiple select {
		height: 100px;
	}

	form fieldset div.select-single select, 
	form fieldset div.select-multiple select {
		/* 4px wider for parity with text inputs. */
		width: 314px;
	}

	form fieldset div.checkboxes-radios div {
		/* Override form fieldset div styles. */
		padding: 0;
		border-bottom: none;
	}

	form fieldset div.buttons button,
	form fieldset div.buttons input {
		padding: 0 2px;
		/* Space any buttons apart horizontally. */
		margin: 0 10px 0 0;
		text-align: center;
	}

/*	Hints
	----- 
	It might be a good idea to enhance this with JavaScript/DOM through jQuery or the like.  A background-image might work nicely, too!
*/

form fieldset span.hint {
	float: right;
	padding: 0 .5em;
	margin: 0 10px 0 0;
	background-color: #3186BB;
	color: #FFF;
	font-weight: bold;
	cursor: help;
}

	form fieldset span.hint:hover {
		/* This won't work in IE 6.  Either ignore that fact or use JavaScript/DOM to create a rollover on these spans. */
		background-color: #084A8E;
	}
	
	
.errorMessage {
	color: red;
	font-size: 0.8em;
	position: absolute;
	right: 65px;
}

div.checkboxes-radios span.errorMessage {
	display: none;
}

.red {
	border: 1px solid red !important;
}

a.nextBtn,
a.backBtn {
	color: #698c99;
	display: block;
	padding: 2px 5px;
	border: 1px solid #e6f1f5;
	margin-top: 10px;
	text-decoration: none;
}

a.nextBtn:hover,
a.backBtn:hover {
	color: #698c99;
	border: 1px solid #A6BAC1;
	background: #e6f1f5;
	text-decoration: none;
}

a.nextBtn {
	float: right;
}

a.backBtn {
	float: left;
}

div.error {
	margin: 20px auto;
	width: 570px;
	background: #fff;
	padding: 20px;
}	background: #fff;
	padding: 20px;
}