$pager-dimension: 24px;

// Contains the pager's direcion buttons and index.
.pager {
    display: inline;
    border: 1px solid #c0c0c0;
    border-radius: 2px;
    background-color: white;
    align-items: center;

    > ul {
        display: flex;
        padding: 0;
        margin: 0;
        height: 100%;

        > li {
            list-style: none;
        }
    }
}

// Pager's direction buttons.
.pager__dir {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: $pager-dimension;
    width: $pager-dimension;
    height: 100%;
    border: none;
    background-color: transparent;
    color: $std-href-color;

    &:hover {
        background-color: #e0e0e0;
    }

    &:disabled {
        fill: #a0a0a0;
        background-color: #fff;
        cursor: default;
    }
}

// Pager index (x OF y)
.pager__index {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding-left: 10px;
    padding-right: 10px;
    min-height: $pager-dimension;
    height: 100%;
    font-weight: bold;
    border-left: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
}

$pager-height: 24px;
$pager-arrow-width: 24px;

.pager-multi {
    display: flex;

    > ul {
        display: flex;
        margin: 0;
        padding: 0;
        height: $pager-height;

        > li {
            display: block;
            list-style-type: none;
            border-top: 1px solid #c0c0c0;
            border-bottom: 1px solid #c0c0c0;
            border-left: 1px solid #c0c0c0;

            &:last-child {
                border-right: 1px solid #c0c0c0;
            }

            &.pager-multi__page {
                flex: 0 1 auto;
                text-align: center;

                button {
                    display: block;
                    width: 100%;
                    height: 100%;
                    padding-left: 5px;
                    padding-right: 5px;
                    line-height: 1rem;
                    font-size: 1rem;
                    font-weight: bold;
                    border: none;
                    background-color: transparent;
                    border-radius: 0;
                    cursor: pointer;

                    svg {
                        display: block;
                        height: 100%;
                        margin: 0 auto;
                    }

                    &:hover {
                        background-color: #e0e0e0;
                    }

                    &:focus {
                        border-radius: 0;
                    }
                }

                &.pager-multi__page--arrow {
                    width: $pager-arrow-width;

                    button {
                        padding: 5px 0;
                        font-size: 0;
                    }
                }

                &.pager-multi__page--arrow-disabled {
                    button {
                        fill: #c0c0c0;

                        &:hover {
                            background-color: transparent;
                        }
                    }
                }

                &.pager-multi__page--skip {
                    border-top: none;
                    border-bottom: none;
                }
            }

            &.pager-multi__page--current {
                button {
                    color: #fff;
                    background-color: #4f689e;

                    &:hover {
                        background-color: #4f689e;
                    }
                }
            }
        }
    }
}
