/* ==========================================================================
  bc-toolbar
   ========================================================================== */

/* Variables
   ========================================================================== */

$toolbar-small-height: 32px;
$toolbar-regular-height: 50px;
$toolbar-large-height: 72px;

/* Reset padding in common elements
   ========================================================================== */

.panel-has-bc-toolbar > .panel-heading {
  padding: 0;
}

.modal-has-bc-toolbar {
  .modal-header,
  .modal-footer {
    padding: 0;
  }
}

.alert-has-bc-toolbar {
  padding: 0;
}

/* Component 
   ========================================================================== */

.bc-toolbar {
  @extend .clearfix;
  width: 100%;
  height: $toolbar-regular-height;

  .panel &,
  .popover &,
  .modal &,
  .alert & {
    padding: 0 $grid-gutter-width/2;
  }
}

/* Heights
   ========================================================================== */

.bc-toolbar-small {
  height: $toolbar-small-height;
}

.bc-toolbar-large {
  height: $toolbar-large-height;
}

/* Divider
   ========================================================================== */

.bc-toolbar-divider {
  background: $gray-border-standard; // @todo extract this to common border color
  width: 1px;
  float: left;
  margin: 0 15px;
  height: 100%;
  line-height: $toolbar-regular-height;

  .bc-navbar-large & {
    height: $bc-navbar-large-height;
  }
}

/* Standard titles and text
   ========================================================================== */

.bc-toolbar-title {
  font-size: 16px;
  margin: 0;
}

.bc-toolbar-title-small {
  font-size: 14px;
  margin: 0;
}

.bc-toolbar-text {
  font-size: 14px;
  margin: 0;
}

.bc-toolbar-title,
.bc-toolbar-title-small,
.bc-toolbar-text {
  line-height: $toolbar-regular-height;

  .bc-toolbar-small & {
    line-height: $toolbar-small-height;
  }

  .bc-toolbar-large & {
    line-height: $toolbar-small-height;
  }
}

/* Parts alignment
   A toolbar can have a left, right and center part
   ========================================================================== */

.bc-toolbar-left {
  float: left;
}

.bc-toolbar-right {
  float: right;
}

.bc-toolbar-center {
  position: absolute;
  left: 50%;
}

.bc-toolbar-center-inner {
  margin-left: -50%;
}

/* Component alignment
   Within the toolbar-left, toolbar-center or toolbar-right part, there are toolbar-item divs,
  these float to position the elements
   ========================================================================== */

/* Component alignment
   Within the toolbar-item divs, we vertically position the components
   ========================================================================== */

.bc-toolbar-element {
  float: left;

  .bc-toolbar-left & {
    padding: 0;
    padding-right: $grid-gutter-width/2;
  }

  .bc-toolbar-right & {
    padding: 0;
    padding-left: $grid-gutter-width/2;
  }
}

/* Element positioning (vertical)
   ========================================================================== */

.bc-toolbar {
  
  .form-group {
    margin-bottom: 0;
  }

  .bc-navbar-brand {
    margin-top: 15px;
  }
  
  .bc-navbar-brand-has-icon {
    margin-top: 10px;
  }

  .bc-breadcrumbs {
    margin-top: 7px;
  }
  
  .progress {
    margin-top: 15px;
  }

  .btn {
    margin-top: 7px;
  }

  .nav-pills {
    margin-top: 9px;
  }
  
  .checkbox-inline,
  .radio-inline {
    margin-top: 16px;
  }

  .btn-xs {
    margin-top: 11px;
  }
  
  .form-control[type="text"],
  .form-control[type="search"] {
    margin-top: 9px;
  }

  .nav-tabs {
    margin-top: 8.5px;
  }

  .form-inline {
    padding-top: 8px;
  }

  .bc-tag-list {
    padding-top: 10px;
  }

}

.bc-toolbar-large {
  .bc-navbar-brand {
    margin-top: 20px;
  }
}


.bc-toolbar-small {
  .btn-xs {
    margin-top: 5px;
  }

  .bc-toolbar-text {
    margin-top: 6px;
    font-size: 12px;
  }

  .checkbox-inline,
  .radio-inline {
    margin-top: 5px;
  }
}
