// 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 $color_keppel_approx;

    a {
        color: $color_keppel_approx;
    }
}

.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 - 200px);
    min-height: 70px;
    overflow: auto;

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

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

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

.table-quickMenu {
    border: thin $lightGrey solid;
    border-collapse: separate;
    border-radius: 6px;
    box-shadow: 0px 0px 4px #d8d8d8;
    overflow: scroll !important;
    max-height: 500px;
    width: 100%;

    .resizeHandler {
        &.grid-draggable {
            background-color: $color_jungle_green_approx !important;
        }

        &:hover {
            border-left: 1px solid #d2d2d2;
        }
    }

    >thead>tr>th {
        border-width: thin;
        border-color: $color_jungle_green_approx;
        border-bottom-style: solid;
        box-shadow: none;
        padding: 20px 15px;
        background-color: transparent;
        text-align: left;
        font-weight: 800;
        border-top: 0;
        font-size: 14px;
        letter-spacing: 0.25px;
        color: rgba(52, 52, 52, 1);
    }

    >tbody>tr>td {
        border-color: $color_gallery_approx;
        color: #333333;
        font-weight: 100;
        padding: 10px 15px;
    }
}

td {

    div.scroll-y,
    pre.scroll-y {
        max-height: 200px;
        overflow-y: auto;
        word-break: break-word;
    }
}


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

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

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

.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: 105px;

            .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 {
    &.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
        }

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