.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
  background: $blue;
}

.btn-info {
  background: $mid-grey;
  border-color: $mid-grey;
}

ul.uib-datepicker-popup {
  padding: 10px;
  .uib-button-bar {
    padding: 10px 0px 0px 0px;
  }
}


.btn-info:hover, .btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle {
  background: darken($mid-grey, 5%);
  border-color: darken($mid-grey, 5%);
}

.btn .caret {
  margin-left: 5px;
}

// Mobile UIB Dropdowns
@media (max-width: 767px) {
  .open {
    // Show the menu
    > .uib-dropdown-menu {
      display: block;
      overflow: auto;
      max-width: 280px;
    }
  }
}

/////////////////////////////////////
//*** Angular UI Select Madness!***//
////////////////////////////////////

$select-bg: #fff;
$select-fg: #686868;

.ui-select-container {
  .ui-select-match {
    &:focus {
      outline: none;
    }
    &.btn-default-focus {
      box-shadow: none;
    }
    > span {
      border: 1px solid $border-grey !important;
      box-shadow: none;
      padding-bottom: 0;
      color: $black !important;
      border-radius: 0px !important;
    }
    .ui-select-container .ui-select-toggle {
      height: 30px;
    }
  }

  .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle {
    color: darken($black, 5%);
    background-color: transparent;
    border-color: none;
  }

  &.asset-select {
    .ui-select-choices-row > a {
      padding: 8px 16px;
    }
  }

  &.ui-select-bootstrap.dropdown.open {
    input {
      border-radius: 0;
      background: $select-bg;
      color: $select-fg;
      border: 1px solid $border-grey;
      box-shadow: none;
    }
    .caret {
      color: $select-fg;
    }
  }
  .ui-select-choices-group-label.dropdown-header { //idk what you want to call these colors.
    color: $select-fg;
    padding: 4px 12px;
    background: #F4F4F4;
    text-shadow: 0px 1px 0px #FFFFFF;
    font-weight: 500;
    font-size: 1em;
    border-bottom: 1px solid #E4E4E4;
    border-top: 1px solid #FFFFFF;
  }
  .form-control:focus {
    border-color: none;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
}

.ui-select-bootstrap > .ui-select-choices {
  border-radius: 0;
  background: $select-bg;
  border: 1px solid $border-grey; //you'll want to add this color in your sassy way
  -webkit-box-shadow: 0px 5px 10px -6px black;
  box-shadow: 0px 5px 10px -6px black;
}

.ui-select-bootstrap .ui-select-choices-row>a {
  color: $select-fg;
  font-weight: 300;
  padding: 3px 12px;
}

.ui-select-bootstrap .ui-select-choices-row.active>a {
  background-color: $select-bg;
  color: $select-fg;
}

.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus {
  text-decoration: none;
  color: darken($select-fg, 3%);
  background-color: #EEF4FA; // you'll want to add this color in your sassy way
}

//Too many effing hover states.
.ui-select-container .btn-default:hover, .ui-select-container .btn-default:focus, .ui-select-container .btn-default.focus, .ui-select-container .btn-default:active, .ui-select-container .btn-default.active, .ui-select-container .open > .btn-default.dropdown-toggle {
  background-color: white;
}

//Get rid out outlines
.dropdown {
  outline: none;
  &:focus {
    outline: none;
  }
}

//Give toggle min height
.ui-select-container{
  .ui-select-toggle{
    height: 40px;
    padding: 8px 12px;
  }
}

//form errors in modals
.has-error .form-control, .has-error .form-contorl:focus {
  border-color: #a94442 !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

//override progress bar
.progress {
  border-radius: 0;
}

//override pre from bootstrap
pre {
  word-break: normal;
  word-wrap: normal;
  white-space: pre-line;
}

//angular popovers
.clean-popover {
  border-radius: 0px !important;
  border: 1px solid $border-grey !important;
  .popover-content {
    padding: 5px 5px 7px 5px;
  }
  &.top {
    .arrow {
      border-top-color: $border-grey !important;
    }
  }
  &.bottom {
   .arrow {
      border-bottom-color: $border-grey !important;
   }
  }
}

//popover font
.popover-content {
  font-family: 'Gillsans' !important;
  font-weight: 300 !important;
  font-size: 14px !important;
}

//override tooltip
$transparent-border: 10px solid transparent !important;
$transparent-border-after: 9px solid transparent;
$tt-top-default: 10px;
$tt-left-default: 9px;
$tt-position-default: -4px !important;

.tooltip-inner {
  @extend .popover-content;
  background-color: $grey !important;
  color: $black !important;
  border: 1px solid $mid-grey !important;
  border-radius: 7px !important;
  box-shadow: 0 3px 8px 0 rgba(158, 158, 158, 0.65) !important;
}

.address {
  .tooltip-inner {
    max-width: none;
    font-size: 12px !important;
    font-family: 'Montserrat' !important;
  }
}

.tooltip.in {
  opacity: 1 !important;
}
.tooltip.top {
  .tooltip-arrow {
    left: 46% !important;
  }
  .tooltip-arrow {
    bottom: $tt-position-default;
    width: 0 !important;
    height: 0 !important;
    border-top: 10px solid $mid-grey !important;
    border-right: $transparent-border;
    border-left: $transparent-border;
    border-bottom-width: 0px !important;
    border-width: $tt-top-default;
  }
  .tooltip-arrow::after {
    display: block;
    position: relative;
    top: -$tt-top-default;
    left: -$tt-left-default;
    content: '';
    width: 0;
    height: 0;
    border-top: 9px solid $grey;
    border-bottom: $transparent-border-after;
    border-right: $transparent-border-after;
    border-left: $transparent-border-after;
    border-bottom-width: 0px;
  }
}

.tooltip {
  &.right {
    .tooltip-arrow {
      left: $tt-position-default;
      top: 42% !important;
      bottom: -14px !important;
      width: 0 !important;
      height: 0 !important;
      border-top: $transparent-border;
      border-bottom: $transparent-border;
      border-right: 10px solid $mid-grey !important;
      border-left: $transparent-border;
    }
    .tooltip-arrow::after {
      display: block;
      position: relative;
      top: -$tt-top-default + 1px;
      left: -$tt-left-default + 1px;
      content: '';
      width: 0;
      height: 0;
      border-top: $transparent-border-after;
      border-bottom: $transparent-border-after;
      border-right: 9px solid $grey;
      border-left: $transparent-border-after;
    }
  }
}

// do not affect security center tooltips
.level-badge a .tooltip.top .tooltip-arrow {
  border-bottom: none !important;
  bottom: -4px !important;
}

.badge {
  background-color: $regal-blue !important;
  padding: 3px 6px 3px 7px !important;
}

// -------------- UIB-DATEPICKER -------------- //

.uib-datepicker-popup {
  table {
    thead {
      tr {
        th {
          button {
            i {
              color: #ccc;
            }
          }
        }
      }
      strong {
        font-weight: 300;
      }
      small {
        font-size: 12px;
        font-weight: 300;
      }
    }
    tbody {
      tr {
        td {
          button {
            border: none;
          }
          button.active {
            background: $iris;
            box-shadow: none;
            span {
              color: white;
            }
          }
          button.active:hover {
            background: $iris;
            box-shadow: none;
          }
        }
      }
    }
  }
  > .uib-button-bar {
    > .btn-success {
      @extend .button-primary;
      @extend .button-sm;
    }
    > .btn-group.pull-left {
      > .btn-danger, .btn-info {
        @extend .button-muted;
        color: $iris;
      }
      > .btn-danger:hover, .btn-info:hover {
        background-color: white;
        color: $iris;
      }
    }
  }
}

.shift-create .ui-select-container {
  &.asset-select {
    .ui-select-choices-group-label.dropdown-header {
      display: none;
    }
    .ui-select-choices-row {
      > a {
        padding: 2px 10px;
      }
      &.active {
        > a {
          background-color: #EEF4FA;
        }
      }
    }
    .is-grouped {
      .ui-select-choices {
        padding: 0;
      }
      .ui-select-choices-group {
        margin-top: 5px;
        position: relative;
      }
      .divider {
        display: none;
      }
      .ui-select-choices-group-label.dropdown-header {
        @extend .flex-row;
        @extend .flex-center;
        border: 0;
        font-weight: 300;
        background: white;
        padding: 2px 15px 2px 30px;
        text-shadow: none;
        text-transform: uppercase;
        &:after {
          content: '';
          width: 100%;
          height: 1px;
          @extend .flex;
          background: #DDD;
          margin-left: 10px;
        }
      }
      .ui-select-choices-row:not(:nth-child(3)) {
        > a {
          i { display: none;}
        }
      }
      .ui-select-choices-row:nth-child(3) {
        > a {
          i {
            top: 2px;
            left: 10px;
            position: absolute;
          }
        }
      }
    }
  }
}
