﻿.pagination {
    display: flex;
    position: absolute;
    right: 0;
    top: 0;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 10px 10px 0 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 38px;
    font-size: 14px;
    cursor: pointer;
}

    .page-link:hover {
        background-color: #f8f9fa;
        border-color: #169e58;
    }

    .page-link.current {
        background-color: #169e58;
        color: white;
        border-color: #169e58;
        font-weight: bold;
    }

    .page-link.disabled {
        color: #333;
        pointer-events: none;
        background-color: #f8f9fa;
        border-color: #dee2e6;
        opacity: 0.6;
    }

    .page-link.ellipsis {
        color: #6c757d;
        pointer-events: none;
        background-color: transparent;
        border-color: transparent;
        min-width: 20px;
        padding: 8px 6px;
    }

    .page-link.first, .page-link.last {
        font-weight: bold;
        min-width: 45px;
        background-color: #f8f9fa;
        border-color: #dee2e6;
    }

        .page-link.first:hover, .page-link.last:hover {
            background-color: #e9ecef;
            border-color: #169e58;
        }

    .page-link.prev, .page-link.next {
        font-weight: bold;
        min-width: 45px;
    }

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }

    .page-link {
        padding: 6px 8px;
        min-width: 35px;
        height: 34px;
        font-size: 12px;
    }

        .page-link.first, .page-link.last,
        .page-link.prev, .page-link.next {
            min-width: 35px;
            font-size: 12px;
        }

        .page-link.ellipsis {
            min-width: 15px;
            padding: 6px 4px;
        }
}

/* Дополнительные стили для лучшего UX */
.page-link {
    position: relative;
}


    .page-link.disabled:hover::after {
        display: none;
    }

#pagination-container-bottom {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
