// 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;
    background-color: $color_celeste_approx;
    border-radius: 18px;
    cursor: pointer;
}

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

.switch-slider {
    position: absolute;
    top: 1px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 10px;
    box-shadow: 1px 1px 5px rgba(black, .2);
    @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;
        box-shadow: inset 0 1px rgba(black, .02);
        @include transition(inherit);
    }

    .switch-input:checked~& {
        left: 30px;
        box-shadow: -1px 1px 5px rgba(black, .2);
    }
}

.labelShowRecord {
    line-height: 40px;
}

.srchType {
    margin: 5px 0px;

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

.filterQuery {
    word-break: break-all;

    span {
        font-size: 15px;
        font-weight: bold;
    }

    .key {
        color: $color_jungle_green_approx;
    }

    .operator {
        color: $action_gray;
    }

    .value {
        color: $tag_color;
    }
}

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

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

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

        td {
            height: 54px;
        }
    }
}

.table-responsive {
    position: relative;
}

.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;
    border-top: 1px solid #bdc3c7;
}



.searchTable {
    &.noData {

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

.query-builder {
    .rule-container {
        &.user-define {
            .values-box {
                display: flex;
                flex-wrap: wrap;

                .rule-filter-container {
                    width: 200px;
                }

                .rule-value-container {
                    width: 100%;
                    padding: 7px 0px 0px 0px;
                }
            }
        }

        .rule-value-container {
            &>table.custom-table {
                tr {
                    display: none;

                    &.custom-tr {
                        display: table-row;

                        td.custom-col-1 {
                            width: 48%;

                            .errorMsg {
                                display: none;
                            }
                        }
                    }
                }

                input,
                textarea {
                    width: 100% !important;
                }
            }
        }
    }
}

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

    .attribute-filter-container {
        position: absolute;
        z-index: 3;
        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;
            }
        }

        .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;
        }
    }

}