/* WORKING PAGINATION CSS */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: 15px;
    background: #000;
}

.pagination-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-button {
    background: #000;
    color: #ffc939;
    border: 1px solid #ffc939;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.pagination-button.active {
    background: #ffc939;
    color: #000;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DROPDOWN THAT ACTUALLY WORKS */
.page-select-wrapper {
    position: relative;
}

/* FIX DROPDOWN POSITION AND ARROW */
.page-select-button {
    background-color: #000;
    color: #ffc939;
    border: 1px solid #ffc939;
    border-radius: 8px;
    height: 32px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    gap: 6px;
    min-width: 60px;
}

/* MAKE ARROW VISIBLE */
.page-select-button .dropdown-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.3s ease;
    fill: #ffc939; /* THIS MAKES IT VISIBLE */
}

.page-select-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* DROPDOWN GOES UP, NOT DOWN */
.page-select-popup {
    position: absolute;
    bottom: 100%; /* THIS MAKES IT GO UP */
    right: 0;
    background: #000;
    border-radius: 8px;
    border: 1px solid #ffc939;
    margin-bottom: 8px; /* SPACE ABOVE BUTTON */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1003;
    width: 70px;
    max-height: 200px;
    overflow-y: auto;
    text-align: center;
}

.page-select-wrapper.active .page-select-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* CENTER DROPDOWN NUMBERS */
.page-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
}

.page-list-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
    min-width: 50px;
    color: #ffc939;
    border-bottom: 1px solid #333;
    width: 100%;
}

.page-list-item:hover {
    background: #1a1a1a;
}

.page-list-item:last-child {
    border-bottom: none;
}

#page-display {
    text-align: center;
    color: #ffc939;
    margin-top: 10px;
}

/* Hide on modals */
body.modal-open .pagination-container {
    display: none !important;
}

/* Responsive */
@media (max-width: 360px) {
    .pagination-pages { gap: 4px; }
    .pagination-button { 
        padding: 6px 10px;
        font-size: 11px;
    }
    .page-select-button {
        height: 28px;
        font-size: 11px;
        padding: 0 10px;
        min-width: 50px;
    }
    .page-select-popup {
        width: 60px;
    }
}

.pagination-ellipsis {
    color: #ffc939;
    font-size: 12px;
    margin: 0 4px;
    align-self: center;
    user-select: none;
}