/*****************/
/* Core          */
.btn, .form-control, .debug-control, span.form-note {
    display: inline-block;
    padding: .25rem .5rem;
    margin-bottom: .25rem;
	line-height: 1.43;	
	border-radius: .25rem;
	vertical-align: middle;
	box-sizing: border-box;
}

.btn {
    font-weight: 400;
    line-height: 1.43;
    text-align: center;
    white-space: nowrap;

    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
}
.form-control
{
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
	font-family: Calibri,sans-serif;
}

.form-control:focus {
	border-color: #66afe9;
	outline: 0;
	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.debug-control
{
	border: 1px dashed #ccc;
	background-color: #ddd;
	color:#999;
}


span.form-note
{
	background: #DDD;
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
	border: 1px solid #ccc;
	border-right-width:0;
}

span.form-note + input.form-control, span.form-note + select.form-control {

	border-top-left-radius:  0 !important;
	border-bottom-left-radius:  0 !important;
}

input.form-control.field-history {
	border-top-right-radius:  0 !important;
	border-bottom-right-radius:  0 !important;
}

input.form-control + .fa-undo {
	border-top-left-radius:  0 !important;
	border-bottom-left-radius:  0 !important;
	line-height: 1.4 ;
}


input.p90 { min-width: 90%; }
input.p70 { min-width: 70%; }
input.p60 { min-width: 60%; }
input.p50 { min-width: 50%; }
input.p40 { min-width: 40%; }
input.c15 { width: 15ch; }
input.c10 { width: 10ch; }
input.p35 { min-width: 35%; width: 35%; }
input.p30 { min-width: 30%; width: 30%; }
input.p20 { min-width: 20%; width: 20%; }
input.p15 { min-width: 15%; width: 15%; }
input.p10 { min-width: 10%; width: 10%; }


.form-control[maxlength="2"] { width: calc(1rem + 2ch + 4px); }
.form-control[maxlength="4"] { width: calc(1rem + 4ch + 4px); }

.searchable { border-left: 2px goldenrod solid !important;}

.readonly { background-color: #F0F0FF !important; }

.editable {  }

.form-control[required] { 
	border-left: 2px maroon solid !important;
}


/*****************/
/* Input Tweaks  */ 


select option:disabled {
	text-decoration: line-through;
}

select.form-control option:disabled {
	text-decoration: line-through;
	background-color: #DDD;
	color: #999;
}

select:disabled {
	text-decoration: line-through;
}

select.form-control, input[type="number"].form-control
{
	border-top-right-radius:  0;
	border-bottom-right-radius:  0;
	padding-right: 0;
}

select[multiple], select.itemchoose  {
	min-height: 2em;
	min-width: 8em;
}

input[type="datetime"].form-control
{
	border-top-right-radius:  0;
	border-bottom-right-radius:  0;
	padding-right: 0;
	width: 16ch;
}

/*****************/
/* Date Range    */ 
.form-daterange {
	display: inline-flex;
}
.form-daterange .form-note:not(:first-child) {
	border-radius: 0;
	border-left: 0;
}

/*****************/
/* Date Range    */ 
.form-reference {
	display: inline-flex;
}
.form-reference .btn {
	border-top-left-radius:  0 ;
	border-bottom-left-radius:  0;
	border-left: 0;
	margin-left: 0;
}
.form-reference .btn:not(:last-child):not(:first-child) {
	border-radius:  0 ;
	border-right: 0;
	margin-right: 0;
}

.form-reference .form-control {
	border-top-right-radius:  0 ;
	border-bottom-right-radius:  0;
}
.form-reference .form-control.readonly {
	border-radius: 0;
	width: 3ch;
	padding-left: 0;
	padding-right: 0;
}

/*****************/
/* Buttons       */ 
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
}
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
	color: #fff;
}

.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
	box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
	box-shadow: none;

}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
	text-shadow: none;
}
.btn:active,
.btn.active {
	background-image: none;
}
.btn[disabled] {
	background-image: none;
}
.btn-default {
	background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
	background-repeat: repeat-x;
	border-color: #dbdbdb;
	text-shadow: 0 1px 0 #fff;
	border-color: #ccc;
}

.btn-default:hover,
.btn-default:focus {
	background-color: #e0e0e0;
	background-position: 0 -15px;
}

.btn-default:active,
.btn-default.active {
	background-color: #e0e0e0;
	border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active, .btn-default:disabled,
.btn-primary:disabled,
.btn-success:disabled,
.btn-info:disabled,
.btn-warning:disabled,
.btn-danger:disabled,
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active,
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
	background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);	background-repeat: repeat-x;
	border-color: #dbdbdb;
	text-shadow: 0 1px 0 #fff;
	border-color: #ccc;
	color: #ccc;
}
.btn-primary {
	background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);	background-repeat: repeat-x;
	border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
	background-color: #265a88;
	background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
	background-color: #265a88;
	border-color: #245580;
}

.btn-success {
	background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);	background-repeat: repeat-x;
	border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
	background-color: #419641;
	background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
	background-color: #419641;
	border-color: #3e8f3e;
}

.btn-info {
	background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);	background-repeat: repeat-x;
	border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
	background-color: #2aabd2;
	background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
	background-color: #2aabd2;
	border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
	background-color: #2aabd2;
	background-image: none;
}
.btn-warning {
	background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);	background-repeat: repeat-x;
	border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
	background-color: #eb9316;
	background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
	background-color: #eb9316;
	border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
	background-color: #eb9316;
	background-image: none;
}
.btn-danger {
	background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);	background-repeat: repeat-x;
	border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
	background-color: #c12e2a;
	background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
	background-color: #c12e2a;
	border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
	background-color: #c12e2a;
	background-image: none;
}

/*****************/
/* Toggle Button */

.btn-toggle {
	position: absolute;
	margin-left: -9999px;
	visibility: hidden;
}

.btn-toggle + span {
	display: inline-block;
	position: relative;
	cursor: pointer;
	outline: none;
	user-select: none;
}
input.btn-toggle + span {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0.625em;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    color: #555;
    line-height: 1.43;
    margin: .25em .125em;
	padding: .5em 0.875rem;
    transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
    vertical-align: middle;
	height: 0.25em;
	width: 0.5em;
}
input.btn-toggle + span:before, input.btn-toggle + span:after {
	display: block;
	position: absolute;
	top: 1px;
	left: 1px;
	bottom: 1px;
	content: "";
}
input.btn-toggle + span:before {
	right: 1px;
	background-color: #f1f1f1;
	border-radius: 0.5em;
	transition: background 0.4s;
}
input.btn-toggle + span:after {
	width: 50%;
	background-color: #fff;
	border-radius: 100%;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
	transition: margin 0.4s;
}
input.btn-toggle:checked + span:before {
	background-color: #8ce196;
}
input.btn-toggle:checked + span:after {
	margin-left: 50%;
}

/*****************/
/* Button Bar    */ 
.button-bar .btn:first-child, .small-button-bar .btn:first-child  {  margin-left: 0; }
.button-bar .btn { margin: 0 .25rem; }
.button-bar .btn:last-child, .small-button-bar .btn:last-child  { margin-right: 0;}

.small-button-bar .btn { margin: 0 .25rem; padding: .1em; line-height: 1; font-size: 0.8rem; }


.secondary.btn { margin-left: .25rem; }




/*****************/
/* Field         */ 

fieldset {
    border: 1px solid #ccc;
    border-radius: .4em;
	padding: .2em;	
	margin-bottom: .2em
}


.external-form label  {
	width: 7.5em;
	text-align: left;
	display: inline-block;
	vertical-align: top;
    margin-bottom: .5em;
	margin-right: .25rem;
    font-weight: 700;
}


.external-form .note{
	margin-left: 6.7em;
}

.external-form label.block {
	max-width: 100%;
	text-align: left;
	width: auto;
}
.external-form input ~ label {
	font-weight: normal;
}
.external-form label ~ input {


}

.external-form label + input.p100 { min-width: calc(100% - 7.75em); }
.external-form label + input.p90 { min-width: calc(90% - 7.75em); }
.external-form label + input.p70 { min-width: calc(70% - 7.75em); }
.external-form label + input.p60 { min-width: calc(60% - 7.75em); }
.external-form label + input.p50 { min-width: calc(50% - 7.75em); }
.external-form label + input.p40 { min-width: calc(40% - 7.75em); }
.external-form label + input.p30 { min-width: calc(30% - 7.75em); }
.external-form label + input.p20 { min-width: calc(20% - 7.75em); }
.external-form label + input.p10 { min-width: calc(10% - 7.75em); }

.external-form label + textarea { min-width: calc(100% - 7.75em); }
.external-form label.block + textarea { min-width: calc(100%); }




.inline-form {
	display: inline-flex;
	flex-wrap: wrap;
}
.inline-form.block {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.inline-form legend {
	margin-bottom: 0;
}

div.inline-form > div, fieldset.inline-form > div {
	display: block;
	margin: 0 .3em;
}
.inline-form label {
	display: block;
	min-width: 0;
	text-align: left;
	font-weight: bold;
}


.dialog-form {
}

.dialog-form label:first-child  {
	width: 7.5em;
	text-align: left;
	display: inline-block;
	vertical-align: top;
    margin-bottom: .5em;
	margin-right: .25rem;
    font-weight: 700;
}


.dialog-form .note{
	margin-left: 6.7em;
}

.dialog-form label.block {
	max-width: 100%;
	text-align: left;
	width: auto;
}
.dialog-form input ~ label {
	font-weight: normal;
}

.dialog-form-col5, .dialog-form-col4, .dialog-form-col3, .dialog-form-col2 {
	box-sizing: border-box;
	-moz-column-gap: 1em;
}
.dialog-form-col5 { -moz-column-count: 5; -webkit-column-count: 5 }
.dialog-form-col4 { -moz-column-count: 4; -webkit-column-count: 4 }
.dialog-form-col3 { -moz-column-count: 3; -webkit-column-count: 3 }
.dialog-form-col2 { -moz-column-count: 2; -webkit-column-count: 2 }