/*
Forms: Base styles for various input types, form layouts, and states
-------------------------------------------------------------
*/

/*
GENERAL STYLES
--------------
*/


/* Make all forms have space below them */
form {
  margin: 0 0 18px;
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

/* Groups of fields with labels on top (legends) */
legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 27px;
  font-size: 19.5px;
  line-height: 36px;
  color: #333333;
  border: 0;
  border-bottom: 1px solid #eee;
}
legend small {
  font-size: 13.5px;
  color: #999999;
}


/* Set font for forms */
label,
input,
button,
select,
textarea {
  font-size: 13px;
  font-weight: normal;
  line-height: 18px;
}
input,
button,
select,
textarea {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
label {
  display: block;
  margin-bottom: 5px;
  color: #333333;
}

/* Inputs, Textareas, Selects */
input,
textarea,
select,
.uneditable-input {
  display: inline-block;
  width: 210px;
  height: 18px;
  padding: 4px;
  margin-bottom: 9px;
  font-size: 13px;
  line-height: 18px;
  color: #555555;
  border: 1px solid #cccccc;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
}
.uneditable-textarea {
  width: auto;
  height: auto;
}

/* Inputs within a label */
label input,
label textarea,
label select {
  display: block;
}

/* Mini reset for unique input types */
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  margin: 3px 0;
  *margin-top: 0; /* IE7 */
  line-height: normal;
  cursor: pointer;
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
  border-radius: 0;
  border: 0 \9; /* IE9 and down */

}
input[type="image"] {
  border: 0;
}

/* Reset the file input to browser defaults */
input[type="file"] {
  width: auto;
  padding: initial;
  line-height: initial;
  border: initial;
  background-color: #ffffff;
  background-color: initial;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

/* Help out input buttons */
input[type="button"],
input[type="reset"],
input[type="submit"] {
  width: auto;
  height: auto;
}

/* Set the height of select and file controls to match text inputs */
select,
input[type="file"] {
  height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
  *margin-top: 4px; /* For IE7, add top margin to align select with labels */
  line-height: 28px;
}

/* Reset line-height for IE */
input[type="file"] {
  line-height: 18px \9;
}

/* Chrome on Linux and Mobile Safari need background-color */
select {
  width: 220px; /* default input width + 10px of padding that doesn't get applied */
  background-color: #ffffff;
}

/* Make multiple select elements height not fixed */
select[multiple],
select[size] {
  height: auto;
}

/* Remove shadow from image inputs */
input[type="image"] {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

/* Make textarea height behave */
textarea {
  height: auto;
}

/* Hidden inputs */
input[type="hidden"] {
  display: none;
}

/*
CHECKBOXES & RADIOS
-------------------
*/

/* Indent the labels to position radios/checkboxes as hanging */
.radio,
.checkbox {
  padding-left: 18px;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
  float: left;
  margin-left: -18px;
}

/* Move the options list down to align with labels */
.controls > .radio:first-child,
.controls > .checkbox:first-child {
  padding-top: 5px;
}

/* Radios and checkboxes on same line */
.radio.inline,
.checkbox.inline {
  display: inline-block;
  padding-top: 5px;
  margin-bottom: 0;
  vertical-align: middle;
}
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
  margin-left: 10px;
}

/*
FOCUS STATE
-----------
*/
input,
textarea {
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
  transition: border linear 0.2s, box-shadow linear 0.2s;
}
input:focus,
textarea:focus {
  border-color: rgba(82, 168, 236, 0.8);
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  outline: 0;
  outline: thin dotted \9;
  /* IE6-9 */

}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none; /* override for file inputs */
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

/*
INPUT SIZES
-----------
*/

/* General classes for quick sizes */
.input-mini {
  width: 60px;
}
.input-small {
  width: 90px;
}
.input-medium {
  width: 150px;
}
.input-large {
  width: 210px;
}
.input-xlarge {
  width: 270px;
}
.input-xxlarge {
  width: 530px;
}

/* Grid style input sizes */
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
  float: none;
  margin-left: 0;
}

/*
GRID SIZING FOR INPUTS
----------------------
*/

input,
textarea,
.uneditable-input {
  margin-left: 0;
}
input.span12, textarea.span12, .uneditable-input.span12 {
  width: 930px;
}
input.span11, textarea.span11, .uneditable-input.span11 {
  width: 850px;
}
input.span10, textarea.span10, .uneditable-input.span10 {
  width: 770px;
}
input.span9, textarea.span9, .uneditable-input.span9 {
  width: 690px;
}
input.span8, textarea.span8, .uneditable-input.span8 {
  width: 610px;
}
input.span7, textarea.span7, .uneditable-input.span7 {
  width: 530px;
}
input.span6, textarea.span6, .uneditable-input.span6 {
  width: 450px;
}
input.span5, textarea.span5, .uneditable-input.span5 {
  width: 370px;
}
input.span4, textarea.span4, .uneditable-input.span4 {
  width: 290px;
}
input.span3, textarea.span3, .uneditable-input.span3 {
  width: 210px;
}
input.span2, textarea.span2, .uneditable-input.span2 {
  width: 130px;
}
input.span1, textarea.span1, .uneditable-input.span1 {
  width: 50px;
}

/*
DISABLED STATE
--------------
*/
/* Disabled and read-only inputs */
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
  background-color: #eeeeee;
  border-color: #ddd;
  cursor: not-allowed;
}

/*
FORM FIELD FEEDBACK STATES
--------------------------
*/

/* Warning */
.control-group.warning > label,
.control-group.warning .help-block,
.control-group.warning .help-inline {
  color: #c09853;
}
.control-group.warning input,
.control-group.warning select,
.control-group.warning textarea {
  color: #c09853;
  border-color: #c09853;
}
.control-group.warning input:focus,
.control-group.warning select:focus,
.control-group.warning textarea:focus {
  border-color: #a47e3c;
  -webkit-box-shadow: 0 0 6px #dbc59e;
  -moz-box-shadow: 0 0 6px #dbc59e;
  box-shadow: 0 0 6px #dbc59e;
}
.control-group.warning .input-prepend .add-on,
.control-group.warning .input-append .add-on {
  color: #c09853;
  background-color: #fcf8e3;
  border-color: #c09853;
}

/* Error */
.control-group.error > label,
.control-group.error .help-block,
.control-group.error .help-inline {
  color: #b94a48;
}
.control-group.error input,
.control-group.error select,
.control-group.error textarea {
  color: #b94a48;
  border-color: #b94a48;
}
.control-group.error input:focus,
.control-group.error select:focus,
.control-group.error textarea:focus {
  border-color: #953b39;
  -webkit-box-shadow: 0 0 6px #d59392;
  -moz-box-shadow: 0 0 6px #d59392;
  box-shadow: 0 0 6px #d59392;
}
.control-group.error .input-prepend .add-on,
.control-group.error .input-append .add-on {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #b94a48;
}

/* Success */
.control-group.success > label,
.control-group.success .help-block,
.control-group.success .help-inline {
  color: #468847;
}
.control-group.success input,
.control-group.success select,
.control-group.success textarea {
  color: #468847;
  border-color: #468847;
}
.control-group.success input:focus,
.control-group.success select:focus,
.control-group.success textarea:focus {
  border-color: #356635;
  -webkit-box-shadow: 0 0 6px #7aba7b;
  -moz-box-shadow: 0 0 6px #7aba7b;
  box-shadow: 0 0 6px #7aba7b;
}
.control-group.success .input-prepend .add-on,
.control-group.success .input-append .add-on {
  color: #468847;
  background-color: #dff0d8;
  border-color: #468847;
}

/*
HTML5 invalid states
Shares styles with the .control-group.error above
*/
input:focus:required:invalid,
textarea:focus:required:invalid,
select:focus:required:invalid {
  color: #b94a48;
  border-color: #ee5f5b;
}
input:focus:required:invalid:focus,
textarea:focus:required:invalid:focus,
select:focus:required:invalid:focus {
  border-color: #e9322d;
  -webkit-box-shadow: 0 0 6px #f8b9b7;
  -moz-box-shadow: 0 0 6px #f8b9b7;
  box-shadow: 0 0 6px #f8b9b7;
}

/*
FORM ACTIONS
------------
*/
.form-actions {
  padding: 17px 20px 18px;
  margin-top: 18px;
  margin-bottom: 18px;
  background-color: #eeeeee;
  border-top: 1px solid #ddd;
  *zoom: 1;
}
.form-actions:before,
.form-actions:after {
  display: table;
  content: "";
}
.form-actions:after {
  clear: both;
}

/* For text that needs to appear as an input but should not be an input */
.uneditable-input {
  display: block;
  background-color: #ffffff;
  border-color: #eee;
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
  cursor: not-allowed;
}

/* Placeholder text gets special styles; can't be bundled together though for some reason */
:-moz-placeholder {
  color: #999999;
}
::-webkit-input-placeholder {
  color: #999999;
}

/*
HELP TEXT
---------
*/

.help-block,
.help-inline {
  color: #555555; /* lighten the text some for contrast */
}
.help-block { /* account for any element using help-block */
  display: block; 
  margin-bottom: 9px;
}
.help-inline {
  display: inline-block;
  *display: inline; /* IE7 inline-block hack */
  *zoom: 1;
  vertical-align: middle;
  padding-left: 5px;
}

/*
INPUT GROUPS
------------
*/

/* Allow us to put symbols and text within the input field for a cleaner look */
.input-prepend,
.input-append {
  margin-bottom: 5px;
}
.input-prepend input,
.input-append input,
.input-prepend select,
.input-append select,
.input-prepend .uneditable-input,
.input-append .uneditable-input {
  *margin-left: 0;
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}
.input-prepend input:focus,
.input-append input:focus,
.input-prepend select:focus,
.input-append select:focus,
.input-prepend .uneditable-input:focus,
.input-append .uneditable-input:focus {
  position: relative;
  z-index: 2;
}
.input-prepend .uneditable-input,
.input-append .uneditable-input {
  border-left-color: #ccc;
}
.input-prepend .add-on,
.input-append .add-on {
  display: inline-block;
  width: auto;
  min-width: 16px;
  height: 18px;
  padding: 4px 5px;
  font-weight: normal;
  line-height: 18px;
  text-align: center;
  text-shadow: 0 1px 0 #ffffff;
  vertical-align: middle;
  background-color: #eeeeee;
  border: 1px solid #ccc;
}
.input-prepend .add-on,
.input-append .add-on,
.input-prepend .btn,
.input-append .btn {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}
.input-prepend .active,
.input-append .active {
  background-color: #a9dba9;
  border-color: #46a546;
}
.input-prepend .add-on,
.input-prepend .btn {
  margin-right: -1px;
}
.input-append input,
.input-append select .uneditable-input {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}
.input-append .uneditable-input {
  border-left-color: #eee;
  border-right-color: #ccc;
}
.input-append .add-on,
.input-append .btn {
  margin-left: -1px;
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}

/* Remove all border-radius for inputs with both prepend and append */
.input-prepend.input-append input,
.input-prepend.input-append select,
.input-prepend.input-append .uneditable-input {
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
  border-radius: 0;
}
.input-prepend.input-append .add-on:first-child,
.input-prepend.input-append .btn:first-child {
  margin-right: -1px;
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}
.input-prepend.input-append .add-on:last-child,
.input-prepend.input-append .btn:last-child {
  margin-left: -1px;
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}

/*
SEARCH FORM
-----------
*/

.search-query {
  padding-left: 14px;
  padding-right: 14px;
  margin-bottom: 0;
  -webkit-border-radius: 14px;
  -moz-border-radius: 14px;
  border-radius: 14px;
}

/*
HORIZONTAL & VERTICAL FORMS
---------------------------
*/

/*
Common properties
-----------------
*/
.form-search input,
.form-inline input,
.form-horizontal input,
.form-search textarea,
.form-inline textarea,
.form-horizontal textarea,
.form-search select,
.form-inline select,
.form-horizontal select,
.form-search .help-inline,
.form-inline .help-inline,
.form-horizontal .help-inline,
.form-search .uneditable-input,
.form-inline .uneditable-input,
.form-horizontal .uneditable-input,
.form-search .input-prepend,
.form-inline .input-prepend,
.form-horizontal .input-prepend,
.form-search .input-append,
.form-inline .input-append,
.form-horizontal .input-append {
  display: inline-block;
  margin-bottom: 0;
}

/* Re-hide hidden elements due to specifity */
.form-search .hide,
.form-inline .hide,
.form-horizontal .hide {
  display: none;
}
.form-search label,
.form-inline label {
  display: inline-block;
}

/* Remove margin for input-prepend/-append */
.form-search .input-append,
.form-inline .input-append,
.form-search .input-prepend,
.form-inline .input-prepend {
  margin-bottom: 0;
}

/* Inline checkbox/radio labels (remove padding on left) */
.form-search .radio,
.form-search .checkbox,
.form-inline .radio,
.form-inline .checkbox {
  padding-left: 0;
  margin-bottom: 0;
  vertical-align: middle;
}

/* Remove float and margin, set to inline-block */
.form-search .radio input[type="radio"],
.form-search .checkbox input[type="checkbox"],
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
  float: left;
  margin-left: 0;
  margin-right: 3px;
}

/* Margin to space out fieldsets */
.control-group {
  margin-bottom: 9px;
}

/* Legend collapses margin, so next element is responsible for spacing */
legend + .control-group {
  margin-top: 18px;
  -webkit-margin-top-collapse: separate;
}

/*
Horizontal-specific styles
--------------------------
*/

/* Increase spacing between groups */
.form-horizontal .control-group {
  margin-bottom: 18px;
  *zoom: 1;
}
.form-horizontal .control-group:before,
.form-horizontal .control-group:after {
  display: table;
  content: "";
}
.form-horizontal .control-group:after {
  clear: both;
}

/* Float the labels left */
.form-horizontal .control-label {
  float: left;
  width: 140px;
  padding-top: 5px;
  text-align: right;
}

/* Move over all input controls and content */
.form-horizontal .controls {
  margin-left: 160px;
  /* IE7 fix to ensure the inputs in .input-append and input-prepend don't inherit the margin of the parent, in this case .controls */
  *display: inline-block;
  *margin-left: 0;
  *padding-left: 20px;
}

/* Remove bottom margin on block level help text since that's accounted for on .control-group */
.form-horizontal .help-block {
  margin-top: 9px;
  margin-bottom: 0;
}

/* Move over buttons in .form-actions to align with .controls */
.form-horizontal .form-actions {
  padding-left: 160px;
}