// Since the azkaban navbar no longer has the 20px bottom margin so that the
// page header sits flush below the navbar, add a 20px top margin to the login
// form.
.az-login {
  margin-top: 20px;
}

// Wide modal used for certain panels such as executing flow panel.
.modal-wide .modal-dialog {
  width: 80%;
}

// Hide messaging alert by default.
.alert-messaging {
  display: none;
}

// Add additional space under navs.
.nav-tabs, .nav-pills {
  margin-bottom: 15px;
}

// Flow panel heading.
.flow-expander {
  cursor: pointer;
}

// Flow summary.
td.worksheet-key {
  width: 25%;
  font-weight: bold;
}

// Job table.
#all-jobs {
  .tb-name {
    width: 70%;
    border-bottom-width: 0;
    border-bottom-style: none;
  }

  .tb-up-date {
    width: 140px;
    min-width: 130px;
  }

  .tb-owner {
    width: 10%;
    min-width: 95px;
  }
}

// Properties table.
.properties-table {
  .all-jobs .tb-pname {
  }

  .all-jobs .tb-pvalue {
  }
}

// Permissions page table.
.permission-table {
  .tb-perm {
    width: 41px;
    margin: 0px;
  }

  .tb-admin {
    width: 41px;
    margin: 0px;
  }

  .tb-read {
    width: 33px;
    margin: 0px;
  }

  .tb-write {
    width: 34px;
    margin: 0px;
  }

  .tb-execute {
    width: 51px;
    margin: 0px;
  }

  .tb-schedule {
    margin: 0px;
    width: 60px;
  }

  .tb-action {
    margin: 0px;
    width: 70px;
    min-width: 70px;
    max-width: 70px;
  }
}

// Table of executions.
.executions-table {
  th {
    &.date {
      width: 140px;
    }

    &.execid {
      width: 100px;
    }

    &.project {
      width: 200px;
    }

    &.user {
      width: 60px;
    }

    &.elapse {
      width: 90px;
    }

    &.status {
      width: 100px;
    }

    &.details {
      width: 10px;
    }

    &.action {
      width: 20px;
    }
  }

  td {
    &.timeline {
      width: 280px;
      padding: 0px;
      height: 100%;
      vertical-align: bottom;
      margin: 0px;
    }

    &.execId {
      font-weight: bold;
    }
  }
}

.navbar-logo {
  float: left;
  padding: 15px 15px;
  font-size: 18px;
  line-height: 20px;

  a {
    &:hover,
    &:focus {
      text-decoration: none;
    }
  }
}

@media (min-width: 768px) {
  .navbar > .container .navbar-logo {
    margin-left: -15px;
  }
}

@media (min-width: 768px) {
  .navbar-enviro {
    width: auto;
  }
}

.navbar-enviro {
  margin: 25px 20px 0px 10px;
     
  .navbar-enviro-name {
    color: #ff3601;
    font-family: Helvetica, Arial, Sans-Serif;
    font-size: 118.75%;
    font-weight: bold;
  }
       
  .navbar-enviro-server {
    color: #999;
    font-family: Helvetica, Arial, Sans-Serif;
    font-size: 75%;
  }
}

// Restyle navbar-inverse for Azkaban navbar.
.navbar-inverse {
  background-color: #383838;
  border-top: 5px solid #ff3601;
  margin-bottom: 0;

  .navbar-logo {
    background: url('../../images/logo.png') top left no-repeat;
    color: #ffffff;
    font-size: 156.25%;
    font-weight: bold;
    margin: 15px 0.6% 15px 4.75%;
    padding: 12px 0 11px 42px;

    a {
      color: #ffffff;
      &:hover,
      &:focus {
        color: #ffffff;
        background-color: transparent;
      }
    }
  }

  .navbar-nav {
    font-family: Arial;
    font-size: 81.25%;

    > li {
      padding: 25px 12px 25px 12px;
      cursor: pointer;
      &:hover {
        background-color: rgba(0, 0, 0, 0.1);
      }
    }

    > li > a {
      padding: 0px;
      color: #ccc;
    }

    > .active {
      background-color: rgba(0, 0, 0, 0.1);
    }

    > .active > a {
      color: #fff;
      font-weight: bold;
      background-color: transparent;
      border-bottom: 1px solid #ff3601;
      &:hover {
        background-color: transparent;
      }
    }

    > .active > .open {
      background-color: transparent;
    }
  }
}

.az-page-header {
  padding: 5px 0 9px;
  margin: 0 0 30px;
  border-bottom: 1px solid #dddddd;
  background-color: #f4f4f4;

  h1 {
    font-size: 32px;
  }
}

.contextMenu {
  position: absolute;
  background-color: #FFF;
  border: 1px solid #DDD;
  -moz-box-shadow: 2px 2px 5px #888;
  -webkit-box-shadow: 2px 2px 5px #888;
  box-shadow: 2px 2px 5px #888;
  z-index: 2010;

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  li {
    &.menuitem {
      background-color: #FFF;
      padding: 3px 20px;
      min-width: 50px;
      font-size: 10pt;
      cursor: pointer;
    
      .expandSymbol {
        background-image: url("../css/images/ui-icons_cccccc_256x240.png");
        background-position: -32px -16px;
        height: 16px;
        width: 16px;
        float:right;
      }
      
      &:hover {
        background-color: #555;
        color: #FFF;
      }
    }

    &.break {
      border-bottom: 1px solid #BBB;
      margin: 2px 5px;
    }
  }
}

.well-clear {
  background-color: transparent;
}

#flow-graph {
  width: 750px;
  height: 500px;
}

#flow-executing-graph {
  width: 750px;
  height: 500px;
}

.flow-progress {
	width: 280px;
	margin: 4px;
  background-color: #f5f5f5;
  height: 24px;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.flow-progress-bar {
	height: 100%;
  background-color: #ccc;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  -webkit-transition: width 0.6s ease;
          transition: width 0.6s ease;

  &.attempt {
    opacity: 0.70;
    &:hover {
      opacity: 1;
    }
  }

  &.SUCCEEDED {
    background-color: #82b859;
  }

  &.FAILED {
    background-color: #c82123;
  }

  &.RUNNING {
    background-color: #3398cc;	
    background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
    background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    -webkit-animation: progress-bar-stripes 2s linear infinite;
            animation: progress-bar-stripes 2s linear infinite;
  }

  &.QUEUED {
    background-color: #009fc9;
  }
}

td {
  .status {
    -moz-border-radius: 2px;
    border-radius: 2px;

    padding: 2px 2px;
    color: #FFF;
    text-align: center;
    margin-top: 2px;
    
    &.SUCCEEDED {
      background-color: #82b859;
    }

    &.FAILED {
      background-color: #c82123;
    }

    &.PAUSED {
      background-color: #c82123;
    }

    &.READY {
      background-color: #ccc;
    }

    &.RUNNING {
      background-color: #3398cc;	
    }

    &.FAILED_FINISHING {
      background-color: #f19153;	
    }

    &.DISABLED {
      background-color: #aaa;	
    }

    &.SKIPPED {
      background-color: #aaa;	
    }

    &.KILLED {
      background-color: #cc0000;
    }

    &.UNKNOWN {
      background-color: #ccc;
    }
  }
}
