﻿/* ---- Styling for pagination ----*/

.pagination-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    color: var(--primary-dark-green);
    padding-top: 0.5rem;
    padding-bottom: 1.25rem;
    align-items: center;
}

.pagination-button {
    height: 100%;
    background-color: transparent;
    border: 0;
}

.previous-button {
    display: flex;
    flex-direction: row;
    padding: 3px 10px 5px 5px;
    align-items: end;
    color: var(--primary-dark-green);
    border-radius: 4px;
}

.next-button {
    display: flex;
    flex-direction: row;
    padding: 3px 5px 5px 10px;
    align-items: end;
    color: var(--primary-dark-green);
    border-radius: 4px;
}

    .previous-button::before {
        content: '';
        background: url('../gfx/Icons/arrow-sm-left-dark-green.svg') center no-repeat;
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 0.50rem;
        position: relative;
    }

    .next-button::after {
        content: '';
        background: url(../gfx/Icons/arrow-sm-right-dark-green.svg) center no-repeat;
        width: 1.5rem;
        height: 1.5rem;
        margin-left: 0.50rem;
        position: relative;
    }

        .previous-button:hover,
        .next-button:hover {
            background-color: var(--primary-dark-green-2);
            color: var(--primary-dark-green);
            text-decoration: none;
        }

        .previous-button:active,
        .next-button:active {
            background-color: var(--primary-dark-green);
            color: var(--primary-light-green);
            text-decoration: none;
        }

            .previous-button:active .pagination-button-text::after,
            .next-button:active .pagination-button-text::after {
                content: '';
                position: absolute;
                left: 0;
                bottom: 0.03125rem;
                width: 100%;
                height: 0.15rem;
                background-color: var(--primary-light-green);
                border-radius: 3rem;
            }

            .previous-button:active::before {
                content: '';
                background: url('../gfx/Icons/arrow-sm-left-light-green.svg') center no-repeat;
                width: 1.5rem;
                height: 1.5rem;
                margin-right: 0.50rem;
                position: relative;
            }

            .next-button:active::after {
                content: '';
                background: url(../gfx/Icons/arrow-sm-right-light-green.svg) center no-repeat;
                width: 1.5rem;
                height: 1.5rem;
                margin-left: 0.50rem;
                position: relative;
            }

        .previous-button:focus-visible,
        .next-button:focus-visible {
            background-color: var(--link-color-blue);
            color: white;
            text-decoration: none;
            outline: none;
        }

        .previous-button:focus-visible .pagination-button-text::after,
        .next-button:focus-visible .pagination-button-text::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0.03125rem;
            width: 100%;
            height: 0.15rem;
            background-color: white;
            border-radius: 3rem;
        }

            .previous-button:focus-visible::before {
                content: '';
                background: url('../gfx/Icons/arrow-sm-left-white.svg') center no-repeat;
                width: 1.5rem;
                height: 1.5rem;
                margin-right: 0.50rem;
                position: relative;
            }

            .next-button:focus-visible::after {
                content: '';
                background: url(../gfx/Icons/arrow-sm-right-white.svg) center no-repeat;
                width: 1.5rem;
                height: 1.5rem;
                margin-left: 0.50rem;
                position: relative;
            }

        .previous-button:disabled,
        .next-button:disabled {
            visibility: hidden;
        }

        
/* Vertical adjustment form Firefox */
@-moz-document url-prefix() {
    .previous-button::before,
    .next-button::after {
        bottom: 2px;
    }
}

.pagination-button-text {
    width: auto;
    height: 1.6875rem;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.8rem;
    position: relative;
    margin: 0;
}

    .pagination-button-text::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0.03125rem;
        width: 100%;
        height: 0.15rem;
        background-color: var(--primary-dark-green);
        border-radius: 3rem;
    }

.hide-pagination-button {
    visibility: hidden;
}

#pagination-numbers {
    display: flex;
    align-items: end;
    column-gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-number {
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1.5rem;
    color: var(--primary-dark-green);
    background-color: transparent;
    border: 0;
    font-weight: 600;
    position: relative;
    width: auto;
    height: 2.8125rem;
    padding: 0.0625rem 0.3125rem;
    border-radius: 4px;
}

.pagination-dots {
    cursor: default;
    font-size: 1.125rem;
    line-height: 1.5rem;
    color: var(--primary-dark-green);
    font-weight: 600;
    position: relative;
    width: auto;
    height: 1.6875rem;
}

.pagination-number:hover {
    background-color: var(--primary-dark-green-2);
    color: var(--primary-dark-green);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.pagination-number:active {
    background-color: var(--primary-dark-green);
    color: var(--primary-light-green);
    text-decoration: none;
}

.pagination-number:focus-visible {
    background-color: var(--link-color-blue);
    color: white;
    text-decoration: none;
    outline: none;
}

.pagination-number.page-active {
    color: var(--primary-dark-green-3);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--primary-dark-green-3);
}

    .pagination-number.page-active:active {
        background-color: var(--primary-dark-green);
        color: var(--primary-light-green);
        text-decoration: none;
    }

    .pagination-number.page-active:focus-visible {
        background-color: var(--link-color-blue);
        color: white;
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-decoration-color: white;
        outline: none;
    }

/* Pagination for mobile */
@media only screen and (max-width: 1000px) {
    .pagination-container {
        padding-top: 1rem;
    }
}

@media only screen and (max-width: 600px) {
    .previous-button,
    .next-button {
        padding: 0;
    }

        .previous-button:focus-visible,
        .next-button:focus-visible {
            color: var(--link-color-blue);
            background-color: var(--background-color-3);
            outline: none;
        }

        .previous-button:focus-visible::before {
            content: '';
            background: url('../gfx/Icons/Arrow-xl-left-blue.svg') center no-repeat;
            width: 1.5rem;
            height: 1.5rem;
            margin-right: 0.50rem;
            position: relative;
        }

        .next-button:focus-visible::after {
            content: '';
            background: url(../gfx/Icons/Arrow-xl-right-blue.svg) center no-repeat;
            width: 1.5rem;
            height: 1.5rem;
            margin-left: 0.50rem;
            position: relative;
        }

    .pagination-number:focus-visible {
        background-color: var(--background-color-3);
        color: var(--link-color-blue);
        outline: 2px solid var(--link-color-blue);
        text-decoration: underline;
        text-decoration-thickness: 2px;
    }
}

.mobile-pagination-after::after {
    content: '';
    background: url(../gfx/Icons/Arrow-xl-right-dark-green.svg) center no-repeat;
    border: 0.125rem solid var(--primary-dark-green);
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.625rem;
    margin: 0;
    border-radius: 4px;
    position: relative;
}

.mobile-pagination-before::before {
    content: '';
    background: url(../gfx/Icons/Arrow-xl-left-dark-green.svg) center no-repeat;
    border: 0.125rem solid var(--primary-dark-green);
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.625rem;
    margin: 0;
    border-radius: 4px;
    position: relative;
}

.mobile-pagination-after:active::after,
.mobile-pagination-before:active::before {
    margin-left: 0;
    margin-right: 0;
}

.mobile-pagination-after:focus-visible::after {
    border: 0.125rem solid var(--link-color-blue);
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.625rem;
    margin: 0;
    border-radius: 4px;
}

.mobile-pagination-before:focus-visible::before {
    border: 0.125rem solid var(--link-color-blue);
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.625rem;
    margin: 0;
    border-radius: 4px;
}

.mobile-pagination-container {
    justify-content: space-between !important;
}


@media only screen and (max-width: 500px) {
    .mobile-pagination-before::before,
    .mobile-pagination-before:focus-visible::before,
    .mobile-pagination-after::after,
    .mobile-pagination-after:focus-visible::after {
        padding: 0.1875rem;
    }
}
