/******************************************************************************
 * 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";

.known-bug-list {
    @include scrollbar;
    padding-left: 5px;
    height: 100%;
    overflow-y: auto;
    
    &__category-title {
        font-size: 15px;
        margin: 8px 0 15px 0;
        font-weight: bold;
    }

    &__arrow {
        padding: 0 10px;
        font-size: 14px;
        color: $secondaryTextColor;
        cursor: default;
    }
}

.known-bug-card {
    min-height: 40px;

    border: 2px solid $knownBugCardBorderColor;
    border-radius: $defaultCardBorderRadius;

    margin-bottom: 7px;
    padding: 5px;

    display: inline-flex;
    flex-direction: row;
    justify-content: space-between;
    margin-right: 10px;

    &.not-reproduced {
        border-color: $defaultCardBackground;
        color: $secondaryTextColor;

        &.selected {
            border-color: $defaultCardBorderColor;
            background-color: $defaultSelectedCardBackground;
        }
    }

    &.reproduced {
        border-color: $conditionallyPassedBorderColorSecondary;
        color: $conditionallyPassedTextColor;

        &.selected {
            border-color: $conditionallyPassedBorderColor;
        }
    }

    &__left, &__right {
        display: flex;
        align-items: center;
        flex-direction: row;
    }

    &__left {
        justify-content: flex-start;
    }

    &__right {
        justify-content: flex-end;
    }

    &__name {
        font-size: 17px;
        font-weight: bold;
    }

    &__indicator {
        @include icon(null, 22px, 22px);
        margin-left: 5px;

        &.reproduced {
            background-image: url(../../resources/icons/known-bug-reproduced.svg);
        }

        &.not-reproduced {
            opacity: 0.7;
            background-image: url(../../resources/icons/known-bug-not-reproduced.svg);
        }
    }
}

.known-bugs {
    grid-area: bugs-summary;

    &__category {
        display: grid;
        grid-template: auto / auto 1fr;
        grid-template-areas: "title container";

        &__name {
            color: $primaryTextColor;
            grid-area: title;
            padding: 5px;
        }

        &__container {
            grid-area: container;

            &__bugs {
                display: flex;
                flex-wrap: wrap;
            }
        }
    }

    &__indicator {
        grid-area: bugs-indicator;

        @include icon(null, 22px, 22px);
        margin: 7px 12px;

        &.reproduced {
            background-image: url(../../resources/icons/known-bug-reproduced.svg);
        }

        &.not-reproduced {
            background-image: url(../../resources/icons/known-bug-not-reproduced.svg);
        }
    }

    &__bug {
        border-radius: 2px;
        height: 32px;
        line-height: 22px;

        padding: 5px 7px;
        margin: 2px;

        &.reproduced {
            color: $conditionallyPassedTextColor;
            background-color: $conditionallyPassedHeaderSecondaryBackground;
        }

        &.not-reproduced {
            color: $primaryTextColor;
            background-color: $defaultCardBackground;
        }
    }
}
