@import '../../core/stylesheets/variables.scss';

$tooltip-height: 20px;

.md-tooltip {
  height: $tooltip-height;
  padding: 0 8px;
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background-color: rgba(#616161, .87);
  border-radius: 2px;
  opacity: 0;
  transform-origin: center top;
  transition: $swift-ease-out;
  transition-duration: .3s;
  transition-delay: 0s;
  color: #fff;
  font-family: $font-roboto;
  font-size: 10px;
  line-height: $tooltip-height;
  text-transform: none;
  white-space: nowrap;

  &.md-active {
    opacity: 1;
    transition: $swift-ease-in;
    transition-duration: .3s;
  }

  &:not(.md-active) {
    transition-delay: 0s !important;
  }

  &.md-transition-off {
    transition: none !important;
  }

  &.md-tooltip-top {
    margin-top: -14px;
    transform: translate(-50%, 8px);

    &.md-active {
      transform: translate(-50%, 0);
    }
  }

  &.md-tooltip-right {
    margin-left: 14px;
    transform: translate(-8px, 50%);

    &.md-active {
      transform: translate(0, 50%);
    }
  }

  &.md-tooltip-bottom {
    margin-top: 14px;
    transform: translate(-50%, -8px);

    &.md-active {
      transform: translate(-50%, 0);
    }
  }

  &.md-tooltip-left {
    margin-left: -14px;
    transform: translate(8px, 50%);

    &.md-active {
      transform: translate(0, 50%);
    }
  }
}
