/* *** Tooltip *** */

.bb-tooltip {
  position: relative;
  border-bottom: 1px solid $gray;
  cursor: pointer;

  &:before {
    content:  attr(title);
    position: absolute;
    margin-bottom: 10px;
    padding: 3px 8px;
    bottom: 100%;
    left: 50%;
    font-size: 0.8em;
    color: #ffffff;
    background-color: $primary-color;
    white-space: nowrap;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
  }
  &:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-top-color: $primary-color;
    border-width: 5px;
    margin-left: -5px;
  }
  &:before,&:after {
    opacity: 0;
    filter: alpha(opacity=0);
    visibility: hidden;
    -webkit-transition: all ease-out 0.1s;
    -moz-transition: all ease-out 0.1s;
    -ms-transition: all ease-out 0.1s;
    -o-transition: all ease-out 0.1s;
    transition: all ease-out 0.1s;
  }

  &:hover:before,&:hover:after {
    opacity: 1;
    filter: alpha(opacity=100);
    visibility: visible;
  }
}