@use '../../flex' as flex;

.adf-document-list {
    min-height: 0;
    height: 100%;
    background-color: var(--mat-sys-surface);
}

.adf-sticky-document-list {
    height: 310px;
    overflow-y: auto;
}

.adf-datatable-card {
    .adf-datatable-selected > svg {
        fill: var(--mat-sys-primary);
        width: 30px;
        height: 30px;
        position: absolute;
        top: 10px;
    }
}

.adf-datatable-list {
    .adf-datatable-selected {
        display: inline-table;

        & > svg {
            fill: var(--mat-sys-primary);
            width: 30px;
            height: 30px;
        }
    }
}

.adf-document-list_empty_template {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.adf-no-permission__template {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 300px;

    mat-icon {
        font-size: 52px;
        height: 52px;
        width: 52px;
    }

    &--text {
        color: var(--mat-sys-on-surface);
        font-size: var(--mat-sys-title-small-size);
    }
}

.adf-document-list__this-space-is-empty {
    height: 32px;
    font: var(--mat-sys-display-medium);
}

.adf-document-list__drag-drop {
    height: 56px;
    font: var(--mat-sys-display-medium);
    margin-top: 40px;
}

.adf-document-list__any-files-here-to-add {
    height: 24px;
    font: var(--mat-sys-title-medium);
    color: var(--mat-sys-on-surface);
    margin-top: 17px;
}

.adf-document-list__empty_doc_lib {
    width: 565px;
    height: 161px;
    object-fit: contain;
    margin-top: 17px;
}

.adf-document-list-loading-margin {
    margin: auto;
}

.adf-document-list-loading-container {
    min-height: 300px;
    display: flex;
    flex-direction: row;
    height: 100%;
}

.adf-empty-list-header {
    height: 32px;
    font: var(--mat-sys-display-medium);
}

.adf-documentlist-pagination {
    color: var(--mat-sys-on-surface);

    .adf-pagination__block {
        border-right: none;
    }
}

.adf-empty-folder {
    &-this-space-is-empty {
        height: 32px;
        font: var(--mat-sys-display-medium);
    }

    &-drag-drop {
        min-height: 56px;
        font: var(--mat-sys-display-medium);
        margin-top: 40px;
        word-break: break-all;
        white-space: pre-line;

        @include flex.layout-bp(lt-sm) {
            font: var(--mat-sys-display-small);
        }
    }

    &-any-files-here-to-add {
        min-height: 24px;
        font: var(--mat-sys-title-medium);
        margin-top: 17px;
        word-break: break-all;
        white-space: pre-line;
    }

    &-image {
        width: 565px;
        max-width: 100%;
        object-fit: contain;
        margin-top: 17px;

        @include flex.layout-bp(lt-sm) {
            width: 250px;
        }
    }

    @include flex.layout-bp(lt-md) {
        &-drag-drop,
        &-any-files-here-to-add {
            display: none;
        }
    }
}

.adf-datatable-gallery-thumbnails {
    .adf-datatable-card .adf-datatable-row:is(adf-datatable-row) {
        height: 300px;

        img {
            height: 130px;
        }

        .adf-datatable-cell {
            overflow: visible;
        }

        .adf-datatable-cell.adf-datatable-cell--image {
            flex: 0 0 auto;
            display: flex;
            flex-direction: column-reverse;
            justify-content: space-between;

            .adf-cell-value {
                display: flex;
                justify-content: center;
            }
        }
    }
}
