/**
 * CM Pagination Library Styles
 */

.cm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.cm-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cm-page-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #999;
}

.cm-page-btn:active:not(:disabled) {
    background-color: #e0e0e0;
}

.cm-page-btn.cm-page-current {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
    cursor: default;
}

.cm-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cm-page-prev,
.cm-page-next {
    font-weight: 600;
}

.cm-page-dots {
    padding: 8px 4px;
    color: #666;
    font-size: 14px;
}

/* Loading state */
.cm-pagination-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cm-pagination-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #2271b1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cm-spin 0.6s linear infinite;
}

@keyframes cm-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Pagination info */
.cm-pagination-info {
    text-align: center;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .cm-pagination {
        gap: 4px;
    }

    .cm-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .cm-page-dots {
        padding: 6px 2px;
        font-size: 13px;
    }
}
