/**
 * @author rkereskenyi / https://github.com/rkereskenyi
 */

$commit-background-color: #000000;
$commit-actual-background-color: #FF7800;

/* make sure to update commit_WIDTH and commit_HEIGHT in Widgets/ProjectRepository/ProjectRepositoryWidget.js */
$commit-size: 8px;
$commit-radius: 5px;
$commit-actual-box-shadow: 0 0 10px 3px $commit-actual-background-color;

$show-more-panel-background-color: #F7F7F7;
$show-more-panel-height: 36px;
$show-more-panel-border: 1px solid #3a87ad;

$table-row-height: 25px;
//equals Widgets/ProjectRepository/ProjectRepositoryWidget.js Y_DELTA!!!

.repository-dialog {
  .modal-header {
    > h3 {
      margin-top: 0;
      margin-bottom: 0;
    }
  }
}

.project-repository-widget {

  table.table.commit-list {
    width: auto;
  }

  table.no-commits-in-table {
    display: none;

  }

  .message-column {
    width: 100%;
  }

  .commits {
    position: absolute;
    width: 1px;
    height: 1px;
    //TO MATCH PERFECT POSITIONING ABOVE TABLE LAYOUT'S FIRST COLUMN
    top: 20 /*modal dialog padding*/ + $table-row-height + ($table-row-height - $commit-size)/2;
    //left: 30px;

    /*DISABLE OUTER BORDER WHEN FOCUSED*/
    &:focus {
      outline: none;
    }

    .commit {
      position: absolute;
      width: $commit-size;
      height: $commit-size;
      background-color: $commit-background-color;
      border-radius: $commit-radius;

      &.actual {
        background-color: $commit-actual-background-color;
        -moz-box-shadow: $commit-actual-box-shadow;
        -webkit-box-shadow: $commit-actual-box-shadow;
        box-shadow: $commit-actual-box-shadow;
      }
    }
  }

  .show-more {
    height: $show-more-panel-height;
    line-height: $show-more-panel-height;
    background-color: $show-more-panel-background-color;
    border-bottom: $show-more-panel-border;
    border-top: $show-more-panel-border;
    text-align: center;
    margin-top: 15px;
    position: relative; //NEEDED BECAUSE OF THE LOADER ANIMATION'S POSITIONNING LOGIC

    a:hover {
      text-decoration: none;
    }
  }

  /********* TABLE LAYOUT STYLES ************/
  table {

    tr {
      height: $table-row-height;
      &.in-selection {
        background-color: lightskyblue;
      }
      th,
      td {
        padding: 0 5px;
        white-space: nowrap;
        vertical-align: middle;
        text-align: center; // everything should be in center

        &.actions {
          text-align: left;

          button {
            i {
              color: #404040;
            }
          }

          > div.input-group {
            margin-bottom: 0;
            display: inline-flex;
            display: -webkit-inline-flex;
            > input {
              height: 100%;
              width: 150px;
              padding: 3px 5px;
            }
          }
        }

        &.user-column {
          text-align: right;
          .avatar-container {
            .avatar-image {
              width: 18px;
              margin-left: 8px;
            }
          }
        }

        .commit-badge-container {
          .place-holder {
          }
          text-align: center;
          *:first-child {
            padding-left: 0;
          }
          * {
            padding-left: 5px;
          }
        }

        &.commit-hash {
          font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
          &:hover {
            cursor: pointer;
            text-decoration: underline;
            color: #ff7700;
          }
        }

        div.commit-message {
          overflow: hidden;
          text-overflow: ellipsis;
          text-align: left;
          //display: inline-block;
          min-width: 200px;
        }

        .common-label {
          margin-right: 2px;

          i.icon-white {
            margin-left: 2px;
            font-size: 10px;
            &:hover {
              cursor: pointer;
              color: darkred;
            }
          }

          .select-branch-in-text {
            &:hover {
              cursor: pointer;
              //color: #3160ab;
              font-weight: bold;
            }
          }

          i.tag-label-icon {
            padding-right: 5px;
            font-size: 9px;
          }

          &.label {
            font-size: 11px;
            font-weight: normal;
            height: 15px;
            &.delete-prohibited {
              i.icon-white {
                display: none;
              }
            }
          }
        }

        > .btn {
          margin-left: 2px;
          margin-right: 2px;
        }

        .control-group {
          margin-bottom: 0;
        }
      }
    }

    td:first-child {
      border-top: 1px solid transparent;
    }

    &.table-hover tbody tr:hover > td,
    &.table-hover tbody tr:hover > th {
      background-color: rgba(236, 236, 236, 0.50);
    }
  }
}