// Copyright (C) 2020-2022 Intel Corporation
//
// SPDX-License-Identifier: MIT

@import '../../base.scss';

.cvat-projects-page {
    padding-top: $grid-unit-size * 2;
    padding-bottom: $grid-unit-size;
    height: 100%;
    width: 100%;

    .cvat-projects-page-top-bar {
        > div:nth-child(1) {
            > div:nth-child(1) {
                width: 100%;

                > div:nth-child(1) {
                    display: flex;

                    span {
                        margin-right: $grid-unit-size;
                    }
                }
            }
        }
    }

    > div:nth-child(1) {
        padding-bottom: $grid-unit-size;

        div > {
            span {
                color: $text-color;
            }
        }
    }
}

.cvat-empty-projects-list {
    .ant-empty {
        top: 50%;
        left: 50%;
        position: absolute;
        transform: translate(-50%, -50%);
    }
}

.cvat-projects-page-control-buttons-wrapper {
    display: flex;
    flex-direction: column;
    background: $background-color-1;
    padding: $grid-unit-size;
    border-radius: 4px;
    box-shadow: $box-shadow-base;

    > * {
        &:not(:first-child) {
            margin-top: $grid-unit-size;
        }

        width: 100%;

        .ant-upload {
            width: 100%;

            button {
                width: 100%;
            }
        }
    }
}

.cvat-projects-page-top-bar {
    > div {
        display: flex;
        justify-content: space-between;

        > .cvat-projects-page-filters-wrapper {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;

            > div {
                > *:not(:last-child) {
                    margin-right: $grid-unit-size;
                }

                display: flex;
                margin-right: $grid-unit-size * 4;
            }

            .cvat-projects-page-search-bar {
                width: $grid-unit-size * 32;
                padding-left: $grid-unit-size * 0.5;
            }
        }
    }
}

.cvat-projects-pagination {
    display: flex;
    justify-content: center;
}

.ant-menu.cvat-project-actions-menu {
    box-shadow: 0 0 17px rgba(0, 0, 0, 0.2);

    > li:hover {
        background-color: $hover-menu-color;
    }

    .ant-menu-submenu-title {
        margin: 0;
        width: 13em;
    }
}

.cvat-projects-project-item-card {
    .cvat-projects-project-item-card-preview {
        .ant-empty {
            margin: $grid-unit-size;
            height: inherit;
            display: grid;

            > div:first-child {
                margin: auto;
            }
        }

        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-around;
        object-fit: cover;
        cursor: pointer;
    }

    .cvat-projects-project-item-title {
        cursor: pointer;
    }

    .cvat-porjects-project-item-description {
        display: flex;
        justify-content: space-between;

        // actions button
        > div:nth-child(2) {
            display: flex;
            align-self: flex-end;
            justify-content: center;

            > button {
                color: $text-color;
                width: inherit;
            }
        }
    }

    .ant-card-cover {
        flex: 1;
        height: 0;
    }

    width: 25%;
    border-width: 4px;
    display: flex;
    flex-direction: column;
}

.cvat-project-list-content {
    padding-bottom: $grid-unit-size;
}

.cvat-projects-list {
    display: flex;
    flex-wrap: wrap;
}

.cvat-export-project-loading {
    margin-left: 10;
}

.cvat-import-project-button-loading {
    margin-left: 10;
}
