/*-----------------------------------+
 | Site: Unbalanced Juvenile Justice |
 | Part: Form styles                 |
 +-----------------------------------*/


/* Global
======================================================================*/
fieldset { border: 1px solid #ddd; margin-bottom: 2em; padding: 1em 1.5em; }
input, select, textarea { font-size: 1em; }
input:focus, select:focus, textarea:focus { outline: 2px solid #0192ff; outline-offset: -1px; outline-radius: 3px; }
legend { background: #fff; color: #b9121b; font-size: 20px; font-weight: bold; margin: 0 0 0 -0.5em; padding: 0.1em 0.75em 0.1em; }
legend em { color: #777; font-size: 0.7em; font-style: normal; font-weight: normal; margin-left: 0.3em; }
textarea { height: 5em; }

/* Specifics
======================================================================*/
/* Admin */
#admin #admin-editor { border-top: 1px solid #ddd; clear: both; display: none; margin: 10px auto 20px; overflow: hidden; padding-top: 10px; width: 980px; }
#admin .form { font-size: 14px; }

/* Autocomplete */
.ui-autocomplete-loading { background: white url(/content/images/shared/loading_16x16.gif) right center no-repeat; }

/* Character counters */
.charcount { color: #777; font-weight: normal; margin-right: 0.5em; }
.charcount .over { color: #f00; font-weight: bold; }

/* Checklists */
.checklist { border: 1px solid #ccc; max-height: 20em; line-height: 1.4;    margin: 0 0 1em 0; overflow: auto; }
.checklist input { margin-bottom: 1px; }
.checklist label { display: block; padding: 0.1em 0 0.1em 25px; height: 1%; text-indent: -25px; }
.checklist li { background: none; display: block; float: none; margin: 0; padding: 0; white-space: normal; width: 100%; }
.checklist li p { margin: 0; padding: 1em 0 0; }
.checklist li ul { margin: 0 0 0 2em; }
.checklist .mute { font-size: 1em; white-space: nowrap; }
.checklist p { font-weight: bold; margin-bottom: 0.25em; }
.checklist .selected { background: #ffa; }
.checklist ul { margin-bottom: 1em; }

/* Datepicker */
.ui-datepicker-trigger { background: none; border: 0; cursor: pointer; padding: 0; }

/* Fields */
.field { margin-bottom: 1em; position: relative; }
.field p { margin-bottom: 0.5em; }
.form { clear: both; height: 1%; }
.form > dd.field { float: right; margin: 0; width: 77%; }
.form > dt { clear: both; font-weight: normal; margin: 0; padding-top: 0.5em; }
.form > dt .label { float: left; text-align: right; width: 20%; }

    /* Multiple fields on a single line */
    .form .field-single-line { width: 68%; }
    .form .field-single-line p { float: left; margin: 0 1% 0 0; }
    .form .field-single-line .txt { width: 90%; }
    
        /* Location fields */
        .form .field-single-line .field-loc-city { width: 49%; }
        .form .field-single-line .field-loc-state { width: 14%; }
        .form .field-single-line .field-loc-state .txt { width: 68%; }
        .form .field-single-line .field-loc-postal { float: right; margin-right: 0; width: 33%; }
        
        /* Name fields */
            /* Full name */
            dl.form .fields-name-full .field-name-first { width: 42%; }
            dl.form .fields-name-full .field-name-last { margin-right: 0; width: 42%; }
            dl.form .fields-name-full .field-name-middle { margin-right: 4%; width: 10%; }
            
            /* Short name */
            dl.form .fields-name-short .field-name-first { width: 49%; }
            dl.form .fields-name-short .field-name-last { margin-right: 0; width: 50%; }
            
            /* With suffix */
            dl.form .fields-name-long .field-name-first { margin-right: 3%; width: 26%; }
            dl.form .fields-name-long .field-name-last { width: 42%; }
            dl.form .fields-name-long .field-name-middle { margin-right: 4%; width: 10%; }
            dl.form .fields-name-long .field-name-suffix { margin-right: 0; width: 13%; }
        
        /* Phone */
        dl.form .field-single-line .field-phone-number { width: 73%; }
        dl.form .field-single-line .field-phone-number .txt { width: 94%; }
        dl.form .field-single-line .field-phone-ext { width: 20%; }
        dl.form .field-single-line .field-phone-x { margin-right: 2%; padding-top: 0.5em; }
            
    /* Fields in modal dialog */
    .modal .form dd.field { width: 50%; }
    .modal .form dt .label { width: 47%; }
    
/* Google results */
.google-results a { margin-left: 0.25em; }
.google-results h2 { font-size: 1em; }
.google-results ul { list-style: none; margin: 0; }

/* Help text */
.field-help { color: #666; font-size: 0.8em; font-weight: normal; }
.field-help img { vertical-align: middle; }

/* Hints */
.ezpz-hint { color: #777; font-style: italic; }

label .counter { font-size: .9em; }

/* List builders (add/remove) */
.list-builder { list-style: none; margin-left: 0; }
.list-builder > li { border: 1px solid #ddd; border-radius: 4px; clear: both; height: 1%; margin: 0 0 0.5em; overflow: hidden; padding: 20px 40px 20px 20px; position: relative; }
.list-builder .remove-trigger { line-height: 1; position: absolute; right: 20px; top: 20px; }

/* Message */
#form-message { position:relative; text-align:center; }
#form-message-wrapper { left:0; position:fixed; top:0; width:100%; z-index: 99; }        

#form-message-content {
    background:#ffc;
    border:1px solid #ddd;
    border-top:0;
    border-radius:0 0 5px 5px;
    box-shadow:0 1px 5px rgba(0,0,0,0.3);
    display:inline-block;
    font-weight:bold;
    padding:0.5em 1em 0.6em;                
}

#form-message-content.error { background: #ffb6c1; border:1px solid #f00; color: #000; font-weight: bold; }

.confirm-message { position:relative; text-align:center; }
.confirm-message .confirm-message-wrapper { left:0; position:fixed; top:0; width:100%; z-index: 1001; }        
.confirm-message .confirm-message-content {
    background:#ffc;
    border:1px solid #ddd;
    border-top:0;
    border-radius:0 0 5px 5px;
    box-shadow:0 1px 5px rgba(0,0,0,0.3);
    display:inline-block;
    font-weight:bold;
    padding:0.5em 1em 0.6em;                
}

.confirm-message .error { background: #ffb6c1; border:1px solid #f00; color: #000; font-weight: bold; }

/* Notifications */
.flash .confirm, .flash .error, .flash .notice, .flash .warn { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); margin-bottom: 30px; }
.flash h2 { font-weight: bold; margin-bottom: 0.5em; }
.flash p { list-style: none; }
.flash .close { float: right; }

    /* AJAX notifications */
    #ajax-message { display: none; position: absolute; top: 0; width: 100%; }
    #ajax-text { background-color: #FFF1A8; font-size: 90%; font-weight: bold; margin: 0 auto !important; padding: 3px 0; position: relative; text-align: center; white-space: nowrap; width: 100px }
    
    /* Confirmation */
    .flash .confirm { background: #e8f8d1; padding: 30px; }
    .flash .confirm h2 { color: #516f26; }
    
    /* Errors */
    .flash .error, .validation-summary-errors { background: #ffc; padding: 30px; }
    .flash .error h2 { color: #d20000; }
    .field-with-errors, .field-validation-error { color: #f00; }
    .field-with-errors .txt, .field-with-errors .txt-med { border: 2px solid #f00; }
    .label .field-with-errors { display: inline; }
    
    /* Notices */
    .flash .notice { background: #e0f0ff; padding: 30px; }
    .flash .notice h2 { color: #274d70; }
    
    /* Warnings */
    .flash .warn { background: #fef5c6; padding: 30px; }
    .flash .warn h2 { color: #ac6b04; }

/* Options */
.options-h, .options-v { list-style: none; margin: 0; }
.options-h input, .options-v input { margin: 0 0.5em -0.05em 0; }
.options-h img { border-bottom: 3px solid #fff; padding: 5px; vertical-align: middle; }
.options-h li, .options-v li { background: none; margin-bottom: 0.3em; padding: 0; }
.options-h li { display: inline; margin-right: 0.7em; white-space: nowrap; }
.options-v li { padding-left: 22px; text-indent: -22px; }
.options-v ul { margin: 0.3em 0 1em; }

    /* Boxes */
    .save { color: #b9121b; }
    .form-option { border: 1px solid #ddd; border-radius: 5px; }
    .form-option-head { background: #f5f1eb; border-radius: 5px 5px 0 0; }
    .form-option-content, .form-option-head { padding: 0.5em; }

/* Placeholder */
.placeholder { color: #999; font-style: italic; }
input::-moz-placeholder, textarea::-moz-placeholder { color: #999; font-style: italic; }
input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #999; font-style: italic; }
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #999; font-style: italic; }

/* Questions */
.questions { list-style: decimal; }
.questions p { margin-bottom: 0.5em; }

    /* Answers */
    .answers { list-style: lower-alpha; }

/* Registration */
.register, .register input, .register select, .register textarea { font-size: 18px; }

/* Required text */
.req { color: #f00; }

/* Search */
#search { background: #fff; border: 1px solid #ccc; border-radius: 4px; clear: right; float: right; white-space: nowrap; width: 27.5%; }
#search label { display: none; }
#search * { vertical-align: middle; }
#search button { -webkit-appearance: none; background: none; border: 0; color: #505050; cursor: pointer; font-size: 16px; margin-right: -2em; padding: 0.5em 0; width: 3em; }
#search .txt { border: 0; box-shadow: none; margin: 0; padding: 0.3em; text-indent: 0.6em; width: 100%; }
#search-content { padding-right: 3em; }

    /* Glossary */
    #glossary-search { margin-bottom: 20px; }
    #glossary-search input { font-size: 24px; }

/* Selects (custom) */
.custom-select { display: inline-block; position: relative; }
.custom-select option { color: #000; }

.custom-select:after {
    bottom: 0;
    color: #206aa3;
    content: "▼";
    font-size: 60%;
    line-height: 43px;
    right: 4px;
    padding: 0 7px;
    pointer-events: none;
    position: absolute;
    top: 0;
}

.custom-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: none;
    color: #206aa3;
    display: inline-block;
    padding: 10px 20px 10px 10px;
}

/* Text boxes */
.txt, .txt-date, .txt-med, .txt-num {
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px #ddd;
    box-sizing: border-box;
    margin-right: 0.5em;
    padding: 0.3em;
    vertical-align: middle;
}

.txt { width: 100%; }
.txt-date { width: 7em; }
.txt-med { width: 47%; }
.txt-num { width: 4em; }
