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


/* graph.scss */


/* .graph-bg svg {
    background-image: linear-gradient(to right, $black -10px, rgba(0, 0, 0, 0) 1px), linear-gradient($black -10px, $color_cararra_approx 1px);
    background-size: 10px 10px;
    position: relative;
} */

.node {
    cursor: pointer;

    text {
        font-size: 10px;
        font-family: $font_1;
    }

    rect {
        stroke: $color_mountain_mist_approx;
        fill: $white;
        stroke-width: 1.5px;
    }

    .label {
        fill: $color_suva_gray_approx;
    }

    circle {
        -moz-transition: all 0.3s;
        -webkit-transition: all 0.3s;
        transition: all 0.3s;
        stroke-width: 1.5px;

        &.nodeImage {
            &.green:hover {
                stroke: #ffb203;
            }

            &.blue:hover {
                stroke: #4b91e2;
            }

            &.currentNode {
                stroke: #fb4200;
            }

            &:hover {
                -moz-transform: scale(1.4);
                -webkit-transform: scale(1.4);
                transform: scale(1.4);
            }
        }
    }

    &.active {
        circle {
            -moz-transform: scale(1.4);
            -webkit-transform: scale(1.4);
            transform: scale(1.4);

            &.nodeImage {
                &.green {
                    stroke: #ffb203;
                }

                &.blue {
                    stroke: #4b91e2;
                }
            }
        }
    }
}

.edgePath {
    .path {
        cursor: pointer;
    }
}

.overlay {}

.link {
    fill: none;
    stroke: $color_celeste_approx;
    stroke-width: 1.5px;
}

.d3-tip {
    line-height: 1;
    font-weight: bold;
    padding: 12px;
    background: $black_80;
    color: $white;
    z-index: 999;
    max-width: 300px; //Instead of the line below you could use @include border-radius($radius, $vertical-radius)
    border-radius: 2px;

    .tip-inner-scroll {
        overflow: auto;
        max-height: 300px;
    }

    /* Creates a small triangle extender for the tooltip */
    &:after {
        box-sizing: border-box;
        display: inline;
        font-size: 10px;
        width: 100%;
        line-height: 1;
        color: rgba(0, 0, 0, 0.8);
        position: absolute;
    }

    /* Nrthward tooltips */
    &.n:after {
        content: "\25BC";
        margin: -1px 0 0 0;
        top: 100%;
        left: 0;
        text-align: center;
    }

    /* Eastward tooltips */
    &.e:after {
        content: "\25C0";
        margin: -4px 0 0 0;
        top: 50%;
        left: -8px;
    }

    /* Southward tooltips */
    &.s:after {
        content: "\25B2";
        margin: 0 0 1px 0;
        top: -8px;
        left: 0;
        text-align: center;
    }

    /* Westward tooltips */
    &.w:after {
        content: "\25B6";
        margin: -4px 0 0 -1px;
        top: 50%;
        left: 100%;
    }
}

g.type-TK>rect {
    fill: $color_bright_turquoise_approx;
}


.graph-toolbar {
    background-color: $white;
    margin-bottom: 10px;
    padding: 10px;
}

.legends {
    >i {
        >span {
            font-family: 'Source Sans Pro';
        }
    }
}

.lineage-box {
    position: absolute;
    height: 100%;
    width: 100%;
    overflow: hidden;

    .lineage-edge-details {
        position: absolute;
        left: 0;
        overflow: auto;
        top: 0px;
        max-height: 100%;
        box-shadow: 4px 13px 14px -12px;
        background: #e7e7e7;
        transform: scaleX(0);
        width: 200px;
        transition: transform 0.3s ease-in;

        &.open {
            transform: scaleX(1);
        }

        .title {
            background: black;
            color: white;
            padding: 10px;
            padding-left: 17px;
            margin-top: 0;
            font-size: 14px;

            .navigation-font {
                font-family: sans-serif;
                padding: 0px 5px;
                color: #fb4200;
            }
        }

        .close-details {
            position: absolute;
            top: 0;
            color: white;
            left: 0;
            height: 21px;
            width: 21px;
            cursor: pointer;
            font-size: 16px;
        }

        .propagation-list {
            overflow: auto;
            list-style-type: none;
            list-style-position: outside;
            padding-left: 30px;
        }

        .overlay {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            background: #d2d2d2b8;
            z-index: 99;
        }

        ul>li {
            word-wrap: break-word;
            margin-bottom: 5px;
            text-align: left;
        }
    }
}

.lineage-filter-box {
    background-color: #e6e6e6;
    padding: 4px;
    border-radius: 5px;
    width: 100%;
    box-shadow: 1px 3px 3px 2px #bfbfbf;
}

.graph-button-group {
    &>div {
        display: inline-block;
    }

    .zoom-button-group {}
}

.lineage-fltr-panel,
.lineage-search-panel {
    position: absolute;
    border: 1px solid #ccc;
    width: 250px;
    max-height: 99%;
    overflow: auto;
    transition: all 0.3s ease;
    right: -273px;
    box-shadow: 7px 1px 28px -3px;
    background-color: #f5f5f5;
    z-index: 999;

    .header {
        background: black;
        color: white;
        text-align: center;
        margin-bottom: 15px;
        position: absolute;
        width: 100%;

        >h4 {
            padding: 0px 36px 0px 10px;
            word-break: break-all;
        }

        .fltr-togler,
        .search-togler {
            position: absolute;
            right: 0px;
            top: 0px;
        }
    }

    .body {
        padding: 10px;
        margin-top: 39px;
        width: 100%;
        position: relative;
        height: 150px;
        overflow: auto;
    }
}

.lineage-details.node-details.open {
    overflow: hidden !important;
    min-height: 300px;

    & span[data-id='close'] {
        margin: 7px;
        position: absolute;
        right: 0;
        z-index: 99;
    }

    & div[data-id="entityList"] {
        position: relative;
        overflow: auto;
        max-height: 250px;
        top: 40px;
    }

    & h4.title {
        position: fixed;
        width: 100%;
    }

    & table {
        & tbody td {
            word-wrap: break-word
        }

        table-layout: fixed;
    }
}

.lineage-details {
    position: absolute;
    left: 0;
    overflow: auto;
    top: 0px;
    max-height: 100%;
    box-shadow: 4px 13px 14px -12px;
    background: #e7e7e7;
    transform: scaleX(0);
    width: 35%;
    transition: transform 0.3s ease-in;

    &.open {
        transform: scaleX(1);
    }

    .title {
        background: black;
        color: white;
        padding: 10px 38px 10px 10px;
        word-break: break-all;
        margin-top: 0;
    }

    .close-details {
        position: absolute;
        top: 0;
        color: white;
        left: 0;
        height: 21px;
        width: 21px;
        cursor: pointer;
        font-size: 16px;
    }

    .entity-list {
        overflow: auto;
        list-style-type: decimal;
        list-style-position: outside;
        padding-left: 15px;
    }

    ul>li {
        word-wrap: break-word;
        margin-bottom: 5px;
        text-align: left;

        &.deleted-relation {
            a {
                color: #BB5838 !important;
            }

            .deleteBtn {
                padding: 2px 8px !important;
                margin: 5px 5px !important;
            }
        }
    }
}

.show-filter-panel,
.show-search-panel {
    right: 0px !important;
}


.btn-gray {
    border: 1px solid #686868;
    color: $dark_gray;
    background: white;
}

.btn-gray:hover {
    border: 1px solid #686868;
    color: $dark_gray !important;
    background-color: white !important;
}


span#zoom_in {
    border-bottom: 1px solid #625555;
}

.depth-container {

    //display: inline-block;
    //margin-top: 3px;
    .inline {
        display: inline-block;
    }
}

.resizeGraph {
    position: relative;
    width: 100%;
    height: 64vh;
}

.active.fullscreen-mode {
    position: fixed;
    height: 100% !important;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    right: 0;
    padding: 0 !important;
    z-index: 999;
    overflow: hidden !important;

    .resizeGraph {
        position: fixed;
        height: 100% !important;

        .ui-resizable-handle {
            display: none;
        }
    }

    .lineage-box {
        padding: 10px !important;
    }
}