﻿body {
    padding-top: 50px;
    padding-bottom: 20px;
}


/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

.spacer-x2 {
    margin-top: 60px;
}
.spacer {
    margin-top: 30px;
}

span.required {
    color: #d9534f;
}

label.required:after {
    content: '\00a0✱';
    color: #d9534f;
}

.max-w-100 { max-width: 100%; }

.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: -ms-flexbox !important; display: flex !important; }
.d-inline-flex { display: -ms-inline-flexbox !important; display: inline-flex !important; }
.justify-between { justify-content: space-between; }

.ml-auto, .mx-auto { margin-left: auto !important; }
.mr-auto, .mx-auto { margin-right: auto !important; }
.h-100{ height: 100%; }
.w-fit { width: fit-content; }
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }

.w-75 { width: 75% !important; }

.w-100 { width: 100% !important; }

.p-1 { padding: .25rem !important; }
.p-2 { padding: .5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.p-6 { padding: 4rem !important; }

.pl-0, .px-0 { padding-left: 0 !important; }
.pl-1, .px-1 { padding-left: .25rem !important; }
.pl-2, .px-2 { padding-left: .5rem !important; }
.pl-3, .px-3 { padding-left: 1rem !important; }
.pl-4, .px-4 { padding-left: 1.5rem !important; }
.pl-5, .px-5 { padding-left: 3rem !important; }
.pl-6, .px-6 { padding-left: 4rem !important; }

.pr-0, .px-0 { padding-right: 0 !important; }
.pr-1, .px-1 { padding-right: .25rem !important; }
.pr-2, .px-2 { padding-right: .5rem !important; }
.pr-3, .px-3 { padding-right: 1rem !important; }
.pr-4, .px-4 { padding-right: 1.5rem !important; }
.pr-5, .px-5 { padding-right: 3rem !important; }
.pr-6, .px-6 { padding-right: 4rem !important; }

.pt-0, .py-0 { padding-top: 0 !important; }
.pt-1, .py-1 { padding-top: .25rem !important; }
.pt-2, .py-2 { padding-top: .5rem !important; }
.pt-3, .py-3 { padding-top: 1rem !important; }
.pt-4, .py-4 { padding-top: 1.5rem !important; }
.pt-5, .py-5 { padding-top: 3rem !important; }
.pt-6, .py-6 { padding-top: 4rem !important; }

.pb-0, .py-0 { padding-bottom: 0 !important; }
.pb-1, .py-1 { padding-bottom: .25rem !important; }
.pb-2, .py-2 { padding-bottom: .5rem !important; }
.pb-3, .py-3 { padding-bottom: 1rem !important; }
.pb-4, .py-4 { padding-bottom: 1.5rem !important; }
.pb-5, .py-5 { padding-bottom: 3rem !important; }
.pb-6, .py-6 { padding-bottom: 4rem !important; }

.mr-0, .mx-1 { margin-right: 0 !important; }
.mr-1, .mx-1 { margin-right: .25rem !important; }
.mr-2, .mx-2 { margin-right: .5rem !important; }
.mr-3, .mx-3 { margin-right: 1rem !important; }
.mr-4, .mx-4 { margin-right: 1.5rem !important; }
.mr-5, .mx-5 { margin-right: 3rem !important; }
.mr-6, .mx-6 { margin-right: 4rem !important; }
.ml-0, .mx-1 { margin-left: 0 !important; }
.ml-1, .mx-1 { margin-left: .25rem !important; }
.ml-2, .mx-2 { margin-left: .5rem !important; }
.ml-3, .mx-3 { margin-left: 1rem !important; }
.ml-4, .mx-4 { margin-left: 1.5rem !important; }
.ml-5, .mx-5 { margin-left: 3rem !important; }
.ml-6, .mx-6 { margin-left: 4rem !important; }

.mb-0, .my-0 { margin-bottom: 0 !important; }
.mb-1, .my-1 { margin-bottom: .25rem !important; }
.mb-2, .my-2 { margin-bottom: .5rem !important; }
.mb-3, .my-3 { margin-bottom: 1rem !important; }
.mb-4, .my-4 { margin-bottom: 1.5rem !important; }
.mb-5, .my-5 { margin-bottom: 3rem !important; }
.mb-6, .my-6 { margin-bottom: 4rem !important; }

.mt-0, .my-0 { margin-top: 0 !important; }
.mt-1, .my-1 { margin-top: .25rem !important; }
.mt-2, .my-2 { margin-top: .5rem !important; }
.mt-3, .my-3 { margin-top: 1rem !important; }
.mt-4, .my-4 { margin-top: 1.5rem !important; }
.mt-5, .my-5 { margin-top: 3rem !important; }
.mt-6, .my-6 { margin-top: 4rem !important; }

/* Spinner from https://codepen.io/Mestika/pen/XmvVmx */
.spinner {
    display: inline-block;
    opacity: 0;
    max-width: 0;
    -webkit-transition: opacity 0.25s, max-width 0.45s;
    -moz-transition: opacity 0.25s, max-width 0.45s;
    -o-transition: opacity 0.25s, max-width 0.45s;
    transition: opacity 0.25s, max-width 0.45s;
    /* Duration fixed since we animate additional hidden width */
}

.has-spinner.active {
    cursor: progress;
}

    .has-spinner.active .spinner {
        opacity: 1;
        max-width: 50px;
        margin-right: 1rem;
        /* More than it will ever come, notice that this affects on animation duration */
    }

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

    select.readonly, input.readonly {
        pointer-events: none;
        background-color: #f0f0f0;
        cursor: not-allowed;
    }

.month-datepicker {
    width: 110px !important;
}

.popover-detail, .popover-detail-large {
    cursor: pointer;
    border-bottom: 1px dashed #adadad;
    text-decoration: none;
}
    .popover-detail:hover, .popover-detail-large:hover {
        cursor: pointer;
        text-decoration: none;
    }

.popover-lg {
    max-width: 100% !important;
    width: 400px;
}
.popover table {
    border-collapse: collapse !important;
    font-size: 0.9em !important;
    width: 100%;
}

.popover table .text-muted {
    color: #777 !important;
}

.popover table > thead > tr > th,
.popover table > tbody > tr > th,
.popover table > tfoot > tr > th,
.popover table > thead > tr > td,
.popover table > tbody > tr > td,
.popover table > tfoot > tr > td {
    padding: 4px;
    line-height: 0.9em;
    vertical-align: top;
}
.popover table > thead > tr > th {
    vertical-align: bottom;
}

.select2-selection.form-control.text-muted,
.select2-selection.form-control.text-muted .select2-selection__rendered {
    color: #777;
}

.select2-selection.form-control.input-sm,
.select2-selection.form-control.input-sm .select2-selection__rendered {
    height: 26px !important;
    line-height: 26px !important;
}

    .select2-selection.form-control.input-sm .select2-selection__arrow {
        height: 24px !important;
    }

.select2-selection.form-control,
.select2-selection.form-control .select2-selection__rendered {
    height: 34px !important;
    line-height: 34px !important;
}

    .select2-selection.form-control .select2-selection__arrow {
        height: 32px !important;
    }

.select2-selection.form-control {
    padding: 0 !important;
    border-radius: 4px !important;
    border: 1px solid #ccc !important;
}

    .select2-selection.form-control.input-validation-error {
        border: 1px solid #ff0000 !important;
    }

.filter-bar {
    background: #efefef;
    padding: 10px 10px 10px 10px;
    border-bottom: 1px solid #bbb;
    border-top: 1px solid #bbb;
    margin-bottom: 10px;
}

    .filter-bar label {
        font-weight: normal;
    }

    .filter-bar .form-group {
        margin-left: 10px;
    }

        .filter-bar .form-group:first-child {
            margin-left: 0;
        }

.table-bordered > thead > tr > th, .table-bordered > thead > tr > td {
    border-bottom-width: 1px;
}

.table-report {
    font-size: 12px;
}

    .table-report .table-report-summary {
        font-weight: bold;
    }

    .table-report .table-report-totals {
        font-weight: bold;
    }

        .table-report .table-report-totals tr {
            border-top: 1px solid #333;
        }

tbody > tr.table-report-totals > td {
    background-color: #f5f5f5;
}

table.allocation-row {
    margin-bottom: 0;
}

    table.allocation-row tr td {
        vertical-align: middle;
    }
    table.allocation-row tr td.row-action {
        padding: 4px;
    }
    table.allocation-row tr:first-child td {
        border-top: none;
        padding-top: 0px;
    }
.action-search-popup {
    cursor: pointer;
}

.userModal span.readonly {
    display: inline-block;
    margin-top: 7px;
}

.dialog-lg .modal-dialog {
    width: 700px;
}

.d-flex{
    display: flex;
}

.ml-auto{
    margin-left: auto;
}

/****** VALIDATION HELPERS*****/
.field-validation-error {
    color: #ff0000;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    border: 1px solid #ff0000 !important;
}

.validation-summary-errors {
    font-weight: bold;
    color: #ff0000;
}

.validation-summary-valid {
    display: none;
}

.field-validation-error {
    color: #e74c3c;
}

.input-validation-error:focus {
    border: 1px solid #e74c3c !important;
}
/****** VALIDATION HELPERS END*****/


/******* ORDER LISTING VIEW ******/
/* NB these are copied in OpenOrdersPdf.cshtml */
.bg-purple {
    background-color: #d2bef0;
    background-color: rgba(210, 190, 240, 1);
}

.bg-purple-translucent {
    background-color: rgba(210, 190, 240, 0.5);
}

.bg-pink {
    background-color: #f0c8c8;
    background-color: rgba(240, 200, 200, 1);
}

.bg-pink-translucent {
    background-color: rgba(240, 200, 200, 0.5);
}

.bg-blue {
    background-color: #337ab7;
    background-color: rgba(51, 122, 183, 1);
}

.bg-blue-translucent {
    background-color: rgba(51, 122, 183, 0.2);
}

.bg-cyan {
    background-color: #32beb4;
    background-color: rgba(50, 190, 180, 1);
}

.bg-cyan-translucent {
    background-color: rgba(50, 190, 180, 0.2);
}

.bg-yellow {
    background-color: #e6f08c;
    background-color: rgba(230, 240, 140, 1);
}

.bg-yellow-translucent {
    background-color: rgba(230, 240, 140, 0.5);
}

.bg-green {
    background-color: #aaf08c;
    background-color: rgba(170, 240, 140, 1);
}

.bg-green-translucent {
    background-color: rgba(170, 240, 140, 0.5);
}

.bg-default {
    background-color: #f5f5f5;
}

.bg-red {
    background-color: #ff4444;
    background-color: rgba(255, 68, 68, 1);
}

.bg-red-translucent {
    background-color: rgba(255, 68, 68, 0.4);
}

.bg-grey {
    background-color: #A2A2A2;
    background-color: rgba(85, 85, 85, 1);
}

.bg-grey-translucent {
    background-color: rgba(85, 85, 85, 0.2);
}

/********/

.email td {
    width: 140px;
    padding: 3px;
}

    .email td.long {
        width: 70%;
    }

    .email td.align-right {
        text-align: right
    }

.small-input {
    width: 50px;
}
.medium-input {
    width: 80px;
}
.small-idropdown {
    width: 100px;
}

.align-top {
    vertical-align: top !important;
}

.quote-table {
    font-size: smaller;
}

.push {
    margin-top: 20px;
}

.push-x2 {
    margin-top: 40px;
}

.fa-spin-custom, .glyphicon-spin {
    -webkit-animation: spin 1000ms infinite linear;
    animation: spin 1000ms infinite linear;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

.grey {
    color: lightslategray;
}


.table-greyHeader > thead > tr {
    background-color: #f2f2f2;
}

.table-bordered-thick {
    border: 2px solid #ddd;
}

/* extra-wide layout for wide grids/pages */
@media (min-width: 1500px) {
    .container {
        width: 1460px;
    }
}

@media (min-width: 1800px) {
    .container {
        width: 1740px;
    }
}


/* Custom Modal (background) */
/* https://www.w3schools.com/howto/howto_css_modals.asp  */
.custom-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 99999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    align-items: center; /* Center on screen */
}

/* Modal Content */
.custom-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    min-height: 200px;
}

    .custom-modal-content.lg {
        width: 964px;
    }

    .custom-modal-content.medium {
        width: 640px;
    }

    .custom-modal-content.small {
        width: 320px;
    }

    .custom-modal-content.fit {
        width: fit-content;
    }

.custom-modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    min-height: 16.428571429px;
}

    .custom-modal-header .custom-modal-title {
        margin: 0;
        line-height: 1.428571429;
    }

    .custom-modal-header .custom-close {
        margin-top: -2px;
    }

.custom-close {
    -webkit-appearance: none;
    padding: 0;
    cursor: pointer;
    background: 0 0;
    border: 0;
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    filter: alpha(opacity=20);
    opacity: .2;
}

.custom-modal-body {
    padding: 16px 16px;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
}

.custom-modal-footer {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    min-height: 16.428571429px;
}


/* Bootstrap 4.6.2 helpers */
.text-white { color: white; }
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: -ms-flexbox !important; display: flex !important; }
.d-inline-flex { display: -ms-inline-flexbox !important; display: inline-flex !important; }
.justify-between { justify-content: space-between; }

.ml-auto, .mx-auto { margin-left: auto !important; }
.mr-auto, .mx-auto { margin-right: auto !important; }
.h-100{ height: 100%; }
.w-fit { width: fit-content; }
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }

.w-75 { width: 75% !important; }

.w-100 { width: 100% !important; }

.p-1 { padding: .25rem !important; }
.p-2 { padding: .5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.p-6 { padding: 4rem !important; }

.pl-0, .px-0 { padding-left: 0 !important; }
.pl-1, .px-1 { padding-left: .25rem !important; }
.pl-2, .px-2 { padding-left: .5rem !important; }
.pl-3, .px-3 { padding-left: 1rem !important; }
.pl-4, .px-4 { padding-left: 1.5rem !important; }
.pl-5, .px-5 { padding-left: 3rem !important; }
.pl-6, .px-6 { padding-left: 4rem !important; }

.pr-0, .px-0 { padding-right: 0 !important; }
.pr-1, .px-1 { padding-right: .25rem !important; }
.pr-2, .px-2 { padding-right: .5rem !important; }
.pr-3, .px-3 { padding-right: 1rem !important; }
.pr-4, .px-4 { padding-right: 1.5rem !important; }
.pr-5, .px-5 { padding-right: 3rem !important; }
.pr-6, .px-6 { padding-right: 4rem !important; }

.pt-0, .py-0 { padding-top: 0 !important; }
.pt-1, .py-1 { padding-top: .25rem !important; }
.pt-2, .py-2 { padding-top: .5rem !important; }
.pt-3, .py-3 { padding-top: 1rem !important; }
.pt-4, .py-4 { padding-top: 1.5rem !important; }
.pt-5, .py-5 { padding-top: 3rem !important; }
.pt-6, .py-6 { padding-top: 4rem !important; }

.pb-0, .py-0 { padding-bottom: 0 !important; }
.pb-1, .py-1 { padding-bottom: .25rem !important; }
.pb-2, .py-2 { padding-bottom: .5rem !important; }
.pb-3, .py-3 { padding-bottom: 1rem !important; }
.pb-4, .py-4 { padding-bottom: 1.5rem !important; }
.pb-5, .py-5 { padding-bottom: 3rem !important; }
.pb-6, .py-6 { padding-bottom: 4rem !important; }

.mr-0, .mx-1 { margin-right: 0 !important; }
.mr-1, .mx-1 { margin-right: .25rem !important; }
.mr-2, .mx-2 { margin-right: .5rem !important; }
.mr-3, .mx-3 { margin-right: 1rem !important; }
.mr-4, .mx-4 { margin-right: 1.5rem !important; }
.mr-5, .mx-5 { margin-right: 3rem !important; }
.mr-6, .mx-6 { margin-right: 4rem !important; }
.ml-0, .mx-1 { margin-left: 0 !important; }
.ml-1, .mx-1 { margin-left: .25rem !important; }
.ml-2, .mx-2 { margin-left: .5rem !important; }
.ml-3, .mx-3 { margin-left: 1rem !important; }
.ml-4, .mx-4 { margin-left: 1.5rem !important; }
.ml-5, .mx-5 { margin-left: 3rem !important; }
.ml-6, .mx-6 { margin-left: 4rem !important; }

.mb-0, .my-0 { margin-bottom: 0 !important; }
.mb-1, .my-1 { margin-bottom: .25rem !important; }
.mb-2, .my-2 { margin-bottom: .5rem !important; }
.mb-3, .my-3 { margin-bottom: 1rem !important; }
.mb-4, .my-4 { margin-bottom: 1.5rem !important; }
.mb-5, .my-5 { margin-bottom: 3rem !important; }
.mb-6, .my-6 { margin-bottom: 4rem !important; }

.mt-0, .my-0 { margin-top: 0 !important; }
.mt-1, .my-1 { margin-top: .25rem !important; }
.mt-2, .my-2 { margin-top: .5rem !important; }
.mt-3, .my-3 { margin-top: 1rem !important; }
.mt-4, .my-4 { margin-top: 1.5rem !important; }
.mt-5, .my-5 { margin-top: 3rem !important; }
.mt-6, .my-6 { margin-top: 4rem !important; }