.tip {
  position: relative;
}

.tip:after {
  position: absolute;
  z-index: 65535;
  display: none;
  padding: 2px 8px;
  font: 14px/1.5 Helvetica, Arial, sans-serif;
  color: #fff;
  pointer-events: none;
  content: attr(aria-label);
  background: rgba(0,0,0,.85);
  box-shadow: 0 4px 8px rgba(0,0,0,.25);
  border-radius: 4px;
  white-space: pre;
}

.tip:before {
  position: absolute;
  z-index: 1000;
  display: none;
  width: 0;
  height: 0;
  color: rgba(0,0,0,.85);
  pointer-events: none;
  content: "";
  border: 5px solid transparent;
}

.tip[aria-label=""]:before, .tip[aria-label=""]:after,
.tip.disabled:before, .tip.disabled:after {
  display: none !important;
}

.tip:hover:before, .tip:hover:after {
  display: inline-block;
  text-decoration: none;
}

.tip-s:after, .tip-se:after, .tip-sw:after {
  top: 100%;
  right: 50%;
  margin-top: 5px;
}

.tip-se:after {
  right:auto;
  left:50%;
  margin-left:-15px
}

.tip-sw:after {
  margin-right:-15px
}

.tip-s:before, .tip-se:before, .tip-sw:before {
  top: auto;
  right: 50%;
  bottom: -6px;
  margin-right: -5px;
  border-bottom-color: rgba(0,0,0,.85);
}

.tip-n:after, .tip-ne:after, .tip-nw:after {
  right: 50%;
  bottom: 100%;
  margin-bottom: 5px;
}

.tip-n:before, .tip-ne:before, .tip-nw:before {
  top: -6px;
  right: 50%;
  bottom: auto;
  margin-right: -5px;
  border-top-color: rgba(0,0,0,.85);
}

.tip-ne:after {
  right:auto;
  left:50%;
  margin-left:-15px
}

.tip-nw:after {
  margin-right:-15px
}

.tip-s:after, .tip-n:after {
  transform: translateX(50%);
}

.tip-w:after {
  right: 100%;
  bottom: 50%;
  margin-right: 5px;
  transform: translateY(50%);
}

.tip-w:before {
  top: 50%;
  bottom: 50%;
  left: -5px;
  margin-top: -5px;
  border-left-color: rgba(0,0,0,.85);
}

.tip-e:after {
  bottom: 50%;
  left: 100%;
  margin-left: 5px;
  transform: translateY(50%);
}

.tip-e:before {
  top: 50%;
  right: -5px;
  bottom: 50%;
  margin-top: -5px;
  border-right-color: rgba(0,0,0,.85);
}
