/******************************************************************************
 * Copyright 2009-2019 Exactpro (Exactpro Systems Limited)
 *
 * Licensed 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.
 ******************************************************************************/
 
@import "./common/vars"; 

.layout {
    display: grid;
    height: 100%;
    grid-template: auto 1fr / 1fr;
    grid-template-areas:
        "header" 
        "main-content";

    &__header {
        grid-area: header;
        position: relative;
        z-index: 100;
    }

    &__body {
        grid-area: main-content;
        padding-top: 7px; 
    }
}

.layout-panel {
    height: 100%;
    display: flex;
    flex-direction: column;

    &__controls {
        height: 50px;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        background-color: white;
        padding-right: 5px;
        position: relative;
    }

    &__tabs {
        width: 100%;
        display: inline-flex;
        justify-content: flex-start;
        align-items: center;
    }

    &__content {
        width: 100%;
        height: 100%;
        position: relative;  
    }

    &__content-wrapper {
        position: absolute;
        background-color: #fff;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        z-index: 0;

        &.disabled {
            z-index: -1;
        }
    }
}

.layout-control {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;

    &.disabled {
        opacity: 0.5;
    }

    &__title, &__counter {
        @include unselectable;
        font-size: 15px;
        font-weight: bold;
        color: $primaryTextColor;
        white-space: nowrap;
    }

    &__title {

        &.selectable {
            cursor: pointer;
            
            &.disabled {
                cursor: default;
            }
        }
        
        &.prediction {
            &.active {
                color: $failedTextColor;
            }
        }
    }

    &__icon {
        @include icon(null, 20px, 20px);
        margin: 0 7px;
        cursor: pointer;

        &.prev {
            background-image: url(../../resources/icons/arr1-left.svg);
        }

        &.next {
            background-image: url(../../resources/icons/arr1-right.svg)
        }

        &.prev, &.next {
            filter: opacity(0.7);
        }

        &.cp {
            background-image: url(../../resources/icons/checkpoint.svg);
        }

        &.admin {
            &.disabled {
                background-image: url(../../resources/icons/admin-icon-inactive.svg);
                cursor: default;
            }

            &.inactive {
                background-image: url(../../resources/icons/admin-icon-inactive.svg);
            }

            &.active {
                background-image: url(../../resources/icons/admin-icon-active.svg);
            }
        }

        &.rejected {
            &.disabled {
                background-image: url(../../resources/icons/rejected-icon-inactive.svg);
                cursor: default;
            }

            &.inactive {
                background-image: url(../../resources/icons/rejected-icon-inactive.svg);
            }

            &.active {
                background-image: url(../../resources/icons/rejected-icon.svg);
            }
        }

        &.prediction {
            &.disabled {
                background-image: url(../../resources/icons/ml-control-icon-inactive.svg);
                cursor: default;
            }

            &.inactive {
                background-image: url(../../resources/icons/ml-control-icon-inactive.svg);
            }

            &.active {
                background-image: url(../../resources/icons/ml-control-icon-active.svg);
            }        
        }

        &.beautifier {
            background-image: url(../../resources/icons/plain-text.svg);
        }
    }
}
