/* 
 * Basic qForms styles
 * These are the styles I use for all of my qForms instances
 * If additional styles are needed, and they will be, create
 * an additional stylesheet to house those.
 * 
 * Bill Kummerow, August 2016
 * revised December 2017
 */

/* Basic miscellaneous styles */
p { line-height: 1.5; }
legend + p { margin-bottom: 20px; }

/* Pre and Post text styles */
h1 + p { margin-top: 25px; }
form + p { margin: 40px 0; text-align: center; }

/* Fieldset styles */
fieldset { margin: 3em 0 2em 0; clear: both;}
fieldset h3 { font-size: 18px; color: #333; font-style: italic; margin-left: 40px; }

/* Label styles */
label.required:before { content: ""; }
label.required::after { content: " *"; color: red; font-weight: bold; font-size: 1.2em; }
.checkbox label::after{ content: "" !important; }

/* Remove horizontal scrollbar and make height of textareas a bit larger */
textarea.form-control { height: 100px; overflow-x: hidden; }

/* Glyphicon styles (see readme.md for how I use them) */
.glyphicon { font-family: 'Glyphicons Halflings', sans-serif; padding-right: 15px; }
span.glyphicon.glyphicon-exclamation-sign { font-size: 2em; float: left; }
span.glyphicon.glyphicon-exclamation-sign + div { float: left; width: calc(100% - 95px); }
span.glyphicon.glyphicon-floppy-save, span.glyphicon.glyphicon-info-sign { font-size: 3em; float: left; }
span.glyphicon.glyphicon-floppy-save + div, span.glyphicon.glyphicon-info-sign + div { float: left; width: calc(100% - 65px);}

/* Error styles */
.warning, #warning { display: none; }
.warning.alert-danger { display: block; font-size: 2.5em; width: 75%; margin: 1em auto; }
.warning.alert-danger div p { font-size: .75em; margin-bottom: 0; }
.alert.alert-danger { overflow-y: auto; overflow-x: hidden; }
label.error { color: #a94442; display: block; font-weight: 500; font-style: italic; }
label.error::after{ content: "" !important; }

/* Error styles for Phone Number (US) */
div[class^="phone"] input[id$="linenum"]{ display: inline; width: 60px; }
div[class^="phone"] label[id$="linenum-error"]{ display: block !important; margin-left: 0; }

/* Move the error text for checkboxes below the label text
 * May have to play with it depending on length of error message
 * Should also check at various viewports.
 */
label[type="checkbox"] label.error { position: absolute;  width: 200px; }
@media (min-width: 1200px){
	label[type="checkbox"] label.error { margin: 2em 0 -2em -210px; }
}
@media (min-width: 768px) and (max-width: 1199px){
	label[type="checkbox"] label.error { margin: -1em 0 0 -1.4em; }
	fieldset h3 { margin-left: 0; }
}
@media (max-width: 767px){
	label[type="checkbox"] label.error { margin: -1.2em 0 0 -2.84em; }
	fieldset h3 { margin-left: 0; }
}

/* Admin Only styles */
.adminhighlight, .adminhighlight legend { color: #a0a0a0; }
#jumpToApproval { float: right; margin-top: -1em; display: inline; }

/* Phone Number (US) styles */
.phoneNumber label { display: none !important; }
.phoneNumber input:nth-child(1), .phoneNumber input:nth-child(2) { width: 50px; display: inline; }
.phoneNumber input[id$="linenum"] { display: inline; width: 60px; }
.phoneNumber label[id$="linenum-error"] { display: block !important; margin-left: 0; }

/* Styles for Session Timeout modal window */
.modal-footer { padding: 0; border-top: 0; display: none; }
.modal-body > p:first-child { display: none; }

/* Miscellaneous styles */
.shortfield { width: 185px; }
.midfield   { width: 305px; }
.input-group .shortfield.form-control { width: 152px !important; }
.prepend-char { float: left; padding: 8px 5px 8px 0; }

/* Additional responsive styles */
@media (max-width: 1200px) {
	fieldset h3 { margin-left: 0; }
	label { min-width: 100%; text-align: left !important; }
}
@media (max-width: 768px){
	.warning.alert-danger { width: 100%; }
}
@media (max-width: 440px){
	.warning.alert-danger { font-size: 1.75em; }
}
@media (min-width: 768px){
	label{ display: inline; }
}