/**
 * Pagination Styles
 * Modern, centered pagination system with RTL support
 */

/* Pagination Container - Uses Grid for bulletproof centering */
.pagination-container {
    display: grid;
    place-items: center;  /* Centers both horizontally and vertically */
    width: 100%;
    margin: 30px 0;
    padding: 0;
    clear: both;
}

/* Pagination Navigation - No background */
.pagination-nav {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Pagination List - Single line with horizontal scroll */
.pagination-list {
    display: flex;
    flex-wrap: nowrap;  /* Keep all items in one line */
    justify-content: center;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    overflow-x: auto;  /* Allow horizontal scrolling if needed */
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;  /* Smooth scrolling on mobile */
    scrollbar-width: thin;  /* Firefox */
    scrollbar-color: #ddd transparent;  /* Firefox */
}

/* Hide scrollbar for Chrome/Safari/Edge */
.pagination-list::-webkit-scrollbar {
    height: 6px;
}

.pagination-list::-webkit-scrollbar-track {
    background: transparent;
}

.pagination-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.pagination-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Pagination Items */
.pagination-item {
    display: flex;
    align-items: center;
    margin: 0;
    flex-shrink: 0;  /* Prevent items from shrinking */
}

/* Minimalistic Pagination Buttons */
.pagination-btn,
.pagination-active,
.pagination-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: none;  /* Minimalistic - no borders */
}

/* Regular Pagination Button - Simple gray background */
.pagination-btn {
    background: #f0f0f0;
    color: #555;
}

.pagination-btn:hover {
    background: #e0e0e0;
    color: #000;
}

.pagination-btn:active {
    background: #d0d0d0;
}

/* Active Page Button - Simple solid color */
.pagination-active {
    background: #333;
    color: #fff;
    font-weight: 500;
    cursor: default;
}

/* Ellipsis - Minimal */
.pagination-dots {
    background: transparent;
    color: #999;
    padding: 6px 4px;
    cursor: default;
    min-width: 24px;
    font-weight: bold;
}

/* Pagination Info Text */
.pagination-info {
    margin-top: 15px;
    padding: 0;
    color: #666;
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.pagination-info strong {
    color: #333;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .pagination-btn,
    .pagination-active {
        min-width: 32px;
        height: 32px;
        padding: 5px 8px;
        font-size: 13px;
    }

    .pagination-list {
        gap: 3px;
        padding: 8px 5px;
    }

    .pagination-container {
        padding: 0 5px;
        margin: 20px 0;
    }

    .pagination-info {
        font-size: 12px;
        margin-top: 10px;
    }
}

@media (max-width: 400px) {
    .pagination-btn,
    .pagination-active {
        min-width: 30px;
        height: 30px;
        padding: 4px 7px;
        font-size: 12px;
    }

    .pagination-list {
        gap: 2px;
    }

    .pagination-info {
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .pagination-container {
        display: none;
    }
}
