@import '../../../palette.scss';

.sidePanel {
  position: relative;
  background-color: var(--white);
  height: 100%;
  overflow-y: auto;
  font-size: 12px !important;

  :global {
    .bp3-tab {
      font-size: 12px !important;
    }

    .bp3-editable-text-editing {
      border-radius: 5px;
      height: 20px;
      margin: 5px 5px;
    }

    .bp3-editable-text.bp3-editable-text-editing::before {
      box-shadow: unset;
      border: solid 1px var(--ocean);
    }

    .bp3-editable-text input {
      height: 100% !important;
    }

    .bp3-editable-text.bp3-editable-text-editing {
      width: 100%;
      min-width: 0px !important;
      padding-left: var(--spacing-medium);
      padding-right: var(--spacing-medium);
    }

    .bp3-editable-text:hover::before {
      box-shadow: unset !important;
    }

    .bp3-tree-node.bp3-tree-node-selected > .bp3-tree-node-content {
      color: var(--shark);
      background-color: var(--hover-ocean);
    }

    .bp3-tree-node .bp3-tree-node {
      margin: 0px var(--spacing-medium);

      .bp3-tree-node-content {
        border-radius: 5px;
      }
    }

    .bp3-tree-root > .bp3-tree-node > .bp3-tree-node-content > .bp3-tree-node-icon {
      display: none;
    }

    .bp3-tree-root .bp3-tree-node-list > :last-child {
      :hover {
        background-color: var(--hover-ocean);
      }
      .bp3-icon {
        color: var(--ocean) !important;
      }
    }

    .bp3-tree-node {
      cursor: pointer;
    }

    .bp3-tree-root {
      display: flex;
      flex-direction: column;
      height: 100%;
      margin-bottom: 0px !important;
    }

    .bp3-tree {
      height: 100%;
    }

    .bp3-tree-node-caret-none {
      min-width: 8px;
    }

    .bp3-tree-node-list,
    .bp3-icon {
      color: var(--shark);
    }

    .bp3-elevation-0 {
      box-shadow: unset !important;
    }

    .bp3-editable-text-input {
      width: 100% !important;
    }
  }
}

.addWorkflowNode {
  color: var(--ocean);
}

.tree {
  overflow: auto;
  height: 100%;
}

.topicsEmptyState {
  position: absolute;
  left: 0;
  right: 0;
  top: 128px;
  bottom: 128px;
  margin: 0;
}

.topicsEmptyStateBlock {
  z-index: 10;
  text-align: center;
  left: 0;
  right: 0;
  height: 160px;
  margin: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  :global {
    .bp3-icon {
      color: var(--ocean);
      margin: auto;
    }
  }
}

.topicsEmptyStateText {
  font-size: 12px;
  color: #1a1e22;
  margin: 0px 20px;
  margin: var(--spacing-x-large);
}

.treeNode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;

  &:hover {
    .overhidden {
      display: block;
    }
  }
}

.overhidden {
  display: none;
}

.mainoverlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 11;
  padding: 15px;
}

.toolPanel {
  padding: 2px;

  .title {
    height: 25px;
    font-weight: bold;
  }

  .section {
    flex-wrap: wrap;
  }
}

.topicName {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag {
  background: var(--c-neutral--light-2);
  border-radius: 3px;
  color: var(--c-background--dark-2);
  font-size: 8px;
  padding: 6px 6px 5px;
}

.toolItem {
  width: 100%;
  margin: 0 3px 3px 0;
  border: 1px solid #ddd;
  display: inline-block;
  font-size: 1.2rem;

  cursor: move; /* fallback if grab cursor is unsupported */
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;

  &:active {
    cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
  }
}

.grabbable {
  cursor: move; /* fallback if grab cursor is unsupported */
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;

  &:active {
    cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
  }
}

.tabs {
  width: 100%;
}

.emptyState {
  color: $content-color-light;
  font-size: 14px;
  margin: 20px 0 0;
}

.modalHeader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.referencedWorkflows {
  color: #2458b3;
}

.topicsNavbar {
  $height: 34px;

  height: $height !important;
  padding: 0 var(--spacing-large) !important;
  box-shadow: unset !important;
  margin-bottom: var(--spacing-medium) !important;

  :global {
    .bp3-button {
      box-shadow: unset !important;
      background-image: unset !important;
      border-radius: 5px !important;
      background-color: var(--white) !important;
    }

    .bp3-tab {
      text-transform: uppercase;
      font-weight: bold;
      transition: color 0.3s;
    }

    .bp3-tab[aria-selected='true'] {
      color: var(--shark) !important;
    }

    .bp3-tab[aria-selected='false'] {
      color: var(--gray);
    }

    .bp3-tab:hover {
      color: #d6d6d6;
    }

    .bp3-icon {
      color: var(--shark) !important;
    }

    .bp3-tab-indicator-wrapper {
      height: 2px !important;
    }

    .bp3-tab-list > *:not(:last-child) {
      margin-right: var(--spacing-x-large);
    }

    .bp3-tab:not([aria-disabled='true']):hover {
      color: var(--reef) !important;
    }

    .bp3-tab-indicator {
      background-color: var(--ocean) !important;
    }
  }
}
