@import 'node_modules/argo-ui/src/styles/config';
@import 'node_modules/foundation-sites/scss/util/util';
@import 'node_modules/argo-ui/src/styles/theme';

.help-tip {
    color: $argo-color-gray-4;
}

@mixin responsive-widths {
    @include breakpoint(large up) {
        max-width: 250px;
    }
    @include breakpoint(xlarge up) {
        min-width: 250px;
        max-width: 300px;
    }
    @include breakpoint(xxlarge up) {
        min-width: 325px;
        max-width: 350px;
    }
    @include breakpoint(xxxlarge up) {
        min-width: 375px;
        max-width: 450px;
    }
}

.application-status-panel {
    font-size: 0.875em;
    @include themify($themes) {
        background-color: themed('background-2');
        color: themed('text-1');
    }
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap;
    flex-shrink: 1;
    overflow-x: auto;
    padding-bottom: 0.5em;

    $row-width: 250px;

    &__conditions {
        display: flex;
        max-width: 250px;
        margin: auto;
        flex-wrap: wrap;
        justify-content: center;
        line-height: 1.5em;
        a {
            display: block;
            margin-right: 12px;
        }
    }

    &__more-button {
        margin-left: auto;
        font-size: 14px;
        line-height: 20px;
        display: flex;
        padding: 1px 5px;
        cursor: pointer;
        color: $argo-color-gray-6;
        border: 1px solid $argo-color-gray-5;
    }

    &__item {
        margin-top: 5px;
        padding: 5px 20px;
        font-size: 0.8em;
        line-height: 1.2;
        @include themify($themes) {
            color: themed('text-1');
        }
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex-shrink: 0;
        flex-grow: 0;

        &__row {
            display: flex;
            max-width: $row-width;
            margin-bottom: 0.25em;
            flex-shrink: 1;
            div:first-child {
                width: 80px;
                margin-right: 10px;
                text-align: right;
            }
            div:last-child {
                font-weight: 500;
                width: 100%;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: left;
            }

            @include responsive-widths();
        }

        &:first-child {
            margin-top: 7px;
        }

        &:not(:first-child) {
            @include themify($themes) {
                border-left: 1px solid themed('border');
            }
        }

        & {
            a.error {
                color: $argo-failed-color-dark;
            }
        }
        & {
            a.warning {
                color: $argo-status-warning-color;
            }
        }
        & {
            a.info {
                color: $argo-success-color;
            }
        }

        label {
            display: block;
            @include themify($themes) {
                color: themed('text-1');
            }
            font-size: 13px;
            margin-right: 10px;
        }

        max-width: 100%;
        width: auto;
    }

    &__item-value {
        display: flex;
        align-items: center;
        margin-bottom: 0.5em;
        font-weight: 500;
        padding: 2px 0px;
        .fa {
            font-size: 1em;
        }

        font-size: 2em;
        @include themify($themes) {
            color: themed('text-1');
        }
        &--highlight {
            color: $argo-color-teal-6;
        }

        &--Running a,
        &--Terminating a {
            color: $argo-running-color;
        }

        &--Error a,
        &--Failed a {
            color: $argo-failed-color;
        }

        &--Succeeded a {
            color: $argo-success-color;
        }

        i {
            font-size: 0.6em;
        }

        &__revision {
            font-size: 14px;
            @include themify($themes) {
                color: themed('text-1');
            }
            font-weight: 500;
            padding-left: 8px;
            margin-bottom: 2px;
        }

        &__status-button {
            display: inline;
            border-radius: 5px;
            padding: 2px;
            border: 1px solid $argo-color-gray-5;
            &:hover {
                background-color: $argo-color-gray-4;
            }
        }

    }

    &__hydrator-link {
        width: 134px;
    }

    &__item-name {
        margin: auto 0;
        max-width: $row-width;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        i {
            position: relative;
            top: -2px;
        }
        @include responsive-widths();
    }
    &__item-name,
    &__item-value {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
