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

$header: 120px;

.application-details {
    &__status-panel {
        position: fixed;
        left: 60px;
        right: 0;
        z-index: 2;
        @media screen and (max-width: map-get($breakpoints, xlarge)) {
            top: 150px;
        }
        @media screen and (max-width: map-get($breakpoints, large)) {
            top: 146px;
        }
    }

    .argo-dropdown__content.is-menu {
        max-height: 500px;
    }

    &__tree {
        position: relative;
        padding: 1em;
        overflow-x: auto;
        overflow-y: auto;
        margin-top: 115px;
        min-height: calc(100vh - 2 * 50px - 115px);
        @media screen and (max-width: map-get($breakpoints, xlarge)) {
            margin-top: 165px;
        }
    }

    &__warning {
        font-size: 0.8em;
        color: darken($argo-status-warning-color, 20%);
        min-height: 1.2rem;
    }

    &__refreshing-label {
        position: fixed;
        top: $header + 100px;
        left: 310px;
        background-color: $argo-color-gray-4;
        border: 1px solid $argo-color-gray-5;
        border-radius: 5px;
        padding: 0 5px;
        font-size: 0.6em;
    }

    &__tab-content-full-height {
        height: calc(100vh - 2 * 76px);
        div.row,
        div.columns {
            height: 100%;
        }
    }

    &__container {
        position: relative;
        text-transform: uppercase;
        margin-top: 0.5em;
        cursor: pointer;
        font-size: 0.8em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 10px;

        i {
            position: absolute;
            left: 0px;
            top: 2px;
        }

        span {
            color: $argo-color-teal-5;
        }
    }

    &__resource-icon {
        text-align: center;
        position: absolute;
        left: 0;
        top: 10px;
        width: 60px;
        line-height: 1;
        color: $argo-color-gray-7;
        font-size: 0.8em;
    }

    .application-resource-tree {
        margin: 0 auto;
    }

    &__view-type {
        margin-bottom: -6px;
        display: inline-block;
        vertical-align: middle;
        white-space: nowrap;
        i {
            cursor: pointer;
            color: $argo-color-gray-5;
            margin: 0 0.5em;
            &::before {
                font-size: 1.5em;
            }
        }
        i.selected {
            cursor: default;
            color: $argo-color-gray-7;
        }
    }

    &__node-menu {
        position: absolute;
        right: 0;
        top: 0;
    }

    &__external_link {
        margin-left: 5px;
    }

    pre {
        font-family: monospace;
        line-height: normal;
        white-space: pre;
    }

    &__action-menu {
        text-transform: capitalize;

        &.disabled {
            cursor: default !important;
            color: $argo-color-gray-3 !important;
        }
    }

    .argo-table-list__row {
        .columns.small-1.xxxlarge-1 {
            width: 60px;
            text-align: center;
        }
    }

    @media screen and (max-width: map-get($breakpoints, xlarge)) {
        .page__content-wrapper {
            min-height: calc(100vh - 3 * 50px);
        }
        .top-bar.row {
            display: block;
            .top-bar__left-side,
            .top-bar__right-side {
                width: 100%;
                max-width: 100%;
                flex: auto;
            }
            .top-bar__left-side {
                .argo-button {
                    i {
                        @media screen and (max-width: map-get($breakpoints, large)) {
                            margin: 0 auto !important;
                        }
                    }
                }
            }
        }
    }

    @media screen and (max-width: map-get($breakpoints, large)) {
        .top-bar.row {
            .top-bar__left-side {
                > div {
                    display: flex;
                    justify-content: center;
                    height: 50px;
                    align-items: center;
                    .argo-button {
                        height: 34px;
                    }
                }
            }
            .top-bar__right-side {
                display: flex;
                justify-content: center;
            }
        }
    }

    &__commit-message {
        line-height: 1.5em;
    }

    .filters-group__panel {
        top: 230px;
    }
    @include breakpoint(large down) {
        .filters-group__panel {
            top: 280px;
        }
    }
}
