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

.LogRecordItem {
  &__title {
    align-items: center;
    display: flex;
    padding: 0 $space-lg;
    .Icon__container {
      border-radius: $border-radius-circle;
      background-color: $primary-color-10;
      margin-right: $space-xxxs;
      color: $text-color;
    }
  }
  &__content {
    position: relative;
    padding-left: toRem(52px);
    padding-right: toRem(24px);
    padding-top: $space-xxxs;
    padding-bottom: $space-xxxs;
    height: 100%;
    &::before {
      content: '';
      position: absolute;
      top: -$space-xxxxs;
      left: 2.25rem;
      width: toRem(1px);
      height: calc(100% + 8px);
      background-color: $primary-color-20;
    }
    &-title {
      padding: 0 $space-lg;
    }
    &__item {
      border: $border-separator;
      border-radius: $border-radius-main;
      white-space: nowrap;
      display: flex;
      align-items: center;
      position: relative;
      height: 100%;
      &::before {
        content: '';
        position: absolute;
        left: -$space-unit;
        width: $space-unit;
        height: 1px;
        background-color: $primary-color-20;
      }
      &__leftBox {
        display: flex;
        align-items: center;
        height: 100%;
        width: 110px;
        border-right: $border-separator;
        padding: $space-xxxs $space-xxs;
        background-color: $cuddle-20;
        border-top-left-radius: $border-radius-main;
        border-bottom-left-radius: $border-radius-main;
        &__statusBadge {
          width: 24px;
          height: 24px;
          border-radius: $border-radius-circle;
          display: flex;
          justify-content: center;
          align-items: center;
          background: none;
          margin-right: $space-xxs;
        }
        &__content {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          justify-self: center;
        }
        &__date {
          margin-right: $space-xxs;
          @include monospaceFontFamily(12);
        }
        .Table__status_indicator {
          margin-right: 0;
        }
      }
      &__itemBox {
        font-size: $text-sm;
        background-color: rgba($primary-bg, 0.7);
        display: flex;
        flex-direction: column;
        flex: 1;
        align-items: flex-start;
        max-width: calc(100% - 110px);
        height: 100%;
        position: relative;
        padding: $space-xxxs $space-xs;
        overflow-x: auto;
        overflow-y: hidden;
        border-top-right-radius: $border-radius-main;
        border-bottom-right-radius: $border-radius-main;
        &__message {
          width: 100%;
          max-width: 100%;
          overflow: hidden;
          text-overflow: ellipsis;
          @include monospaceFontFamily(12);
        }

        &__extraParams {
          display: flex;
          max-width: 100%;
          max-height: 95px;
          margin-top: $space-sm;
          border: $border-separator;
          background-color: $cuddle-20;
          border-radius: $border-radius-main;
          transform: scale(0.85);
          -ms-transform-origin-x: left;
          -ms-transform-origin-y: top;
          -webkit-transform-origin-x: left;
          -webkit-transform-origin-y: top;
          cursor: pointer;

          &__dict {
            @include monospaceFontFamily(12);
            display: inline-block;
            position: relative;
            width: 100%;
            max-width: 100%;
            padding: $space-xxxxs $space-xxxs;
            text-overflow: ellipsis;
            overflow: hidden;
            border-radius: $border-radius-main;
            box-shadow: inset 0px -12px 20px -16px rgb(0 0 0 / 10%);
            transition: box-shadow ease-out 0.18s;
            
            &:hover {
              box-shadow: inset 0px -12px 20px -16px rgb(0 0 0 / 20%);

              .LogRecordItem__content__item__itemBox__extraParams__dict__overflowHandler {
                opacity: 1;
              }
            }

            > div:first-of-type {
              pointer-events: none;
            }

            &__overflowHandler {
              position: absolute;
              bottom: 0;
              left: 0;
              width: 100%;
              padding: $space-xxxs;
              display: flex;
              align-items: center;
              justify-content: center;
              border-bottom-left-radius: $border-radius-main;
              border-bottom-right-radius: $border-radius-main;
              opacity: 0;
              transition: opacity ease-out 0.18s;
            }
          }
        }
      }
    }
  }
}
