@import "variables";

.tooltip {
  position: absolute;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, .5);

  * {
    position: relative;
    box-sizing: border-box;
  }

  .pointer {
    position: absolute;
    width: 100%;
    height: 100%;

    div {
      position: absolute;
      border: 5px solid transparent;
      width: 0;
      height: 0;
    }

    .lefttop,
    .topleft {
      border-bottom-color: $darkgrey;
      border-left-color: $darkgrey;
      top: -10px;
      left: 0;
    }

    .topmiddle {
      border-width: 10px;
      border-bottom-color: $darkgrey;
      top: -20px;
      left: 50%;
    }

    .topright,
    .righttop {
      border-bottom-color: $darkgrey;
      border-right-color: $darkgrey;
      top: -10px;
      right: 0;
    }

    .rightmiddle {
      border-width: 10px;
      border-left-color: $darkgrey;
      top: 50%;
      right: -20px;
    }

    .rightbottom,
    .bottomright {
      border-top-color: $darkgrey;
      border-right-color: $darkgrey;
      bottom: -10px;
      right: 0;
    }

    .bottommiddle {
      border-width: 10px;
      border-top-color: $darkgrey;
      bottom: -20px;
      left: 50%;
    }

    .bottomleft,
    .leftbottom {
      border-top-color: $darkgrey;
      border-left-color: $darkgrey;
      bottom: -10px;
      left: 0;
    }

    .leftmiddle {
      border-width: 10px;
      border-right-color: $darkgrey;
      top: 50%;
      left: -20px;
    }
  }

  .objectinfo {
    border: 1px solid $darkgrey;
    background: $white;
    width: 340px;
    font-size: 85%;
    opacity: 0.9;

    h3 {
      border-bottom: 1px solid $darkgrey;
      background: $grey;
      margin: 0;
      height: 30px;
      line-height: 30px;

      img {
        float: left;
        margin-right: 5px;
        height: 100%;
        width: auto;
      }

      .cmdb-marker {
        float: right;
        height: 15px;
        width: 10px;
        margin: 5px;
      }
    }

    h4 {
      padding: 3px 5px;
    }

    table {
      width: 100%;
      padding: 2px;
      background: #efefef;
      border-top: 1px solid $grey;
      border-bottom: 1px solid $grey;

      td.key {
        color: #444444;
      }
    }
  }

  &.darkgrey {
    opacity: 0.8;
    width: 205px;
    font-size: 11px;
    color: $white;
    background-color: $black;
    border: 2px solid $black;
    border-radius: 2px;

    .content {
      padding: 3px;
      color: $white;
      line-height: 15px;
    }
  }
}
