.module {
  margin: 20px 0;
}

.module-heading {
  .clearfix;
  margin: 0;
  padding: 7px @gutterX;
  font-size: 14px;
  line-height: 1.3;
  background-color: @moduleHeadingBackgroundColor;
  border-top: 1px solid @moduleHeadingBorderColor;
  border-bottom: 1px solid @moduleHeadingBorderColor;
}

.module-content {
  padding: 0 @gutterX;
  margin: 20px 0;
}
@media (min-width: 768px) {
  .span9 div.module-content {
    padding-left:10px;
  }
}

.module-content:first-child {
  margin-top: 0;
  padding-top: @gutterY;
}

.module-content:last-child {
  margin-bottom: 0;
  padding-bottom: @gutterY;
}

.module-content > :last-child {
  margin-bottom: 0;
}

.module:first-child .module-heading {
  .border-radius(3px 0 0 0);
  border-top-width: 0;
}

.module:last-child {
  margin-bottom: 20px;
}

.module-footer {
  padding: 7px @gutterX 7px;
  margin: 0;
  border-top: 1px dotted @genericBorderColor;
}

.module .read-more {
  font-weight: bold;
  color: @layoutBoldColor;
}

.module .pagination {
  height: 34px;
  margin-bottom: 0;
  border-top: 1px solid @moduleHeadingBorderColor;
}

.module-content .pagination {
  margin-left: -25px;
  margin-right: -25px;
  margin-bottom: -20px;
}

.module .pagination > ul {
  .border-radius(0);
  .box-shadow(none);
  border: 0;
}

.module .pagination li a {
  border-top: none;
  border-bottom: none;
  padding-top: 7px;
  padding-bottom: 7px;
}

.module .pagination li:first-child a,
.module .pagination li:last-child a {
  .border-radius(0);
}

.module .pagination li:first-child a {
  border-left-width: 0;
}

.module .pagination li:last-child a {
  border-right-width: 0;
}

.module .pagination li.active a {
  border-left-width: 1px;
  border-right-width: 1px;
}

.module-content-shallow {
  padding: 0;
  margin-top: 10px;
  padding-bottom: 10px;
}

.module h1 {
  margin-bottom: 20px;
}

// Module Shallow

.module-shallow .module-content {
  padding: 10px;
  margin: 0;
}

.module-shallow .module-tags {
  margin-top: 0;
  margin-bottom: 0;
}

.module-shallow .module-content:first-child {
  padding-top: 10px;
}

.module-shallow .module-content:last-child {
  padding-bottom: 10px;
}

// Secondary column specific

.module-narrow {
  .module-heading,
  .module-content,
  .module-footer {
    padding-left:  @gutterSmallX;
    padding-right: @gutterSmallX;
  }
}

// Module Grid

.module-grid {
  .unstyled;
  .media-grid;
  // .media-wide;
}

.module-item {
  .media-item;
  .makeColumn(6);
  padding-top: 10px;
  padding-bottom: 10px;
  padding-right: 50px;
  overflow: hidden;
  position: relative;
}

.module-item.first {
  clear: left;
}

// GROUP

.group .content img {
  margin: 0 -5px 5px;
  max-width: initial;
}

.group .content h3 {
  font-size: 14px;
  line-height: 1.3;
}

.group-listing {
  margin-left: -20px; // Same as .row
}

// PREVIEW

.ckanext-datapreview {
  position: relative;
  clear: both;

  padding-top: 15px;
  margin-top: 0;

  & > iframe {
    min-height: 400px;
  }
  & > img {
    max-height: 500px;
    max-width: 100%;
    overflow: hidden;
  }
}

.package-info {
  h4 {
    margin-bottom: 10px;
  }
}

.module-resource {
  background-color: @layoutTrimBackgroundColor;
  border-bottom: 1px solid @genericBorderColor;
  margin-top: 0;
  margin-bottom: 0;
  .border-radius(3px 3px 0 0);
  .actions {
    position: relative;
    float: right;
    top: -10px;
    right: -15px;
  }
}

.module .module-tags {
  padding-bottom: 8px;
}

.secondary,
.primary {
  .module:first-child {
    margin-top: 0;
  }
}

.no-nav .module:last-child {
  margin-top: 0;
}

.module-image {
  float: left;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  margin-right: 15px;
  img {
    max-width: 50px;
    max-height: 50px;
    vertical-align: middle;
  }
}
