// 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.

//colors
$color_celeste_approx: #1D1F2B;

.switch {
    position: relative;
    width: 50px;
    height: 22px;
    margin-left: 8px;
    padding: 3px;
    vertical-align: top;
    border: 1px solid $gray;
    border-radius: 18px;
    cursor: pointer;
}

.switch-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.switch-slider {
    position: absolute;
    top: 0px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 10px;
    @include transition(left #{$switchTransition});

    &:before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -6px 0 0 -8px;
        width: 16px;
        height: 16px;
        background-color: $color_jungle_green_approx;
        border-radius: 10px;
        @include transition(inherit)
    }

    .switch-input:checked~& {
        left: 30px;
    }
}

.labelShowRecord {
    line-height: 40px;
}

.srchType {
    margin: 5px 0px;

    .srchTitle {
        font-size: 14px;
        color: $gray
    }
}

body.ui-autocomplete-small-height {
    .ui-menu.ui-widget-content.ui-autocomplete {
        max-height: 40%
    }
}

.default-global-search {
    .has-feedback.align-left-right-icon {
        .form-control.global-search {
            padding-left: 43px;
        }

        .form-control-feedback:first-child {
            left: 11px;
        }

        .icon-group {
            right: 11px;
        }
    }

    .global-search-container {
        //width: 50%;

        .searchLayoutView {
            top: 50px;
            margin: 0 auto;
        }

        .global-search {
            height: 50px;
        }
    }
}

.global-search-active {
    overflow: hidden;

    header.atlas-header>table {
        td {
            &.global-search-container {
                z-index: 221;
            }
        }
    }
}

.global-search-container {
    .searchLayoutView {
        position: absolute;
        z-index: 999;
        left: 0;
        right: 0;
        background: $white;
        box-shadow: 0px 1px 5px 0px rgba(128, 128, 128, 0.5);
        top: 37px;
        padding: 0px 20px;
        display: none;
        transition: all ease 0.3s;

        &.open {
            display: block;
        }
    }
}

.search-container {
    &.center {
        width: 80%;
        margin: 30vh auto;
    }

    &.top {
        animation-fill-mode: backwards;
        animation: bottom-top 0.4s ease-in;
    }
    .create-entity{
        position: absolute;
        top: 0px;
        right: 0px;
    }
}

// @-webkit-keyframes bottom-top {
//     from {top: 0px;}
//     to {top: 200px; background-color: blue;}
// }

@keyframes bottom-top {
    from {
        margin-top: 20%;
        width: 100%;
    }

    to {
        margin: 0px;
    }
}

.filterQuery {
    width: 94%;
    display: block;

    &>span {
        margin-bottom: 15px !important;
    }

    span {
        font-size: 15px;
        font-weight: bold;
        margin: 0px 2px;
        float: left;
    }

    .key {
        color: $color_jungle_green_approx;
    }

    .operator {
        color: $action_gray;
    }

    .value {
        color: $tag_color;
    }

    .sub-group {
        float: left;

        &.show:hover {
            background: yellow;
            border-radius: 15px;
        }
    }

    .group {
        float: left;

        &.show:hover {
            background: rgba(55, 187, 156, 0.2);
            border-radius: 15px;
        }
    }
    .queryContainer{
        float:left;
    }

    .capsuleView {
        padding: 1px 2px;
        border: 1px solid;
        border-radius: 15px;
        display: inline-block;
        color: $color_havelock_blue_approx;
        margin: 0px 3px;
        position: relative;
        float: left;
        font-size: 6px;

        span {
            font-size: 13px;
        }

        &:hover {
            cursor: pointer;
        }

        .clear-attr {
            background: $gray;
            padding: 2px;
            border-radius: 50%;
            color: white;
            margin: 3px 2px;
            font-size: 8px;
        }
    }
}

.popup-tag-term {
    display: none;
}

.popover-tag-term {
    .btn {
        display: block;
    }
}

.gu-mirror {
    .table-quickMenu {
        border: none;

        td {
            height: 54px;
        }
    }
}

.table-responsive {
    position: relative;
    overflow: auto;
}

.sindu_dragger {
    @extend .gu-mirror;

    &.sindu_column {
        li {
            float: none !important;
            display: table-cell !important;
        }
    }

    .gu-transit {
        //box-shadow: 0px 1px 15px inset;
    }

    table {
        background: rgb(242, 242, 242) !important;
    }
}

.filter-box {
    .inline-content-fr {
        .inline {
            margin: 0px;
        }
    }
}

.typeFilter {
    .dropdown {
        span.type-clear-btn {
            position: absolute;
            color: #444444;
            font-size: 8px;
            right: 23px;
            top: 12px;
            cursor: pointer;
        }
    }

    button.dropdown-toggle {
        width: 99.5%;
        text-align: left;
        background-color: white;
        color: $color_star_dust_approx;
        border: $color_star_dust_approx;

        &:hover {
            color: $color_star_dust_approx !important;
            border: $color_star_dust_approx !important;
        }
    }
}

ul.type-filter-ul {
    color: black;
    padding: 10px;
    max-height: 415px;
    overflow: auto;
    width: 100%;
    padding-top: 0px;
    margin-bottom: 0px;

    li {
        padding: 2px;
    }

    .typeLi li {
        padding: 3px;
        background-color: #f7fbff;
        margin: 3px;
        border: 1px solid #dbd6d6;
        border-radius: 4px;

        &:hover {
            color: $white;
            background-color: $color_star_dust_approx;
            cursor: pointer;
        }

        &.active {
            background-color: #37bb9b;
            color: white;
        }
    }

    .filterLi li {
        padding: 2px;
        margin: 4px;
    }
}

.dark-text {
    color: black;
}

hr.hr-filter {
    margin-top: 7px;
    margin-bottom: 7px;
    border: 0;
}

.searchTable {
    &.noData {

        .labelShowRecord,
        .inline[data-id="colManager"],
        .row.searach-result-pagination,
        table thead {
            display: none !important;
        }
    }
}

.attr-filter-overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    opacity: 0.5;
    z-index: 1;
    background: white;
}

.attributeResultContainer {
    &.overlay {
        z-index: 2;
    }

    .attribute-filter-container {
        position: absolute;
        z-index: 1;
        left: 21px;
        width: 75%;
        right: 0;
        // display: none;
        background: $white;
        box-shadow: 0px 13px 34px -13px grey;
        padding: 15px;
        transition: all ease 0.3s;

        &.no-attr {
            .filter-box {
                display: inline-block;
                padding: 0px 15px;
            }

            .attribute-result-footer,.attribute-edit-footer {
                display: inline-block;
            }
        }

        .filter-box {
            padding: 5px;
        }

        .entity-detail-table-toggle {
            display: inline-block;
        }

        .pretty.p-switch.p-fill input:checked~.state.p-primary:before {
            background-color: #38bb9b !important;
        }

        .pretty.p-switch input:checked~.state.p-primary:before {
            border-color: #38bb9b;
        }

        .panel {
            border: none;
        }

        .attribute-result-footer, .attribute-edit-footer {
            text-align: right;
        }
    }

}

.ellipsis {
    @include ellipsis();
}

.ellipsis-with-margin {
    .searchResult {
        p {
            margin: 10px 0px
        }
    }
}
.popover{
        max-width: 800px;
    
    .attributePopOver{
            min-height: 190px;
    }
}