//
// 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 5px 0 0;
  vertical-align: top;
  &:first-child {
    margin: 5px 0 0;
  }
}
.pagination ul > li > a,
.pagination ul > li > span {
  float: right; // 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-left: 5px;
  	//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-right-radius(@baseBorderRadius);
}
.pagination ul > li:last-child > a,
.pagination ul > li:last-child > span {
  .border-left-radius(@baseBorderRadius);
}


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

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


// 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-right-radius(@borderRadiusLarge);
  }
  ul > li:last-child > a,
  ul > li:last-child > span {
    .border-left-radius(@borderRadiusLarge);
  }
}

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