.modal-footer > form {
    display: inline-block;
}


.is-hidden {
    display: none;
}

/* ---------- Labels ---------- */
label {
    display: inline-block; 
    font-size: 12px;
    font-weight: bold;
    padding-left: 2px;
    margin: 8px auto 2px;
}


.inline label, 
input[type="checkbox"], 
input[type="radio"] { 
    display: inline; 
    width: auto;
}

input[type="checkbox"] + label, 
input[type="radio"] + label { 
    display: inline; 
    margin-right: 10px; 
}

#sidebar label {
    font-weight: normal;
    margin: 0;
    padding: 0;
}


/* ---------- Inputs ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="password"] {
    display: block;
    border: 1px solid #acacac;
    box-shadow: inset 0 1px 2px rgba(0,0,0, 0.1);
}

input[type="radio"] {
    margin-left: 2px;
}

select {
    width: 100%;
}

select,
body .select2-container,
body .body .select2-container {
    display: block;
}

#sidebar .select2-container {
    width: 100% !important;
}

textarea {
    display: block;
    min-width: 75%;
    min-height: 80px;
}


/* Blue inputs on gray background - in grid search filters and some edit forms */
.panel input[type="text"],
.panel input[type="email"],
.panel input[type="url"],
.panel input[type="number"],
.panel input[type="date"],
form.filter input[type="text"],
form.filter input[type="email"],
form.filter input[type="url"],
form.filter input[type="number"],
form.filter input[type="date"] {
    padding: 0 3px 1px;
    height: 26px;
    line-height: 20px;
}

.panel input[type="text"],
.panel input[type="email"],
.panel input[type="url"],
.panel input[type="number"],
.panel input[type="date"],
.panel textarea,
form.filter input[type="text"],
form.filter input[type="email"],
form.filter input[type="url"],
form.filter input[type="number"],
form.filter input[type="date"],
form.filter textarea {
    border: 1px solid #003a9a;
    border-radius: 0;
    background: transparent;
}


/* belongs in form.css */
#sidebar input[type="text"],
#sidebar input[type="email"],
#sidebar input[type="url"],
#sidebar input[type="number"]
#sidebar input[type="date"],
#sidebar select,
#sidebar textarea,
input.large,
textarea.large,
.form-inline input {
    width: 100%;
}

input.halfLarge {
    width: 50%;
}

/* Make the select elements for date inputs line up */
.date-combo {
    overflow: hidden;
}

.date-combo select {
    float: left;
    margin-right: 8px;
    width: auto;
}


/* ---------- Required Fields ---------- */
label.required {
    color: #012fa7; 
    display: inline-block; /* This is so error messages show up next to the required label */
}

label.required:before { /* Show an asterisk before required field labels */
    content: "* ";
}

input[type="radio"] + label.required:before { /* But not radio button groups */
    content: "";
}

label.required + div > label { /* checkbox groups that are required */
    color: #012fa7;
}

input[required],
select[required],
textarea[required]{
    border: 1px solid #012fa7;
}


input[type="text"][required],
input[type="email"][required],
input[type="url"][required] {
    box-shadow: none;
}

input[type="text"][required]:hover,
input[type="email"][required]:hover,
input[type="url"][required]:hover {
    box-shadow: 0 0 2px 2px #d8dff2, inset 0 0 2px 2px #d8dff2;
}

textarea {
    border: 1px solid #c0c0c0;
}

/* ---------- Required Fields Error States ---------- */
.errors ul,
label.required + ul,
label.required + aside + ul {
    display: inline-block;
    list-style: none none;
    padding: 0;
    margin: 0 0 4px 12px;
}

.errors,
label.required + ul > li,
label.required + aside + ul > li {
    font-size: 14px;
    color: #e70008;
}


label.required + ul + input[required],
label.required + ul + input[required]:hover,
label.required + ul + select[required],
label.required + ul + select[required]:hover,
label.required + ul + textarea[required],
label.required + ul + p + textarea[required],
label.required + aside + ul + input[required],
label.required + aside + ul + input[required]:hover,
label.required + aside + ul + select[required],
label.required + aside + ul + select[required]:hover,
label.required + aside + ul + textarea[required],
label.required + aside + ul + p + textarea[required] {
    border-color: #e70008;
    box-shadow: 0 0 2px 2px #fbd9da, inset 0 0 2px 2px #fbd9da;
}


/* ---------- Styles for client-side Validation, which we decided not to use ---------- */
/* Required Fields that were missing - Mozilla applies these to fields that didn't validate on submit
input[type="text"][required]:-moz-ui-invalid {
    box-shadow: 0 0 2px 2px #fdd9d9, inset 0 0 2px 2px #fdd9d9;
    border: 1px solid red;
}

/* Potentially useful, but not exactly what we need. 
 * Applies at all times, not just after form submission
input[type="text"][required]:invalid {
    border: 1px solid #e70008;
}
*/


/* ---------- Form Layout Options -------- */
/* These are here to help with laying out forms. Surround inputs with a fieldset to 
 * make them easier to work with in a Bootstrap grid. */
fieldset label,
fieldset label.required {
    display: inline-block;
}

fieldset input {
    width: 100%;
}

fieldset input.small,
input.small,
.select2-container.small {
    width: 50% !important;
}

fieldset input[type="checkbox"] {
    width: auto;
    float: left;
    clear: left;
    margin: 6px 0 2px;
}

fieldset input[type="checkbox"] + label {
    float: left;
    margin: 4px 0; 
    font-weight: normal;
}

fieldset input[type="radio"] + label {
    font-weight: normal;
}


aside.note {
    color: #777;
    margin-top: 8px;
}

/* ---------- Form Tooltips ---------- */
aside.tooltip {
    display: inline-block;
    position: relative;
    margin: 0 4px;
    width: 12px;
    height: 11px;
    color: #777;
    background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAALCAYAAABLcGxfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkI2NjU5RDRBOERFRTExRTNCNTMxODhFRjA5NjhGNjZEIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkI2NjU5RDRCOERFRTExRTNCNTMxODhFRjA5NjhGNjZEIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QjY2NTlENDg4REVFMTFFM0I1MzE4OEVGMDk2OEY2NkQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QjY2NTlENDk4REVFMTFFM0I1MzE4OEVGMDk2OEY2NkQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4dZHP/AAAA90lEQVR42mL8//8/AwisXr1aGEgVAXEQEKsyQMBtIF4HxH2hoaFvQQKMIA1AxRZA9gYgFocq/AuSA2ImKP8lEAcANZ1gXLVqlRyQcxGIBYD4BhDHAvElqOJoIJ4FZb8HYgMQowaqGATEgFgSiKuAWAdo4lwgvQUqJwhSywIk/BkQQAiIN0FNOwsV+4Yk7w9y0n8GVPAKiEHO/AXEIUC8BIjZYJJMUAXI4BfQKT+BdD4Qr0JWDFIL0rARTYMMMNQOAek6BkywEaShBepmGNgHxPZQ5yADkJpmJqD1j4AML2hYg4A8EOsDsR2SYpCcF1DtY0ZSYxogwABTUEkF1EkoQwAAAABJRU5ErkJggg==) no-repeat scroll 0 0;
    opacity: 1;
}

/* the style above is for a png question mark icon. Alternative is the Bootstrap glyph icon:
.glyphicon glyphicon-question-sign
*/

aside.tooltip > span {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px 4px 8px 8px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 2px;
    color: #333;
    font-family: "Lato", sans-serif;
    line-height: 18px;
    min-width: 200px;
    box-shadow: 1px 1px 3px rgba(0,0,0, 0.25);
}

aside.tooltip:hover {
    z-index: 10;
}

aside.tooltip:hover > span {
    display: block;
}

/* ---------- Captcha ---------- */
.captcha {
    display: block;
}

.captcha img {
    margin-bottom: 8px;
}

/* ---------- Random Bits ---------- */
.form-group {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
}

.form-group .help-block {
    color: #3C763D;
}


.form-group > div:after,
.form-group > div > div:after {
    overflow: hidden;
}


.multi-addlink {
    display: block;
    padding-bottom: 2em;
}

#cv_toggle {
    cursor: pointer;
}

#cv_block {
    /* TODO: popup emprettification */
    min-width: 400px;
    min-height: 200px;
    position: absolute;
    left: 250px;
    top: 500px;
    padding: 15px;
}
