// Site Globe Style
body {
  background: url(<%= asset_path 'bg_pattern.png' %>) 0 0 #ededed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
// Nav Bar
.nav-bar {
  margin-bottom: 0;
}
// Stars
.stars-rank {
  .stars-container {
    color: #fc602f;
    line-height: 1em;
    position: relative;
    display: inline-block;
    float: left;
    &:after {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      @include seticon("entypo", "\e01c \e01c \e01c \e01c \e01c");
    }
  }
  .star-rating {
    position: relative;
    display: inline-block;
    overflow: hidden;
    z-index: 1;
    &:after {
      @include seticon("entypo", "\e01b \e01b \e01b \e01b \e01b");
    }
  }
  .stars-count {
    float: left;
    color: #898989;
    margin-left: 0.5em;
    font-size: 0.85em;
  }
  @include clearfix;
}

// Header
.header {
  // height: 350px;
  background-color: #cccccc;
  margin-bottom: 3em;
  @include box-shadow(0, 2px, .8em, #b3b3b3, outset);
}
.carousel-inner {
  margin: auto;
  max-width: 1300px;
}
// Footer
.footer {
  color: #818181;
  padding: 2em 0;
  margin-top: 4em;
  border-top: 1px solid #ddd;
  background-color: #FFF;
  .footer-links {
    h3 {
      margin: 0 0 0.5em;
      font-size: 1em;
      color: #777;
    }
    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      font-size: 0.85em;
    }
    a {
      color: #939393;
      &:hover {
        color: #747474;
        text-decoration: none;
      }
    }
  }
  .copyright {
    margin-top: 2em;
    padding-top: 0.5em;
    font-size: 0.85em;
    line-height: 32px;
    border-top: 1px dotted #c3c3c3;
    .logo {
      float: right;
      display: inline-block;
      height: 32px;
      width: 32px;
    }
    .orbit-logo {
      margin-right: 1em;
      padding-left: 0;
      background-position: center center;
      background-size: 30px 30px;
    }
    .ruling-logo {
      background-position: center center;
      background-repeat: no-repeat;
      background-image: url(<%= asset_path 'ruling-logo.svg' %>);
      background-image: url(<%= asset_path 'ruling-logo.png' %>)\9;
      background-size: 26px 26px;
    }
    @include clearfix;
  }
}
// Top Navigation
.orbit-logo {
  color: #FFF!important;
  padding-left: 45px;
  background-size: 25%;
  background-position: left center;
  background-repeat: no-repeat;
  background-image: url(<%= asset_path 'orbit-logo.svg' %>);
  background-image: url(<%= asset_path 'orbit-logo.png' %>)\9;
}

// Item & Card
.item-list {
  background-color: #fff;
  @include border-radius(0.5em, 0.5em, 0.5em, 0.5em);
  @include box-shadow(0, 0, .8em, #b3b3b3, outset);
  @include clearfix;
}
.card-content {
  float: left;
  border-right: 1px dotted #cfcfcf;
  .card-inner {
    padding: 1em;
    position: relative;
    @include clearfix;
  }
  .cover {
    position: relative;
    .details-link {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
  .details {
    .item-title {
      margin-top: 0;
      font-size: 1.2em;
      a {
        color: #474747;
        width: 100%;
        display: block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
    .developer-title {
      @extend .item-title;
      font-size: 0.85em;
      a {
        display: inline;
      }
    }
    .price-container {
      margin: 0;
      font-size: 0.85em;
      display: inline-block;
      color: #6C8B1A;
      font-weight: 700;
    }
  }
  &.apps {
    .cover {
      float: left;
      margin-right: 1em;
    }
    .details {
      display: inline-block;
      width: calc(100% - 100px - 1em);
    }
  }
  &.templates {
    .cover {
      margin-bottom: 1em;
      img {
        width: 100%;
        height: auto;
      }
    }
    .developer-title {
      display: inline-block;
      margin-bottom: 0;
    }
    .price-container {
      float: right;
    }
  }
}
// Heading Title
.heading {
  padding: 0.5em 0;
  margin: 0 0 0.5em;
  // border-bottom: 1px dotted #c3c3c3;
  @include clearfix;
  .heading-title {
    float: left;
    color: #515151;
    font-size: 1.5em;
    text-shadow: 0 1px #FFF;
    margin: 0 0.8em 0 0;
  }
  .more {
    line-height: 2.2em;
    font-size: 0.85em;
    float: left;
    a {
      color: #8e8e8e;
    }
    &:after {
      color: #8e8e8e;
      float: right;
      @include seticon("entypo", "\e0d0");
    }
  }
}
// Cluster Block
.cluster {
  margin-bottom: 3em;
  &:last-child {
    margin-bottom: 0;
  }
  .card-content {
    @media (max-width: $screen-xs-min) {
      width: 100%;
      border-right: none;
      &:nth-child(n+2) {
        border-top: 1px dotted #cfcfcf;
      }
    }
    @media (min-width: $screen-xs-min) and (max-width: $screen-sm-max) {
      width: 50%;
      &:nth-child(2n) {
        border-right: none;
      }
      &:nth-child(n+3) {
        border-top: 1px dotted #cfcfcf;
      }
    }
    @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
      width: 33.333%;
      &:nth-child(3n) {
        border-right: none;
      }
      &:nth-child(n+4) {
        border-top: 1px dotted #cfcfcf;
      }
    }
    @media (min-width: $screen-lg-min) {
      width: 25%;
      &:nth-child(4n) {
        border-right: none;
      }
      &:nth-child(n+5) {
        border-top: 1px dotted #cfcfcf;
      }
    }
  }
}

// Sort Bar
.sort-bar {
  .navbar-nav {
    & > .active {
      & > a {
        background-color: transparent;
        font-weight: 500;
        border-bottom: 3px solid #ff9d3f;
        padding-bottom: 12px;
      }
    }
  }
  .search-icon {
    color: #5b5b5b;
    font-size: 1.6em;
    float: left;
    margin-right: 0.3em;
    margin-top: 0.2em;
  }
}

.details-wrapper {
  margin-top: 2em;
  a {
    text-decoration: none;
    color: #626262;
    &:hover {
      color: #3b3b3b;
    }
  }
  .details-info {
    margin-bottom: 2em;
    .cover-container {
      float: left;
      width: 200px;
      img {
        width: 100%;
        height: auto;
      }
    }
    .info-container {
      margin-left: 224px;
      .document-title {
        color: #313e5a;
        text-shadow: 0 1px #FFF;
        overflow: overlay;
        white-space: nowrap;
        text-overflow: ellipsis;
        line-height: 1.3em;
        margin-top: 0;
        padding-bottom: 0.2em;
      }
      .document-subtitle {
        color: #797979;
        margin-bottom: 0.8em;
        a {
          font-weight: bold;
        }
        .category {
          margin-top: 0.5em;
        }
      }
    }
    @include clearfix;
  }
  .document-bottom {
    .report-problem {
      float: right;
    }
    @include clearfix;
  }
  .details-section {
    margin-top: 2em;
    .text-body {
      max-height: 8em;
      overflow: hidden;
    }
    .more-details {
      display: none;
      padding-top: 0.3em;
      text-align: right;
      a {
        color: #4b89d0;
      }
    }
    &.open {
      .text-body {
        max-height: none;
        overflow: auto;
      }
      .more-details {
        display: none !important;
      }
    }
  }
  .screenshots {
    .screenshots-groups {
      background-color: #fff;
      padding: 1em 1em 0;
      @include box-shadow(0, 0, .8em, #b3b3b3, outset);
      @include border-radius(0.5em, 0.5em, 0.5em, 0.5em);
    }
    .screenshots-view {
      text-align: center;
      padding-bottom: 1em;
      img {
        height: 500px;
        width: auto;
        @media (max-width: $screen-sm-min) {
          width: 100%;
          height: auto;
        }
      }
    }
    .screenshots-list {
      margin: 0 -1em;
      padding: 0;
      text-align: center;
      list-style: none;
      border-top: 1px solid #CCC;
      background-color: #f3f3f3;
      @include border-radius(0em, 0em, 0.5em, 0.5em);
      .screenshots-img {
        margin-left: -0.3em;
        padding: 0.5em;
        border-left: 1px solid #CCC;
        display: inline-block;
        @include opacity(60);
        width: 60px;
        @media (min-width: $screen-sm-min) {
          width: 100px;
        }
        &:hover {
          cursor: pointer;
          @include opacity(100);
        }
        &.active {
          position: relative;
          background-color: #dedede;
          @include opacity(100);
          @include box-shadow(0, 0, 1em, #bebebe, inset);
          &:after {
            content: "";
            position: absolute;
            left: 50%;
            top: -1px;
            margin-left: -10px;
            @include arrow(top, 8px, 10px, #FFF)
          }
          &:before {
            content: "";
            position: absolute;
            left: 50%;
            top: -1px;
            margin-left: -12px;
            @include arrow(top, 9px, 12px, #CCC)
          }
        }
        &:last-child {
          width: 61px;
          @media (min-width: $screen-sm-min) {
            width: 101px;
          }
          border-right: 1px solid #CCC;
        }
        img {
          width: 100%;
          height: auto;
        }
      }
    }
  }
  .metadata {
    .title {
      font-weight: 700;
      margin-bottom: 0.3em;
    }
    .content {
      font-size: 0.85em;
      font-weight: 300;
    }
  }
  hr {
    margin: 1em 0;
    border-top: 1px dotted #b0b0b0;
  }
  .card-content {
    @media (max-width: $screen-xs-min) {
      width: 100%;
      border-right: none;
      &:nth-child(n+2) {
        border-top: 1px dotted #cfcfcf;
      }
    }
    @media (min-width: $screen-xs-min) and (max-width: $screen-sm-max) {
      width: 50%;
      &:nth-child(2n) {
        border-right: none;
      }
      &:nth-child(n+3) {
        border-top: 1px dotted #cfcfcf;
      }
    }
    @media (min-width: $screen-md-min) {
      width: 33.333%;
      &:nth-child(3n) {
        border-right: none;
      }
      &:nth-child(n+4) {
        border-top: 1px dotted #cfcfcf;
      }
    }
  }
  &.templates {
    .cover-container {
      width: 360px;
    }
    .info-container {
      margin-left: 384px;
    }
    .whatsnew {
      display: none;
    }
  }
}