// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at

//     http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.


/* override.scss */

.tabs li.tab.active {
    border-bottom: 2px solid $white;

    a {
        color: $white;
    }
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #DEDEDE;

    .header-button {
        float: right;
        opacity: .2;
        color: $black;
        margin-top: -2px;

        &:hover {
            color: $black;
            text-decoration: none;
            cursor: pointer;
            filter: alpha(opacity=50);
            opacity: .5;
        }
    }
}

.modal-title {
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #DEDEDE;

    .btn+.btn {
        margin-bottom: 0;
    }
}

.modal-body {
    position: relative;
    padding: 15px;
    max-height: calc(100vh - 215px);
    min-height: 70px;
    overflow: auto;

    .btn+.btn {
        margin-bottom: 2px;
    }

    .admin-audit-details {
        border: 1px solid #ddd;
        border-radius: 4px;

        tr>td:nth-child(2) {
            text-align: right;
        }
    }

    .tree-container {
        max-height: 140px;
        overflow-y: auto !important;
    }
}

.modal-full-screen {
    width: 80%;
    height: 80vh;

    .modal-content {
        width: 100%;
    }

}

.switch.pull-left {
    margin-right: 8px;
}

.modal-content {
    border-radius: 10px;
}


.select2-container {
    width: 100% !important;
}

.select2-mini {

    .select2-container .select2-selection--single,
    .select2-container .select2-selection--multiple {
        min-height: 28px;
    }

    .select2-container--default .select2-selection--single {
        .select2-selection__rendered {
            line-height: 28px;
            font-size: 13px;
        }

        .select2-selection__arrow {
            height: 28px;
        }

    }
}

.select2-container--default {
    &.select2-container--disabled {
        .select2-selection--multiple {
            background-color: $color_gallery_approx !important;
            cursor: not-allowed;

            input.select2-search__field {
                cursor: not-allowed;
            }
        }
    }

    .select2-selection--multiple {

        background-color: $color_white_lilac_approx !important;
        border: 1px $color_mystic_approx solid !important;

        &.errorClass {
            border: 1px solid red !important;
        }
    }

    .select2-selection--single {
        .select2-selection__arrow {
            height: 34px;
        }

        .select2-selection__rendered {
            line-height: 32px;
            font-size: 14px;
        }
    }

    &.select2-container--focus .select2-selection--multiple {
        border-color: $color_bali_hai_approx !important;
    }
}

.select2-container {

    .select2-selection--single,
    .select2-selection--multiple {
        min-height: 34px;

        .select2-selection__rendered {
            padding-left: 12px;
        }
    }
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: $white;
    color: $color_mountain_mist_approx;
    border: 1px solid $tag_color;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: #555;
    // width: 300px !important;
}

.typeLOV {
    .select2-container--default {
        .select2-selection--multiple {
            .select2-selection__rendered {
                padding-right: 13px;

                .select2-selection__choice {
                    font-size: 14px;
                    color: $color_mountain_mist_approx;
                    border: 1px solid $color_mountain_mist_approx;
                }

                .select2-search__field {
                    font-size: 14px;
                }
            }

            .select2-selection__clear {
                position: absolute;
                float: none;
                margin: 0px;
                right: 4px;
                top: 5px;
                color: $color_mountain_mist_approx;
            }
        }
    }
}

.fixed-popover {
    position: fixed;
}

.popover.fade {
    -webkit-transition: ease-in .1s ease-out;
    -o-transition: ease-in .1s ease-out;
    transition: ease-in .1s ease-out;
}

.pager {
    margin: 0px;
}

.popover {
    z-index: 1000;
}

.popover-content {
    max-height: 150px;
    overflow: auto;

    ul {
        color: $dark_gray;
        padding: 0px 5px;
        margin-bottom: 0px;
        cursor: pointer;

        a {
            color: $dark_gray;
            padding: 5px;
        }
    }
}

.tab-content>.tab-pane.active {
    overflow-x: hidden;
    overflow: initial;
}

.tab-content>.tab-pane.active.debug-metrics {
    padding: 5px 20px 15px 20px;
}

.advancedInfo {
    margin-left: 5px;
    cursor: pointer;
}

.metricsUIInfo {
    font-size: 20px !important;
    margin-right: 5px;
}

.query-builder {
    .rule-container {
        margin: 6px 0;
        display: flex;
        flex-wrap: wrap;

        .values-box {
            display: flex;
            flex-grow: 1;
            width: 100%;
            padding-right: 26px;
        }

        .action-box {
            position: absolute;
            right: 4px;
            top: calc(50% - 18px);
        }

        .rule-header {
            .rule-actions {
                padding: 7px 0px;
            }
        }

        .error-container {
            color: $color_trinidad_approx;
        }

        .rule-value-container {
            display: inline-block !important;
            border-left: none;
            width: calc(65% - 105px);

            .form-control {
                width: 100% !important;
                padding: 6px 12px !important;
            }
        }

        .rule-filter-container {
            width: 35%;

            .form-control {
                width: 100% !important;
            }
        }

        .rule-operator-container {
            width: 150px;

            .form-control {
                width: 100% !important;
            }
        }
    }

    .rules-list>:first-child::before {
        top: -8px;
    }

    .rules-group-container {
        border-color: transparent;
        background: none;

        .rules-group-header {
            .group-actions {
                .btn-success {
                    color: #38BB9B !important;
                    background-color: transparent !important;
                    border-color: #38BB9B !important;
                }

                .btn-danger {
                    color: #e14f00;
                    background-color: transparent;
                    border-color: #e14f00;
                }
            }

            .group-conditions {
                .btn-primary {
                    color: #333 !important;
                    background-color: $white !important;
                    border-color: #ccc !important;
                }

                .active {
                    color: $white !important;
                    background-color: #5bc0de !important;
                    border-color: #46b8da !important;
                }
            }
        }
    }


    .rules-group-header .btn-group.pull-right.group-actions {
        float: right !important;
    }
}

div.columnmanager-visibilitycontrol {
    width: auto;
    margin-bottom: 5px;

    &.open .btn-action {
        background-color: $color_keppel_approx;
        color: $white;
    }
}

div.columnmanager-dropdown-container {
    .columnmanager-dropdown-item {
        padding: 2px 13px;
    }

    &.open {
        overflow: auto;
        width: auto;
    }

    >li>span.column-label {
        width: auto;
    }
}

.stack-modal[aria-role="alertdialog"] {
    &.width-600 {
        width: 600px !important;
        left: calc(50% - 250px) !important;
        margin-left: 0 !important;
    }

    &.width-500 {
        width: 500px !important;
        left: calc(50% - 216px) !important;
        margin-left: 0 !important;
    }

    &.width-400 {
        width: 400px !important;
        left: calc(50% - 183px);
        margin-left: 0 !important;
    }

    .alert.ui-pnotify-container {
        color: $color_ironside_gray_approx;
        background-color: $white;
        border: 1px solid rgba(0, 0, 0, .2);
        padding: 0px;
        outline: 0;
        -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
        box-shadow: 0 5px 15px rgba(0, 0, 0, .5);

        .ui-pnotify-icon,
        .ui-pnotify-title {
            padding: 15px;
        }

        .ui-pnotify-text {
            position: relative;
            padding: 15px;
            max-height: 400px;
            min-height: 70px;
            overflow: auto;
            border-top: 1px solid #DEDEDE;
            word-break: break-word;
        }

        .ui-pnotify-action-bar {
            padding: 15px;
            text-align: right;
            border-top: 1px solid #DEDEDE;
        }
    }
}

.ui-pnotify-icon,
.ui-pnotify-icon span {
    padding: 2px 0px;
}

.btn-round-xs {
    border-radius: 11px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: transparent !important;
    color: #626467;
    border: 1px solid black;
}

.text-center {
    text-align: center !important;
}

.margin-15 {
    margin: 15px 0px;
}

.padding-left-0 {
    padding-left: 0px !important;
}

.fa-color {
    color: $color_keppel_approx
}

.w30 {
    width: 30% !important;
}

.query-builder .error-container {
    cursor: pointer;
}

.renderable {
    .glyphicon {
        color: $color_jungle_green_approx;
        font-size: large;
        font-weight: bold;
    }

    .noToggle {
        color: $gray;
    }
}

.backgrid-internal-table {

    th,
    td {
        display: table-cell;
    }
}

.table-hover>tbody>tr:hover {
    background-color: #fafafa;
}

.input-group {
    .form-control {
        z-index: 1;
    }
}

.ui-pnotify-container {
    .ui-pnotify-text {
        word-break: break-word;
    }
}

.jstree-wholerow-ul {
    width: 100%;

    .jstree-anchor {
        width: calc(100% - 50px);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.modal {
    position: absolute;
}

.modal-open {
    overflow-y: auto;
}

.daterangepicker {
    max-height: 400px;
    overflow-y: scroll;

    .ranges {
        max-height: 328px;
        overflow: auto;
    }

    .ranges li.active,
    td.active {
        background-color: $color_havelock_blue_approx;
    }

    .drp-buttons {
        .applyBtn {
            background-color: $color_havelock_blue_approx;
            border-color: $color_havelock_blue_approx;
        }
    }
}

.dropzone .dz-preview .dz-details .dz-filename {
    padding-top: 20px;
}

.long-description-container {
    margin-right: 0px !important;
}

.longdescription-wrapper {
    display: inline-block;
    height: 100px;
    background-color: #fff !important;
    overflow: auto;
    margin-top: 8px;
    width: 100%;

    ul {
        list-style: disc !important;
    }
}

.isTextTypeBtn-wrapper {
    display: inline-block;
    line-height: 22px;

    .switch {
        margin-bottom: 0px;
    }
}

.select2-container--default .select2-search--inline .select2-search__field {
    width: 100% !important;
}

.tooltip-inner>div {
    max-width: 250px;
    text-align: left;

    ul {
        list-style: disc;
    }
}

.ideal-timeout {
    .modal-content {
        border-radius: 0px !important;
    }
}

.user-circle {
    display: inline;
}

.business-metadata-detail-attr {
    ul {
        list-style: disc
    }
}

#r_searchLayoutView {
    .nav-tabs {
        border-bottom: 1px solid #38bb9b;

        li {
            text-align: center;
            width: 50%;
            font-size: 14px;

            a:hover {
                background-color: transparent !important;
                border-color: transparent !important;
                border: 1px solid #38bb9b !important;
            }

            a {
                color: #38bb9b;
            }
        }

        & li:first-child {
            margin-left: 0px;
        }

        li.active>a {
            background-color: transparent !important;
            border: 1px solid #38bb9b;
            border-bottom: 2px solid #323544 !important;
            color: #fff;
        }

        li.active>a:hover {
            background-color: #323544 !important;
        }
    }
}
.disable-relationship-search{
    display:none !important;
}
.search-tab-body{
    padding: 0px 18px 18px 18px !important;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px; 
}

table > thead > tr > th.sortable {
    padding-right: 24px !important; 
}
.sort-icon {
    display: inline-block;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #bbb; 
}
.sort-icon.asc {
    border-top-color: #38bb9b; 
    transform: translateY(-50%) rotate(180deg);
}
.sort-icon.desc {
    border-top-color: #38bb9b; 
}

th.sortable[data-sort-key="processedMessageCount"],
th.sortable[data-sort-key="failedMessageCount"] {
    white-space: nowrap;
    vertical-align: top;
    text-align: center;
}