
@import "styles/mixins";
@import "styles/utilities";
@import "styles/variables";
@import "../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss";

// desktop
@media screen and (min-width: 768px) {

}
// mobile
@media screen and (max-width: 767px) {

}
// layout
main {
  // max-width: 1680px; margin: 0 auto;
}

/*
 * BUGFIX: SVG IE - to respect aspect ratios and sizes for img tags containing SVG files
 *
 * [1] IE9
 * [2] IE10+
 */
/* 1 */
.ie9 img[src*=".svg"] {
  width: 100%;
}
/* 2 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  img[src*=".svg"] {
    width: 100%;
  }
}


// GLOBAL BOOTSTRAP COMPONENTS

.navbar-fixed-top {
  @media screen and (min-width: 768px) {
    //background-color: $background-default;
    border-bottom: $border-default;
  }
  .navbar-header, .navbar-nav {
    background-color: $background-default;
  }
}
.navbar-fixed-bottom {
  border-top: $border-default;
  .navbar-nav {
    margin: 0 auto;
    display: table;
    table-layout: fixed;
    float:none;
  }
}
.navbar-fixed-top, .navbar-fixed-bottom {
  background-color: $background-default;
  //font-size: 105%;
  .navbar-nav > li{
    border-right: $border-default;
    .icon{
      color: $brand-primary;
      font-size: $icon-size;
      margin-top: $padding*0.75;
      position: absolute;
    }
    span{
      padding-left:$padding*2.4
    }
  }
  .navbar-nav > li:first-child{
    border-left: $border-default;
  }
  .navbar-nav > li.active{
    border-left: $border-default;
    border-right: $border-default;
  }
  .navbar-toggle{
    border: none;
    font-size: 190%;
    color: #5e5e5e;
    margin-top: 2px;
    margin-left: $padding/2;
    margin-bottom: -4px;
  }
  .navbar-toggle.collapsed{
    color: #808080;
    rotation: $icon-size;}
  .navbar-collapse .open{
    max-width: 50%;}
  .nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
    border-right: none;
    li a{
      background-color: $background-default; } }

  .dropdown{
    padding: $padding/2 $padding/2 10px 20px;
    padding-bottom: 5px;
    position:fixed;
    top: 0;
    right: 0;
    list-style:none;
    .dropdown-toggle{
      padding-top: 10px;
      height: 52px;
      font-size: $icon-size;}
    .dropdown-menu {
      left: inherit;
      right: 0;
      > li > a:hover{
        background-color: $background-default;}
    }
  }

  // collapsed mobile navbar
  @media screen and (max-width: 767px) {
    .navbar-header{
      border-bottom: $border-default;
    }
    .navbar-collapse{
      background-color: $gray-lighter;
      box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.33);
      max-width:50%;
      margin-top: -$padding*0.1;
    }
    .navbar-nav > li {
      border-bottom: $border-default;
      border-right: $border-default;
      .icon{
        margin-top: $padding*0.55;
      }
    }
    .navbar-nav > li:first-child{
      border-top: $border-default;
    }
    .navbar-nav > li:last-child{
      border-bottom: none;
    }
    .navbar-brand{
      padding-right: $padding*3; }
  }
}
.navbar-brand {
  margin-top: 0;
  font-size: 18px;
  font-weight: bold; }

.navbar-inverse{
  background: $black;
  color: $white;
}


.table > tbody > tr.info > td, .table > tbody > tr.info > th, .table > tfoot > tr > td.info, .table > tfoot > tr > th.info, .table > tfoot > tr.info > td, .table > tfoot > tr.info > th {
  background-color: $gray-lighter;
}
.table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th{
  background-color: $gray-light;
}
.panel{
  margin-bottom: $padding;
}
.panel-default {
  a.active {
    border-bottom: 2px solid $brand-primary;
    font-weight: bold;
  }
  > .panel-heading {
    background-color: white;
    border-bottom: 2px solid $brand-primary;
    border-color: $brand-primary;
    padding: 0 $padding/2 0 $padding/2;
    margin: 0 $padding 0 $padding;
    img{
      float: left;
      margin-right: $padding*.75;
      margin-left: -$padding*.5;
      padding: 0 !important;
    }
    h4 {
      margin-left: -$padding/2;
      padding-right: $padding;
    }
    a.btn{
      background: $brand-primary;
      border: none;
      float: right;
      width: 28px;
      height: 25px;
      margin-top: -$padding*2.1;
      margin-right: -$padding*0.5;
      padding: 4px 12px;
      color: white;
    }
    a.btn:after {
      font-family:'Glyphicons Halflings';
      content:"\e259";
      margin-left: -$padding/3;
      margin-top: -$padding/5;
    }
    a.btn.collapsed:after {
      content:"\e260";
    }
    a.btn.refresh {
      margin-right: $padding*1.85;
      padding-top: 3px;
      i {
        margin-left: -$padding/2.5;
        margin-right: $padding;
      }
    }
  }
  > .panel-body {

  }
  uib-tabset {

  }
}
.alert-info {
  background-color: $gray-light;
  border-color: $gray-form-controls;
  color: $brand-primary;
  a {
    text-decoration: underline;
    cursor: pointer;
  }
}
.well {
  background: white;
}
.btn.btn-primary{
  border: 1px solid $brand-primary;
}
.btn{
  i {
    display: inline;
    font-size: 130%;
    padding-right: $padding/2;
    margin-left: -$padding/4;
  }
}
//.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
//  cursor: not-allowed;
//  color: $gray-darker;
//  background-color: $gray-light;
//  opacity: 1;
//  filter: alpha(opacity=100);
//  box-shadow: none;
//}

// UI-BOOTSTRAP
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
.nav-tabs {
  border-bottom: 0px;
  li.active a, li.active a:hover, li.active a:focus {
    border-top: none;
    border-right: none;
    border-bottom: 2px solid $brand-primary;
    border-left: none;
    font-weight: bold;
  }
  li a {
    color: $gray-darker;
  }
}

.tooltip.atTooltip .tooltip-inner {
  color: white;
  background-color: $brand-primary;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
  font-family: $font-default;
  padding: $padding/3;
}
.tooltip.atTooltip .tooltip-arrow {
  border-bottom-color: $brand-primary;
}


// FORMS
form, div[ng-form] {
  .form-control {
    box-shadow: none!important;
    background-color: $gray-form-controls;
    height: 30px;
    padding: 0 10px;
  }
  label {
    font-weight: normal;
  }
  textarea.form-control{
    min-height: 100px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .form-horizontal {
    .control-label {
      text-align: left;
    }
    .form-group {
      //.valdr-message {
      //  //display: none;
      //  color: $brand-primary;
      //  padding-top: $padding/2;
      //}
      //.valdr-message.ng-invalid.ng-touched.ng-dirty {
      //  display: inline;
      //}
    }
  }
  // custom select box style
  input[type="checkbox"]:focus {
    outline: none;
    outline-offset: 0px;
  }
  .select-style {
    border: 1px solid $gray-form-controls;
    border-radius: 0;
    max-height: 32px;
  }
  .select-style:after {
    background: $brand-primary;
    border: solid transparent;
    color: white;
    content:"\e259";
    font-family:'Glyphicons Halflings';
    padding: 3px 6px;
    position: absolute;
    pointer-events: none;
    top: 0;
    right: 16px;
    z-index: 100;
  }
  .select-style select {
    border: none;
    box-shadow: none;
    background-color: $gray-form-controls;
    background-image: none;
    appearance: none;
  }
  .select-style select:focus {

  }

  // custom radio buttons
  //input[type="radio"]:checked{
  //  visibility: hidden;
  //}
  input[type="radio"]:checked:before {
    visibility: visible;
    content: "";
    border: 4px solid $gray-form-controls;
    display: block;
    position: relative;
    top: 0px;
    left: -1px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: $brand-primary;
  }
  input[type="radio"]:checked:focus {
    outline: none;
  }
  // custom checkbox buttons
  input[type="checkbox"]:before {
    content: "";
    border: 1px solid #ccc;
    display: block;
    position: relative;
    top: 0px;
    left: 0px;
    width: 15px;
    height: 15px;
    border-radius: 0;
    background: $gray-form-controls;
  }
  input[type="checkbox"]:checked:before {
    content: "";
    color: $brand-primary;
    content:"\e259";
    font-family:'Glyphicons Halflings';
  }
  input[type="checkbox"]:disabled:before {
    background: $gray-light;
  }

  // form input addons
  .input-group[class*="col-"] {
    padding-left: $padding;
    padding-right: $padding;
    margin-bottom: $padding;
  }

  // fieldset collapsible
  fieldset.fsStyle {
    font-size: small;
    font-weight: normal;
    border-top: $border-default;
    //padding: 4px;
    //margin: 5px;
  }
  legend {
    width: auto;
    border-bottom: 0px;
  }
  legend a {
    color: inherit;
  }
  legend.collapsible {
    font-size: 90%;
    color: #888888;
    background-color: transparent;
    font-weight: bold;
    padding-right: 5px;
    :after{
      background: white;
      color: $brand-primary;
      content:"\e259";
      font-family:'Glyphicons Halflings';
      padding: 0px 8px;
      position: absolute;
      top: 0;
      right: 16px;
      z-index: 100;
    }
    // fixme:
    .collapsed:after{
      content:"\e260";
    }
  }
}






/**
 *  Do not remove the comments below. It's the markers used by gulp-inject to inject
 *  all your sass files automatically
 */
// injector
// endinjector
