html {
    min-height: 100%;
}

body {
    height: 100%;
}

fieldset {
    padding: 0.4em;
}

legend {
    margin-left: 1em;
    padding: 0 3px;
}

input {
    padding: 0;
    margin: 0;
}

.ams-grid-toolbar {
    padding: 2px;
}

.ams-dialog {
    position: absolute !important;
}

input.ams-datepicker {
    width: 7em;
}

.ams-form {
    display: table;
    margin: auto;
}

.ams-wide-form {
    width: 100%;
}

.ams-cols {
    display: table-row;
}

.ams-col {
    padding: 0.5em;
    display: table-cell;
}

.ams-twocol {
    display: inline-block !important;
    width: 49.5% !important;
    vertical-align: top;
}

.ams-threecol {
    display: inline-block !important;
    width: 33% !important;
    vertical-align: top;
}

.ams-largecol {
    display: inline-block !important;
    width: 66% !important;
    vertical-align: top;
}

.ams-fieldgroup {
    /*display: table-row-group;*/
    width: 100%;
}

.ams-field, .ams-inlined-field.ams-input-aligned {
    display: table-row;
}

.ams-ellipsis {
    display: inline-block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;    
}

.ams-inlined-field {
    display: inline-block;
}

.ams-field input, .ams-field select, .ams-field button, .ams-field .ams-input,
.ams-field label, .ams-field .ams-label {
    display: table-cell;
    padding: 1px 0px;
    margin: 2px 0px;
}

/* ams-field-spacing provides all the element spacing without any table layout rules. */
.ams-field-spacing input, .ams-field-spacing select, .ams-field-spacing button, .ams-field-spacing .ams-input,
.ams-field-spacing label, .ams-field-spacing .ams-label {
    padding: 1px 0px;
    margin: 2px 0px;
}

.ui-buttonset {
    padding: 1px 0px;
    margin: 2px 0px;
}

.ui-button-text {
    -webkit-user-select: none;
}

.ams-field label, .ams-field .ams-label,
.ams-field-spacing label, .ams-field-spacing .ams-label, {
    /* IMPORTANT.  This style has a trailing comma which appears to be breaking the selectors. 
    This comma was removed but then changed the alignment of all labels, and the extra padding
    was causing some screens to look a little odd (e.g. the change of owner).  
    If we remove the comma, will need to test the whole app to make sure nothing breaks. */
    text-align: right;
    padding-right: 0.25em;
}

.ams-field button {
    float: right;
}

.ams-inlined-field label, .ams-inlined-field input, .ams-inlined-field select, 
.ams-inlined-field .ams-label, .ams-inlined-field .ams-input {
    display: inline;
}

.ams-inlined-field label, .ams-inlined-field .ams-label {
    padding: 0 0.25em 0 0.25em;
}

.ams-inlined-field.ams-input-aligned>label:first-of-type {
    display: table-cell;
    text-align: right;
}
.ams-input-aligned>span.ams-input-aligned {
    display: table-cell;
}

.ams-mandatory-field:after {
    content: '*';
    color: #BA4B49; /* This is the lightest shade of red in the dialog titlebar */ 
}

.ams-date-field {
    width: 100px !important;
}

.ams-date-time-field {
    width: 110px !important;
}

.ams-table {
    display: table;
}

.ams-row {
    display: table-row;
}

.ams-cell {
    display: table-cell;
}

.ams-float-left {
    float: left !important;
}

.ams-float-right {
    float: right !important;
}

.ams-clear-float {
    float: none;
    clear: both;
}

.ams-block {
    display: block !important;
}

.ams-flex {
    display: flex !important;
}

.ams-inline-flex {
    display: inline-flex !important;
}

.ams-inline {
    display: inline !important;
}

.ams-inline-block {
    display: inline-block !important;
}

.ams-align-top {
    vertical-align: top !important;
}

.ams-overflow-auto {
    overflow: auto !important;
}

.ams-align-middle {
    vertical-align: middle !important;
}

.ams-align-bottom {
    vertical-align: bottom !important;
}

.ams-margin-centered {
    margin-right: auto;
    margin-left: auto;
    display: inline-block;
}

.ams-margin-left-med {
    margin-left: 20px;
}

.ams-editable {
    cursor: text;
}

.ams-disabled {
    color: #97A0AF;
    font-style: italic;
}

.ams-editable.ams-editing {
    padding: 0 !important;
}

.ams-editable.ams-editing input {
    height: 100%;
    width: 95%;
}

.ams-window-buttons {
    margin-top: 0.5em;
    padding-top: 0.5em;
    clear: both;
}

.ams-window-buttons-inner {
    display: inline-block;
    float: right;
}

.hasDatepicker, .ams-med-input {
    width: 7em;
}

.slick-viewport {
    overflow-x: hidden !important;
}

.slick-headerrow-column {
    text-overflow: clip;
    box-sizing: border-box;
}

.slick-headerrow-column input {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.ams-errortext {
    color: #990000;
}

.ams-successtext {
    color: #32CD32;
}

.ams-footer{
    text-align: center;
    margin-top: 10px;    
}

button.ams-link, button.ams-link:focus, button.ams-link:active {
    /* Remove all decorations to look like normal text */
    background: none;
    border: none;
    display: inline;
    font: inherit;
    outline: none;
    outline-offset: 0;
    /* Additional styles to look like a link */
    color: blue;
    cursor: pointer;
    text-decoration: underline;
}

/* Validation message styling */
.ams-invalid-input,
.ams-entity-picker.ams-invalid-input > input {
    background-color: #fcdfdf;
}
.ams-entity-picker.ams-invalid-input {
    background-color: unset;
}

button.ams-invalid-input.ui-state-default:not(.ui-state-hover) {
    background-color: #fcdfdf;
    background-image: none;
}

.ams-invalid-input-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
}

span.ams-invalid-input-icon {
    background-color: inherit;
    background-image: none;
    vertical-align: middle;
    border: none;
}

span.ams-invalid-input-icon .ui-icon {
    background-image: url(images/ui-icons_2c6a46_256x240.png);
}

/* Special cases for buttonsets: */
/* Do not highlight the buttonset container div */
.ui-buttonset.ams-invalid-input {
    background-color: inherit;
}

/* Highlight the buttonset labels if the selection is invalid */
.ui-buttonset.ams-invalid-input>label.ui-button {
    background: #fcdfdf;
}

/* Pad the margin of the buttonset's error icon, otherwise it hits the buttonset */
.ui-buttonset .ams-validation-error {
    margin-left: 7px;
}

/* tool tips */
.ams-tooltip-target {
}

.ams-tooltip-target .ams-tooltip {
  display: none;
  position: absolute;
  z-index: 1000000;
  padding: 0.1em;
  margin-top: 0.2em;
}

.ams-tooltip-target:hover .ams-tooltip,
.ams-invalid-input:hover+.ams-validation-error.ams-tooltip-target .ams-tooltip {
  display: block;
}


.ui-accordion .ui-accordion-content{ overflow:hidden !important; }

.ui-dialog .ui-dialog-content{ overflow:hidden !important; }

.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }


.ui-pnotify.stack-bottomright {
    /* These are just CSS default values to reset the pnotify CSS. */
    right: auto;
    top: auto;
} 


.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
    opacity: .55 !important;
    filter:Alpha(Opacity=55) !important;
}
.ui-state-disabled .ui-icon {
    filter:Alpha(Opacity=55) !important; /* For IE8 - See #6059 */
}
.ams-entity-picker {
    display: inline-flex;
    flex-wrap: nowrap;
}
.ams-entity-picker input{
    height: 18px;
    width: 120px;           /*set a default width on the the input boxes. Can be overriden by css in each view.*/
    padding-right: 30px;    /*add some padding, so the button doesn't overlap the text*/
}
.ams-entity-picker button{
    background: none!important;
    outline: none;
    border: none!important;
    margin: 0px 2px 0px -20px;    
    float: none;
}
.ams-entity-picker button.ui-button-icon-only{
    width: 15px;
}
.ams-entity-picker button.entity-view-button{
    margin-left: -30px;
    margin-right: 16px;
}
.ams-entity-picker.ams-invalid-input input{
    background-color: #fcdfdf;
}

.ams-dynamically-loaded-tab{
    /*Set a min height, so the loading progress bar is not right against the tab */
    min-height: 50px;   
}

.ui-icon.ams-help{
    display: inline-block;
    cursor: help;
}

.ams-checkbox,
.ams-radio {
    display: flex;
}

.ams-inline-radio {
    display: inline-flex;
}

.ams-checkbox,
.ams-radio,
.ams-inline-radio {
    align-items: center;
    justify-content: flex-start;
}

.ams-checkbox+.ams-checkbox,
.ams-radio+.ams-radio {
    margin-top: 4px;
}

.ams-inline-radio+.ams-inline-radio {
    margin-left: 4px;
}

.ams-checkbox input[type=checkbox] {
    margin-top: 1px;
}

.ams-checkbox label,
.ams-radio label,
.ams-inline-radio label {
    margin: 0;
    padding: 0 3px;
}

.ams-hidden-tab {
    display: none;
}

.ui-tabs-nav > .ams-highlight-tab.ui-state-default {
    background: #40ba73;
}

.ui-tabs-nav > .ams-highlight-tab.ui-state-default:hover {
    background: #4ac47a;
}

.ui-tabs-nav > .ams-highlight-tab.ui-state-default a {
    color: #1E472F;
}