/* Landscape orientation blocker — phones only */
#landscape-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background-color: white;
    color: #333;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

#landscape-blocker .landscape-logo {
    max-height: 50px;
    margin-bottom: 30px;
}

#landscape-blocker .rotate-icon {
    font-size: 64px;
    margin-bottom: 25px;
    color: #349ad8;
    animation: rotatePortrait 2s ease-in-out infinite alternate;
}

#landscape-blocker h2 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #1d69a6;
    font-weight: 600;
}

#landscape-blocker p {
    margin: 0 0 25px;
    font-size: 16px;
    color: #666;
}

#landscape-blocker .landscape-support {
    font-size: 14px;
    color: #999;
}

#landscape-blocker .landscape-support a {
    color: #349ad8;
    text-decoration: none;
}

@keyframes rotatePortrait {
    from { transform: rotate(90deg); }
    to { transform: rotate(0deg); }
}

@media (orientation: landscape) and (max-height: 500px) {
    #landscape-blocker {
        display: flex;
    }

    #divIncludesHeaderNavigationBody {
        display: none;
    }

    /* Allow pages to opt out */
    .allow-landscape #landscape-blocker {
        display: none;
    }

    .allow-landscape #divIncludesHeaderNavigationBody {
        display: flex;
    }
}


/**** Mobile Form Tabs ****/
#mobileFormTabs {
    display: flex;
    align-items: flex-end;
    border-bottom: 3px solid #349ad8;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    background: white;
    flex-shrink: 0;
}

.mobile-tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    user-select: none;
}

.mobile-tab-item.active-mobile-tab {
    color: #349ad8;
    font-weight: 600;
    background-color: #f0f0f0;
}

.mobile-tab-item.disabled-tab {
    opacity: 0.4;
    pointer-events: none;
}

.mobile-tab-content {
    display: none;
    padding-top: 10px;
}

.mobile-tab-content.active-mobile-tab-content {
    display: block;
}

@media screen and (min-width: 900px) {
    /***** Mobile Form Tabs - hidden on desktop ******/
    #mobileFormTabs {
        display: none;
    }

    .mobile-tab-content {
        display: block !important;
    }
}


/* Report pages tab layout */
.reports-page {
    padding-bottom: 0 !important;
}

#reportsTabDesktop {
    display: none;
}

#reportsTabMobile {
    display: flex;
    align-items: flex-end;
    border-bottom: 3px solid #349ad8;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    background: white;
    flex-shrink: 0;
}

#reportsTabMobile .mobile-tab-item {
    text-decoration: none;
}

.reports-page > form > ul.tab,
.reports-page > form > #reportsTabDesktop,
.reports-page > form > #reportsTabMobile,
.reports-page > form > .custom-report-sub-tabs {
    flex-shrink: 0;
}

.reports-page > form > .tabcontent {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    float: none;
}

.reports-page > form > .tabcontent > * {
    float: none;
}

@media (max-width: 900px) {
    .reports-page > form > .tabcontent {
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

@media screen and (min-width: 900px) {
    #reportsTabMobile {
        display: none;
    }

    #reportsTabDesktop {
        display: block;
    }

    .reports-page {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        float: none;
        height: calc(100vh - 120px);
    }

    .reports-page > form {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
        float: none;
        min-height: 0;
    }

    .reports-page > form > .tabcontent {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        float: none;
    }

    .reports-page {
        height: 100%;
        overflow: hidden;
    }

    .reports-page > form {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 10px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .reports-page > form > ul.tab,
    .reports-page > form > #reportsTabDesktop,
    .reports-page > form > #reportsTabMobile {
        flex-shrink: 0;
    }

    .reports-page > form > .tabcontent {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
}


/* Kendo grid overrides */
.k-selected td {
    background-color: #1d69a6 !important;
    color: white;
}

.k-state-hover td {
    background-color: #7ca0bc;
    color: white;
}

.k-grid tbody tr {
    height: 30px;
}

.k-grid tbody td {
    padding-top: 8px;
    padding-bottom: 8px;
}

@media screen and (min-width: 900px) {
    .k-grid tbody tr {
        height: auto;
    }

    .k-grid tbody td {
        padding-top: 0;
        padding-bottom: 0;
    }
}

.k-grid .k-cell-inner {
    justify-content: center !important;
}

.k-grid td, .k-grid .k-table-td {
    text-align: center !important;
}

.deleted-row {
    color: lightgray;
    font-style: italic;
}

/* For selected rows in a grid, make the text white. */
.k-selected > td {
    color: white !important;
}

.k-grid a {
    color: white !important;
}

.k-button-text {
    color: black !important;
}

.k-grid td.k-selected, .k-grid .k-table-row.k-selected > td, .k-grid .k-table-td.k-selected, .k-grid .k-table-row.k-selected > .k-table-td {
    background-color: #1d69a6 !important;
    color: white !important;
}

.k-treeview-leaf.k-selected {
    background-color: #1d69a6 !important;
    color: white !important;
}


/* Toggle button on/off */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 2px;
        background-color: white;
        -webkit-transition: .2s;
        transition: .2s;
    }

input:checked + .slider {
    background-color: #007dc1;
}

input:focus + .slider {
    box-shadow: 0 0 1px #007dc1;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 85px;
}

    .slider.round:before {
        border-radius: 50%;
    }


/* Spinner overlay container */
.spinner-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

/* Spinner animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Grayed-out button style */
a.button.disabled, button.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.admonishment {
    font-size: 12px;
    color: red;
    font-weight: bold
}


/*DataGrid Table*/
.datagrid table {
    border-collapse: collapse;
    text-align: center;
    width: 100%;
}

.datagrid {
    font: normal 12px/150% Verdana, Arial, Helvetica, sans-serif;
    background: #fff;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    text-align: center;
}

    .datagrid table td, .datagrid table th {
        padding: 5px 4px;
    }

    .datagrid table thead th {
        background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );
        background: -moz-linear-gradient( center top, #006699 5%, #00557F 100% );
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');
        background-color: #006699;
        color: #FFFFFF;
        font-size: 12px;
        font-weight: bold;
        border-left: 1px solid #0070A8;
        text-align: center;
    }

        .datagrid table thead th:first-child {
            border: none;
        }

#smGraphicalGrid tbody td {
    font-size: 10px !important;
}

.datagrid table tbody td {
    color: #000000;
    border-left: 1px solid #E1EEF4;
    font-size: 12px;
    font-weight: normal;
    text-align: center;
}

.datagrid table tbody .alt td {
    background: #E1EEF4;
    color: #000000;
}

.datagrid table tbody td:first-child {
    border-left: none;
}

.datagrid table tbody tr:last-child td {
    border-bottom: none;
}

.datagrid table tfoot td div {
    border-top: 1px solid #006699;
    background: #E1EEf4;
}

.datagrid table tfoot td {
    padding: 0;
    font-size: 12px;
}

    .datagrid table tfoot td div {
        padding: 2px;
    }

    .datagrid table tfoot td ul {
        margin: 0;
        padding: 0;
        list-style: none;
        text-align: right;
    }

.datagrid table tfoot li {
    display: inline;
}

    .datagrid table tfoot li a {
        text-decoration: none;
        display: inline-block;
        padding: 2px 8px;
        margin: 1px;
        color: #FFFFFF;
        border: 1px solid #006699;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );
        background: -moz-linear-gradient( center top, #006699 5%, #00557F 100% );
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');
        background-color: #006699;
    }

.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover {
    text-decoration: none;
    border-color: #00557F;
    color: #FFFFFF;
    background: none;
    background-color: #006699;
}

div.dhtmlx_window_active, div.dhx_modal_cover_dv {
    position: fixed !important;
}

.table-button {
    text-decoration: none;
    display: inline-block;
    padding: 2px 8px;
    margin: 1px;
    color: #FFFFFF;
    border: 1px solid #006699;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );
    background: -moz-linear-gradient( center top, #006699 5%, #00557F 100% );
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');
    background-color: #006699;
}

.center {
    text-align: center;
}


/* Tabs */
ul.tab {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #349ad8;
    background-color: #f5f9fb;
}

    ul.tab li {
        float: left;
        padding: 8px;
    }

        ul.tab li a {
            display: inline-block;
            text-align: center;
            text-decoration: none;
            transition: 0.3s;
            color: white;
            height: 30px;
            padding: 4px;
        }

            /* Change background color of links on hover */
            ul.tab li a:hover {
                background-color: #ddd;
            }

            /* Create an active/current tablink class */
            ul.tab li a:focus, .active {
                background-color: #ccc;
            }

@media screen and (min-width:700px) {
    .tabcontent {
        padding: 15px;
    }
}

.tabcontent {
    padding: 5px;
    border: 1px solid #349ad8;
    border-top: none;
}

.tabcontent2 {
    border: none;
    border: 0px;
}


/* Sortable table */
.sortable-table thead {
    cursor: pointer;
}

    .sortable-table thead tr th {
        font-weight: bold;
        text-align: center;
    }

        .sortable-table thead tr th span {
            padding-right: 20px;
            background-repeat: no-repeat;
            background-position: 100% 100%;
        }

        .sortable-table thead tr th.headerSortUp, .sortable-table thead tr th.headerSortDown {
            background: #acc8dd;
        }

            .sortable-table thead tr th.headerSortUp span {
                background-image: url('../images/UpArrow2.gif');
            }

            .sortable-table thead tr th.headerSortDown span {
                background-image: url('../images/DownArrow2.gif');
            }

.sortable-table tbody tr {
    color: #555;
}

    .sortable-table tbody tr td {
        text-align: center;
        padding: 15px 10px;
    }

        .sortable-table tbody tr td.lalign {
            text-align: left;
        }


.ddContainer {
    float: left;
    width: 100%;
}

@media (min-width: 500px) {
    .ddContainer {
        width: 32%;
        max-width: 200px;
        padding-right: 10px;
    }
}

.ReportHistoryContainer {
    height: 400px;
    overflow-y: auto;
}


/* -------------------------------------------------------------------------
   Mobile popups (jQuery UI dialogs)
   ------------------------------------------------------------------------- */
@media (max-width: 899px) {
    .ui-dialog {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

        .ui-dialog .ui-dialog-titlebar,
        .ui-dialog .ui-dialog-buttonpane {
            flex: 0 0 auto;
        }

        .ui-dialog .ui-dialog-titlebar-close {
            display: none;
        }

        .ui-dialog .ui-dialog-content {
            flex: 1 1 auto;
            min-height: 0;
            width: 100% !important;
            height: auto !important;
            max-height: none !important;
            overflow-y: auto !important;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            padding: 10px !important;
            box-sizing: border-box;
        }
}

/* Modal-popup backdrop */
.ui-widget-overlay {
    background: #000 !important;
    opacity: 0.4 !important;
    z-index: 100001 !important;
}

body .ui-dialog {
    z-index: 100002 !important;
}

/* Customer search popup – mobile */
@media (max-width: 899px) {
    /* Hide Select button column and its colgroup width */
    .ui-dialog #customer-grid td:last-child,
    .ui-dialog #customer-grid th:last-child {
        display: none !important;
    }

    .ui-dialog #customer-grid colgroup col:last-child {
        width: 0 !important;
    }

    .ui-dialog #customer-grid tbody tr {
        cursor: pointer;
    }

    /* Grid full width */
    .ui-dialog #CustomerSearchContainer,
    .ui-dialog #CustomerSearchContainer .container,
    .ui-dialog #customer-grid-container,
    .ui-dialog #customer-grid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
        margin: 0;
    }

    .ui-dialog #customer-grid .k-grid-header,
    .ui-dialog #customer-grid .k-grid-content {
        width: 100% !important;
    }

    .ui-dialog #customer-grid table {
        width: 100% !important;
    }
}

/* Lock page scroll while a modal dialog is open */
body.we-modal-open {
    overflow: hidden !important;
}
