/*
 * Copyright (c) 2018 Eclipse Foundation, Inc.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * Contributors:
 *   Christopher Guindon <chris.guindon@eclipse-foundation.org>
 * 
 * SPDX-License-Identifier: EPL-2.0
*/

// PMI Drupal styles

.navbar-bugzilla {
  li {
    display: inline-block;
    float: none;
    > a {
      color: @bugzilla-menu-link-color;
      background-color:@brand-secondary;
      > i {
        color: @brand-info;
      }
      &:hover {
        background-color:lighten(@brand-secondary, 10%);
      }
    }
  }
}

// Fixes issue with awkward padding with fields outside of field-groups
form.node-form > div > div.form-item {
  margin-bottom: 10px;
}

form.node-form div.tabledrag-toggle-weight-wrapper {
  display: none;
}

.field-name-field-project-build-url {
  table {
    tr {
      td {
        &.build-status {
          text-align: center;
        }
        &.build-url {
          width: 75%;
        }
        i {
          font-size: 18px;
          &.build-none {
            display: none;
          }
          &.build-in-progress {
            color: blue;
          }
          &.build-success {
            color: green;
          }
          &.build-aborted{
            color: orange;
          }
          &.build-unstable{
            color: yellow;
          }
          &.build-failure{
            color: red;
          }
          &.build-status-code{
            font-size: 12px;
          }
        }
      }
    }
  }
}

.field-name-field-project-build-technologies,
.field-name-field-project-build-doc,
.field-name-field-project-build-description {
  padding-bottom: 15px;
}

.field-name-field-project-build-technologies {
  .field-label {
    padding-bottom: 10px;
  }
  .field-items {
    .field-item {
      padding-left: 10px;
      a:before {
        font-family: FontAwesome;
        content: "\f101";
        color: @brand-warning;
        padding-right: 10px;
      }
    }
  }
}

.field-name-field-project-build-doc {
  .field-label {
    padding-bottom: 10px;
  }
  .field-items {
    .field-item {
      padding-left: 10px;
      i {
        padding-right: 10px;
      }
    }
  }
}

.field-name-field-latest-releases {
  table {
    tr {
      td + td + td {
        a.release-review-link {
          span {
            display: none;
          }
        }
      }
    }
  }
}

.field-name-field-project-update-sites {
  input {
    background-color:transparent;
  }
}

.field-name-field-projects-members-members {
  .field-label {
    display: none;
  }
  .field-items {
    .field-item {
      ul {
        list-style-type: none;
        list-style: none;
        li {
          width: 33%;
          text-align: center;
          .user-picture {
            .img-responsive {
              margin: auto;
            }
            padding: 10px 0 10px 0;
          }
        }
      }
    }
  }
}

#block-dynamic-project-links {
  div.dynamic-project-link {
    color: darken(@brand-info, 10%);
    font-size: 1.2em;
    margin-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    span.project-link {
      a:link, a:visited, a:hover {
        color: darken(@brand-info, 10%);
        font-weight: bold;
      }
      a {
        i {
          padding-right: 5px;
        }
      }
    }
  }
}

#block-project-blocks-project-tags {
  .block-content {
    padding: 5px;
    h5 {
      margin-top: 0px;
    }
  }
  .project-tags-block {
    padding-top: 10px;
  }
}

#block-project-blocks-projects-image {
  border: 1px solid #dfdfdf;
  background-color: white;
  .block-content {
    padding: 10px;
    text-align: center;
  }
}

.block-related-projects {
  a {
    margin-left : 5px;
  }

  ul {
    list-style: none;
    margin-bottom: 0px;
    padding-left: 10px;
  }
  ul.related-projects-block-related-list li.item-container {
    font-weight: 600;
    &:before {
      content: "";
    }
  }
  li {
    font-weight: 400;
    &.hierarchy-1 { }
    &.hierarchy-2 { margin-left: 10px; }
    &.hierarchy-3 { margin-left: 20px; }
    
    &.ellipsis:before, &:before {
      content: "\00BB";
      color: @brand-warning;
      font-family: FontAwesome;
    }
  }
}

.release-issues {
  background-color: @eclipse-highlight-grey;
  margin-left: -20px;
  margin-top: -20px;
  margin-right: -20px;
  padding: 20px;
  .release-issues-legend {
    .release-issues-legend-resolved {
      i {
        font-size: 18px;
        color: @brand-warning;
      }
    }
    .release-issues-legend-unsolved {
      i {
        font-size: 18px;
        color: @brand-primary;
      }
    }
  }
}

.release-issues-list {
  margin-top: 20px;
  ul {
    list-style-type: none;
    li {
      &.bugzilla-fixed:after,
      &.bugzilla-resolved:after {
        font-family: FontAwesome;
        color: @brand-warning;
        content: "\f058";
      }
      &.bugzilla-unresolved:after {
        font-family: FontAwesome;
        color: @brand-primary;
        content: "\f0ad";
      }
      span {
        // Hide resolved/fixed text
        display: none;
      }
    }
  }
}


.solstice-list-of-projects{
  form {
    padding-bottom:20px;
    margin-bottom:30px;
    border-bottom:1px solid fade(@black, 10%);
    text-align:center;
  }
  .views-exposed-widgets {
    display: inline-block;
  }
  .views-exposed-widget{
    @media (max-width: @screen-sm-min) {
      float:none;
    }
    .btn{
      margin-top:0;
    }
  }
  .views-widget-filter-field_archived_projects {
    .form-item-field-archived-projects {
      label {
        margin-bottom:13px;
      }
    }
  }
  @media (min-width: @screen-sm-min) {
    .views-submit-button {
      margin-top:25px;
      padding-right:0;
    }
  }
}

.form-search-project{
  .search-form{
    padding-bottom:20px;
    margin-bottom:30px;
    border-bottom:1px solid fade(@black, 10%);
  }

  input.form-control {
    margin-left:5px;
    margin-right:5px;
  }

  select{
    margin-left:5px;
    margin-right:5px;
  }

  button{
    margin-right:5px;
    margin-left:7px;
  }
}

.node-project-teaser{
  margin-bottom:20px;
  .project-teaser-left {
    //max-width: 200px;
    //min-width: 200px;
    img{
      margin: auto;
      max-height: 140px;
    }
  }

  .project-teaser-body {
    padding-left: 1em;
  }

  h4{
    font-weight: 900;
     margin-bottom: .4em;
     display: inline;
     margin-right: .3em;
     font-size:18px;
     a {
       font-weight: bold;
       color:@brand-secondary;
       &:visited {
         color:@brand-secondary;
       }
     }
   }

  .row {
    margin-top: .5em;
  }

  .labels {
    padding-bottom: .2em;
    display:inline;
    li{
      padding-left:1px;
      padding-right:1px;
    }
    .label {
      vertical-align: 2px;
    }
    a:visited {
      color:#fff;
    }
  }

  .project-teaser-description {
    border-right: 1px solid fade(@black, 10%);
  }

  .details{
    padding-left:25px;
    p, p .badge {
      margin-bottom:2px;
      font-size:12px;
    }
    p.latest-release {
      margin-bottom: 1em;
    }
  }

  .details-link {
    padding: 3px 8px;
  }
}

hr.hr-border-dotted {
  margin-left: 2em;
  margin-right: 2em;
  margin-top:30px;
  margin-bottom:30px;
  clear:both;
  border: 2px dashed fade(@black, 10%);
}