/* Utility Classes --- */

// Placeholder text
// -------------------------
.placeholder(@color: @placeholderText) {
  :-moz-placeholder {
    color: @color;
  }
  ::-webkit-input-placeholder {
    color: @color;
  }
}

.visuallyhidden {
  height: 1px;
  width: 1px;

  margin: -1px;
  padding: 0;

  border: 0;
  clip: rect(0 0 0 0);

  position: absolute;
  overflow: hidden;
}
/* --- Utility Classes */

body, p, label, input, button, select, textarea, .navbar-search .search-query {
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html, body {
  height: 100%;
}

a.brand,
a.brand:link,
a.brand:hover,
a.brand:active,
a.brand:visited {
  color: #fff;
}

[class^="icon-"], [class*=" icon-"] {
  margin-top: 2px;
 }

#body-inner {
  min-height: 100%;
  height: auto !important;
  height: 100%;
  margin: 0 auto -160px;

  .push {
    height: 160px;
  }
}

i.icon-big-search {
  background-image: url("../img/search.png");
  background-position: 0 0;
  height: 24px;
  width: 24px;
}

.account-heading {
  margin-bottom: 27px;
  font-size: 19.5px;
  line-height: 36px;
  color: #333;
  border-bottom: 1px solid #EEE;
  font-weight: 400;
}

.login-image {
  padding-left: 2em;
  padding-bottom: 2em;
}

.sidebyside {
  .login-image {
    display: inline;
  }
}

#content-wrapper {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Subnav */
.subnav {
  width: 100%;
  height: 36px;
  background-color: #eeeeee; /* Old browsers */
  background-repeat: repeat-x; /* Repeat the gradient */
  background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
  background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */
  background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
  background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
  background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
  border: 1px solid #e5e5e5;
  -webkit-border-radius: 4px;
     -moz-border-radius: 4px;
          border-radius: 4px;

  .nav {
    margin-bottom: 0;

    > li {
      > a {
        margin: 0;
        padding-top:    11px;
        padding-bottom: 11px;
        border-left: 1px solid #f5f5f5;
        border-right: 1px solid #e5e5e5;
        -webkit-border-radius: 0;
           -moz-border-radius: 0;
                border-radius: 0;
      }

      :first-child {
        > a, > a:hover {
          border-left: 0;
          padding-left: 12px;
          -webkit-border-radius: 4px 0 0 4px;
             -moz-border-radius: 4px 0 0 4px;
                  border-radius: 4px 0 0 4px;
        }
      }

      :last-child {
        > a {
          border-right: 0;
        }
      }
    }

    > .active {
      > a, > a:hover {
        padding-left: 13px;
        color: #777;
        background-color: #e9e9e9;
        border-right-color: #ddd;
        border-left: 0;
        -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
           -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
                box-shadow: inset 0 3px 5px rgba(0,0,0,.05);

        .caret {
          border-top-color: #777;
        }
      }
    }
  }

  .dropdown-menu {
   -webkit-border-radius: 0 0 4px 4px;
      -moz-border-radius: 0 0 4px 4px;
           border-radius: 0 0 4px 4px;
  }
}


/* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */
@media (min-width: 980px) {
  .subnav-fixed {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
    border-color: #d5d5d5;
    border-width: 0 0 1px; /* drop the border on the fixed edges */
    -webkit-border-radius: 0;
       -moz-border-radius: 0;
            border-radius: 0;
    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
       -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
  }
  .subnav-fixed .nav {
    width: 938px;
    margin: 0 auto;
    padding: 0 1px;
  }
  .subnav .nav > li:first-child > a,
  .subnav .nav > li:first-child > a:hover {
    -webkit-border-radius: 0;
       -moz-border-radius: 0;
            border-radius: 0;
  }
}

footer {
  min-height: 158px;

  border-top: 1px solid #E0E0E0;
  border-bottom: 1px solid #E0E0E0;
  box-shadow: inset 0 -1px 0 white;

  background-color: #F8F8F8;

  .footer-inner {
    padding-top: 20px;
  }

  .navlinks {
    li {
      margin-left: 5px;

      a {
        color: #999;

        :link, :visited, :active {
          color: #999;
        }

        :hover {
          color: #CCCs;
        }
      }
    }
  }

  .sponsor-logo {
    margin-top: 10px;
  }
}

#search {
  #main-title {
    margin-top: 60px;

    h1 {
      font-weight: 300;
      font-size: 100px;
      height: 100px;
      line-height: 1;
    }
  }

  #search-area {
    margin-top: 2em;

    .placeholder(#DDD);

    #search-box {
      input {
        height: 48px;
        line-height: 1.5;
        font-size: 36px;

      }

      button {
        height: 58px;
        width: 58px;
      }
    }
  }

  #tagline {
    margin-top: 1em;

    p {
      color: #999;
      font-size: 1.3em;
      line-height: 1;
    }
  }

  .info-box {
    margin-top: 1em;
    font-size: 24px;

    .info-label {
      color: #999;
      font-size: 20px;
    }
  }
}

#search-results {
  .results {
    .result {
      padding-top: 10px;
      padding-bottom: 10px;

      .package-name {
        font-weight: bold;
        line-height: 27px;
        font-size: 18px;
      }

      .author { padding-left: 10px; }

      .summary { margin-top: 15px; }
    }
  }

  .results:nth-child(odd) {
    .result {
      background-color: #f9f9f9;
    }
  }

  .results:hover {
    .result {
      background-color: #f5f5f5;
    }
  }
}

#release-detail {
  header {
    margin-bottom: 2.8em;

    .package-title {
      h1 {
        font-size: 3.5em;
        line-height: 1.3;
      }
    }

    .action-buttons {
      float: right;
      margin-top: 1.5em;

      > a, > div {
        float: left;
        display: inline-block;
        margin-left: 1em;
      }

      form {
        margin: 0;
      }

      .progress {
         margin-bottom: 0;
      }
    }
  }

  .install-cmd, .install-cmd h4 {
    font-size: 28px;
    font-weight: normal;
    font-family: Monaco, Andale Mono, Courier New, monospace;
  }

  .install-cmd {
    margin-top: 1em;
    margin-bottom: 1em;

    text-align: center;

    h4 {
      display: inline;
      text-transform: uppercase;
      font-size: 18px;
    }

    h4:after { content:" >"; }
  }

  .package-tabs {
    margin-bottom: 0;
  }

  .tab-content {
    padding-top: 2em;

    h1 {
      padding-top: 0.6em;
      padding-bottom: 0.4em;
    }

    h2 {
      padding-top: 0.5em;
      padding-bottom: 0.3em;
    }

    h3 {
      padding-top: 0.4em;
      padding-bottom: 0.2em;
    }

    h4 {
      padding-top: 0.3em;
      padding-bottom: 0.1em;
    }

    h5 { padding-top: 0.2em; }

    h6 { padding-top: 0.1em; }
  }

  #sidebar {
    padding-top: 2em;

    .downloads {
      color: #999;

      .count {
        display: block;
        color: #404040;
        font-weight: bold;
        font-size: 3em;
        line-height: 1;
      }

      .package, .version {
        margin-bottom: 1em;
      }
    }

    #download-chart {
      margin-bottom: 1em;

      .loading {
        min-height: 200px;
        min-width: 200px;

        background: url(../img/ajax-loader.gif);
        background-repeat: no-repeat;
        background-position: center;
      }
    }

    .alert {
      margin-bottom: 0.6em;
    }

    .versions {
      .yanked {
        text-decoration: line-through;
        font-style: italic;
        color: #999;

        a, a:hover, a:link, a:active, a:visited {
          color: #999;
        }
      }
    }
  }
}

#lists-detail {
  h1.private {
    padding-left: 30px;
    background-image: url(../img/glyphicons/lock.png);
    background-repeat: no-repeat;
    background-position: left;
  }
}

#lists-list {
  h3.public {
    padding-left: 18px;
  }

  h3 {
    i[class^="icon-"], [class*=" icon-"] {
      margin-top: 4px;
    }
  }
}
