@import './vars';

.vtj-data-item {
  margin: 4px 0;
  border: 1px solid $--vtj-background-color-dark-9;
  border-radius: 4px;
  font-size: 12px;

  &__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 3px 5px;
    border: 1px dashed transparent;
    background-color: $--vtj-background-color-dark-9;
    border-radius: 4px;
    color: $--vtj-secondary-color;
    align-items: center;
    .arrow {
      zoom: 0.8;
      margin-right: 5px;
      color: $--vtj-secondary-color;
      transition: transform 0.2s ease-in-out;
    }
    .open {
      transform: rotate(90deg);
    }
    &.is-pointer {
      cursor: pointer;
    }
  }

  &:hover {
    border-color: $--vtj-border-color;
    border: 1px dashed $--vtj-border-color;
  }
  &.is-current {
    .vtj-data-item__header {
      background-color: $--vtj-primary-color-light-9;
      color: $--vtj-primary-color;
    }
    border-color: $--vtj-primary-color-light-9;
    border: 1px solid $--vtj-primary-color-light-9;
  }

  &__title {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 1px;
    flex-grow: 1;
    display: block;
  }

  &__action {
    margin-top: -1px;
    i {
      padding: 4px;
      cursor: pointer;
      border-radius: 4px;
      margin-left: 5px;
      color: $--vtj-secondary-color;
      font-size: 12px;
      &:hover {
        background-color: $--vtj-primary-color-light-9;
        color: $--vtj-primary-color;
      }
      &.is-active {
        color: $--vtj-primary-color;
        font-weight: bold;
      }
    }
  }
  &__body {
    padding: 10px;
  }
}
