@import "variables";

#C_VISUALIZATION_CANVAS,
#C_VISUALIZATION_CANVAS svg {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  user-select: none;
}

#C_VISUALIZATION_CANVAS {
  top: 0;
  background: $neutral-200;
}

#C_VISUALIZATION.fullscreen {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: $neutral-200;
  overflow: hidden;
}

#C_VISUALIZATION_TOP {
  background-color: $white;
  height: 45px;
  display: flex;
  align-items: center;

  &.fullscreen {
    position: fixed;
    z-index: 1001;
    top: 0;
    right: 0;
    left: 0;
  }
}


#C_VISUALIZATION_TOP_OPTIONS {
  overflow: hidden;
  margin-left: auto;
  position: relative;
  padding: 2px;

  #C_VISUALIZATION_TOP_OPTIONS_LABEL {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
  }

  &.responsive {
    background: $white;
    height: 26px;
    width: 26px;
    padding: 5px;
    z-index: 1000;

    button, span {
      visibility: hidden;
    }

    #C_VISUALIZATION_TOP_OPTIONS_LABEL {
      display: block;
    }

    button,
    span.mr20 {
      margin-top: 5px;
    }

    .mr20 {
      margin-right: 0 !important;
      margin-top: 10px !important;
    }

    &:hover {
      position: absolute;
      right: 10px;
      top: 10px;
      width: 250px;
      border: 1px solid $neutral-600;
      height: auto;

      button, span {
        visibility: visible !important;
      }

      button:first-of-type {
        margin-top: 25px;
      }
    }
  }
}

#C_VISUALIZATION_CANVAS .node {
  z-index: 1002;
}

// Styles for the left content area.
#C_VISUALIZATION_LEFT {
  height: 100%;
  position: relative;

  #C_VISUALIZATION_LEFT_HEADER {
    height: 40px;
    padding: 5px;
    background: $neutral-200;
    border-bottom: 1px solid $neutral-600;
    color: #454545;
    display: flex;
    align-items: center;
  }

  #C_VISUALIZATION_LEFT_CONTENT {
    padding: 5px;
    overflow-x: hidden;
    overflow-y: auto;

    img.object-image {
      width: 100%;
      height: auto;
    }

    .obj-info-container {
      height: auto;
      overflow: hidden;
      overflow-y: auto;
    }

    // If the CMDB-Explorer enters fullscreen we want to display the info-box at the top right corner.
    &.fullscreen {
      position: fixed;
      bottom: 5px;
      right: 5px;
      border: 1px solid $neutral-200;
      z-index: 1002;
      background: $white;
      width: 350px;
    }

    table.obj-info {
      white-space: normal;

      tr td {
        &:first-child {
          width: 40%;
          text-align: right;
          border: none;
        }

        &:last-child {
          width: 60%;
          text-align: left;
          padding-left: 10px;
        }
      }
    }
  }

  #C_VISUALIZATION_LEFT_FUNCTIONS {
    background: $white;
    width: 100%;
    position: absolute;
    bottom: 30%;
    height: 145px;
  }

  #C_VISUALIZATION_LEFT_LEGEND {
    background: $white;
    width: 100%;
    position: absolute;
    bottom: 0;
    height: 30%;

    h3 {
      position: absolute;
      width: 100%;
    }

    ul {
      list-style: none;
      margin: 0;
      top: 28px;
      bottom: 0;
      width: 100%;
      overflow-y: auto;
      position: absolute;

      li {
        padding: 5px;
        border-bottom: 1px solid #cccccc;

        div {
          overflow: hidden;
        }

        label {
          line-height: 12px;
        }

        img {
          height: 16px;
          width: 16px;
        }
      }
    }
  }
}

// Styles for the CMDB-Explorer overlay.
#C_VISUALIZATION_OVERLAY {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, .5);
  z-index: 1003;
}

#C_VISUALIZATION_OVERLAY div {
  position: absolute;
  top: 50%;
  left: 50%;
  background: $white;
  width: 350px;
  margin-left: -175px;
  margin-top: -15px;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid #aaaaaa;
}
