//
// Pagination (multiple pages)
// --------------------------------------------------

// Space out pagination from surrounding content
.pagination {
  padding: @JMbaseSpace 0 0;
  margin: -5px 0 0;
  text-align: center;
  clear: both;
  display: inline-block;
  vertical-align: top;
  width: 100%;
}

.pagination ul {
  // Allow for text-based alignment
  display: inline-block;
  .ie7-inline-block();
  .border-radius(@baseBorderRadius);
}
.pagination ul > li {
  display: inline-block; // Remove list-style and block-level defaults //JM edited
  background: none;
  padding: 0;
  margin: 5px 0 0 5px;
  vertical-align: top;
  &:first-child {
    margin: 5px 0 0;
  }
}
.pagination ul > li > a,
.pagination ul > li > span {
  float: left; // Collapse white-space
  text-decoration: none;
  line-height: @baseLineHeight;
  display: inline-block;
  padding: 15px 20px;
  .transition(all 0.2s ease-in);
  text-decoration: none;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: @JMstylePaginationFontColor;
	background: @JMpaginationBackground;
  .border-radius(@baseBorderRadius);
  &:hover {
    color: @JMpaginationFontColorHover;
		background: @JMstylePaginationBackgroundHover;
  }
}

.pagination ul > li.active > a,
.pagination ul > li > span.pagenav {
  color: @JMpaginationFontColorHover;
	background: @JMstylePaginationBackgroundHover;
}

.pagination {
  ul li.pagination-start span.pagenav,
  ul li.pagination-prev span.pagenav,
  ul li.pagination-next span.pagenav,
  ul li.pagination-end span.pagenav {
    color: @JMpaginationInactiveFontColor;
		background: @JMpaginationBackground;
    &:hover {
      color: @JMpaginationInactiveFontColor;
			background: @JMpaginationBackground;
    }
  }
}

.pagination {
  ul li.pagination-prev {
  	margin-right: 15px;
  }
  ul li.pagination-next {
  	margin-left: 20px;
  }
}

p.counter {
  float: none !important;
  margin: 0 0 10px;
  text-align: center;
}

.pagination ul > li > a:hover,
.pagination ul > li > a:focus,
.pagination ul > .active > a,
.pagination ul > .active > span {
  color: @JMpaginationFontColorHover!important;
}

.pagination ul > .active > a,
.pagination ul > .active > span {
  color: @white;
  cursor: default;
}
.pagination ul > .disabled > span,
.pagination ul > .disabled > a,
.pagination ul > .disabled > a:hover,
.pagination ul > .disabled > a:focus {
  cursor: default;
}
.pagination ul > li:first-child > a,
.pagination ul > li:first-child > span {
  .border-left-radius(@baseBorderRadius);
}
.pagination ul > li:last-child > a,
.pagination ul > li:last-child > span {
  .border-right-radius(@baseBorderRadius);
}


// Alignment
// --------------------------------------------------

.pagination-centered {
  text-align: center;
}
.pagination-right {
  text-align: right;
}


// Sizing
// --------------------------------------------------

// Large
.pagination-large {
  ul > li > a,
  ul > li > span {
    padding: @paddingLarge;
    font-size: @fontSizeLarge;
  }
  ul > li:first-child > a,
  ul > li:first-child > span {
    .border-left-radius(@borderRadiusLarge);
  }
  ul > li:last-child > a,
  ul > li:last-child > span {
    .border-right-radius(@borderRadiusLarge);
  }
}

// Small and mini
.pagination-mini,
.pagination-small {
  ul > li:first-child > a,
  ul > li:first-child > span {
    .border-left-radius(@borderRadiusSmall);
  }
  ul > li:last-child > a,
  ul > li:last-child > span {
    .border-right-radius(@borderRadiusSmall);
  }
}

// Small
.pagination-small {
  ul > li > a,
  ul > li > span {
    padding: @paddingSmall;
    font-size: @fontSizeSmall;
  }
}
// Mini
.pagination-mini {
  ul > li > a,
  ul > li > span {
    padding: @paddingMini;
    font-size: @fontSizeMini;
  }
}
