@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;
        }
    }

    &__sliding-panel-pagination-wrap {
        margin-top: 1.25em;
    }

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

    &__refreshing-label {
        color: $white-color;
        position: fixed;
        top: $header + 100px;
        left: 50%;
        background-color: $argo-color-gray-7;
        border: 1px solid $argo-color-gray-5;
        border-radius: 5px;
        padding: 5px 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;
        }
    }

    .graph-options-panel {
        margin-left: 10px;
        z-index: 10;
        padding: 5px;
        display: inline-block;
        background-color: $argo-color-gray-1;
        box-shadow: 1px 1px 3px $argo-color-gray-5;
        position: fixed;
      
        a {
            padding: 5px;
            margin: 2px;
            color: $argo-color-gray-6;
            border: 1px solid transparent;
            border-radius: 5px;

            &.group-nodes-button {
                cursor: pointer;
                position: relative;
                display: inline-block;
                vertical-align: middle;
                font-size: 13px;
                font-weight: 500;
                line-height: 1.4;
                text-align: center;
                user-select: none;
                transition: background-color .2s, border .2s, color .2s;
                text-transform: uppercase;
                &:hover {
                    background-color: #d1d5d9;
                }
                &:active {
                    transition: background-color .2s, border .2s, color .2s;
                    border: 1px $argo-color-teal-5 solid;
                }
            }
        
            &.group-nodes-button-on {
                color: $argo-color-gray-1;
                background-color: $argo-color-gray-6;
                &:hover {
                    background-color: $argo-color-gray-5;
                }
            }    
        }

        .zoom-value {
            user-select: none;
            margin-top: 3px;
            margin-right: 6px;
            margin-left: 4px;
            font-size: 14px;
            text-align-last: right;
            float: right;
            width: 40px;
            border: 1px $argo-color-gray-5 solid;
            background-color: $argo-color-gray-3;
            padding: 2px;
        }
     }  
}
