@import "variables";

$log-height: 300px;
$log-header-height: 48px;

:host {
  display: block;
  position: relative;
  height: 100%;
  background-color: $blue-950;
  .results-panel {
    &.maximized {
      height: 100%;

      .content {
        flex: 1;
      }
    }
  }

  sm-pipeline-info {
    display: block;
    position: absolute;
    z-index: 2;
    top: 24px;
    right: 24px;
  }

  .console-button {
    display: block;
    position: absolute;
    left: 24px;
    top: 24px;
    z-index: 2;
  }

  .results-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: $log-height + $log-header-height;
    background-color: $blue-900;

    position: absolute;
    bottom: -($log-height + $log-header-height);
    left: 0;
    z-index: 3;

    visibility: hidden;
    transition: bottom 0.35s, visibility 0.35s, height ease-in-out 0.5s;

    &.extend {
      visibility: visible;
      bottom: 0;
    }

    .header {
      height: $log-header-height;
      display: grid;
      align-items: center;
      grid-template-columns: 1fr 1fr;
      column-gap: 24px;
      padding: 0 24px;
      background-color: $blue-700;
      border-bottom: 1px solid $dark-border;
      color: $blue-100;
      box-shadow: 0 -2px 6px rgb(0 0 0 / 40%);

      &.toggle {
        grid-template-columns: 1fr auto 1fr;
      }
    }

    .content {
      height: $log-height;
    }

    ::ng-deep sm-experiment-output-log {
      .no-output {
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translateY(-50%) translateX(-50%);
        display: block;
        text-align: center;
        h4 {
          color: $blue-250;
        }
        .no-output-icon {
          height: 100px;
          width: 100px;
          color: $blue-250;
        }
      }
    }
    .ace {
      height: 100%;

      &.ace-monokai {
        background-color: $blue-900;
      }
    }
  }
}

.level {
  min-width: 100%;
  margin: 50px 0;
  display: flex;
  justify-content: center;

  &:first-child {
    margin-top: 74px;
  }
}

.pipeline-container {
  height: calc(100% + 14px);
  width: calc(100% + 14px);
  position: relative;
  overflow: scroll;
  cursor: grab;
  user-select: none;
  &:active {
    cursor: grabbing;
  }

  &.extend {
    padding-bottom: $log-height;
  }

  .arrows {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    pointer-events: none;
    stroke: $blue-400;
    fill: $blue-400;

    &.selected {
      stroke: $blue-600;
      fill: $blue-600;
    }
    .selected {
      stroke: $blue-200;
      fill: $blue-200;
    }
    .outgoing {
      stroke: $blue-300;
      fill: $blue-300;
    }
  }
}

sm-pipeline-controller-step {
  margin: 0 50px;
  position: relative;
  z-index: 1;
}

.log-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  overflow: hidden;
  > span {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

.close {
  display: flex;
  align-items: center;
  margin-left: auto;

  .al-icon {
    color: $blue-300;
    &:hover {
      color: $blue-100;
    }
  }
}

.no-code {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  text-align: center;
  h3 {
    font-weight: 500;
    font-size: 14px;
  }
  .icon {
    width: 100px;
    height: 100px;
  }
}
