@use 'src/styles/abstracts' as *;

.RunOverviewSidebar {
  width: $run-overview-sidebar-width;
  min-width: $run-overview-sidebar-width;
  overflow-y: auto;
  overflow-x: hidden;
  padding: $space-unit * 2 $space-xs $space-xs;
  position: sticky;
  top: 0;
  h3 {
    margin-bottom: $space-sm;
  }
  &__wrapper {
    height: -moz-fit-content;
    height: fit-content;
  }
  &__section {
    margin: 0 1rem 1.5rem;

    &__info {
      .Icon__container {
        font-size: 0.875rem;
        margin-right: 0.75rem;
      }
      &__listItem {
        display: flex;
        align-items: center;
        height: 1.75rem;
        margin-bottom: $space-xxxxs;
        span {
          max-width: 15rem;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        &__copyRunHashButton {
          .Icon__container {
            margin-right: 0;
          }
        }
      }
      .runHashListItem {
        justify-content: space-between;
        &__hashWrapper {
          display: flex;
          max-width: calc(100% - 1.5rem);
          span {
            max-width: calc(100% - 26px);
          }
        }
      }
    }
    &__descriptionBox {
      padding-top: $space-md;
      &__header {
        display: flex;
        justify-content: space-between;
        a {
          text-decoration: unset;
        }
        i {
          color: $pico-50;
        }
        h3 {
          margin-top: $space-xxxs;
        }
      }
      &__description {
        display: flex;
        max-height: 4.5rem;
        overflow: hidden;
        position: relative;
        word-break: break-all;
        flex-direction: column;
        .dots {
          background: $cuddle-10;
          position: absolute;
          bottom: 0;
          right: 0;
          height: 0.775rem;
          display: flex;
          justify-content: center;
          align-items: center;
          width: 4.5rem;
          display: flex;
          justify-content: flex-end;
          padding-right: $space-xxxs;
          cursor: pointer;
        }
        &.showAll {
          max-height: 100%;
        }
        &.hasMore {
          &:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            height: toRem(10px);
            width: 100%;
            z-index: 1;
          }
        }
      }
      &__seeMoreButtonBox {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        display: flex;
        padding-top: $space-xxxxs;
        .Text {
          cursor: pointer;
          &:hover {
            text-decoration: underline;
          }
        }
      }
    }

    &__tags {
      &-list {
        display: flex;
        align-items: center;
        overflow: auto;
        .Badge {
          margin-right: 0.5rem;

          &:last-child {
            margin-right: 0;
          }
        }
      }
    }

    &__insights {
      padding-top: 1.5rem;
      margin: unset;

      h3 {
        margin-left: 1rem;
      }
    }

    &__Divider {
      margin: 0 1rem;
    }
  }

  &__NavLink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2rem;
    padding: 0 $space-unit;
    margin-bottom: $space-xxxxs;
    border-radius: $border-radius-sm;
    transition: background-color 0.18s ease-out;
    outline: none;
    text-decoration: none;
    &:hover {
      background-color: $cuddle-30;
    }
  }
}
