@use '../../../src/lib/styles/flex' as flex;

$adf-pagination-height: 48px !default;
$adf-pagination-border: none !default;
$adf-pagination-line-height: 20px;

.adf-pagination {
    display: flex;
    border-top: $adf-pagination-border;
    height: $adf-pagination-height;
    line-height: $adf-pagination-line-height;
    color: var(--adf-theme-foreground-text-color);

    &__block {
        display: flex;
        align-items: center;
        padding: 0 8px;
        border-right: $adf-pagination-border;

        &:first-child {
            flex: 1 1 auto;
            padding-left: 24px;
        }

        &:last-child {
            border-right-width: 0;
        }
    }

    @include flex.layout-bp(lt-sm) {
        & {
            flex-wrap: wrap;
            padding: 0 16px;
            justify-content: space-between;
        }

        &__range-block,
        &__perpage-block {
            display: none;
        }

        &__actualinfo-block {
            border-right: none;
        }

        &__controls-block {
            padding-right: 0;
        }
    }

    &__max-items {
        margin-left: 10px;
    }

    &__max-items,
    &__current-page {
        margin-right: 5px;

        &,
        & + button {
            color: var(--adf-theme-foreground-text-color);
        }

        & + button {
            margin-left: -10px;
        }
    }

    &__previous-button,
    &__next-button {
        margin: 0 5px;
    }

    &__page-selector {
        max-height: 250px;
    }

    &.adf-pagination__empty {
        border-top: $adf-pagination-border;
        height: $adf-pagination-height;
    }

    button[mat-icon-button] {
        line-height: $adf-pagination-line-height;
    }
}
