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

.MediaSet {
  width: 100%;
  background-color: #ffffff;
  &__connectorLine {
    position: absolute;
    top: -0.375rem;
    height: 100%;
    width: 1px;
    background: $cuddle-70;
  }
  &__container {
    display: flex;
    flex-direction: column;
    &.withDash {
      position: relative;
      &::before {
        content: '';
        position: absolute;
        top: 0.375rem;
        left: -0.625rem;
        width: 0.375rem;
        height: 0.0625rem;
        background: $cuddle-70;
      }
    }
    &__path {
      display: inline-flex;
      &__title {
        padding-bottom: $space-xxxxs;
        font-size: $text-sm;
        position: relative;
        display: inline-flex;
        align-items: center;
        &__pointer {
          cursor: pointer;
        }
        &__key,
        &__value {
          &.stacked {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
          }
        }
        &__key {
          margin-right: $space-xxxs;
          &.stacked {
            max-width: toRem(137px);
          }
        }
        &__value {
          margin-left: $space-xxxs;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          &.stacked {
            max-width: toRem(227px);
          }
        }
      }
    }
    &__mediaItemsList {
      padding-bottom: $space-xxxs;
      padding-top: $space-xxs;
      display: flex;
    }
  }
}

.ImageBox {
  height: 100%;
  position: absolute;
  &__imageWrapper {
    height: 100%;
    width: 100%;
    position: relative;
    &-item {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      width: calc(100% - 0.25rem);
      & > span {
        height: 1rem;
        margin-top: $space-xxxxs;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
      }
      & > img {
        margin-top: toRem(5px);
        padding: toRem(1px);
        width: 100%;
        height: 100%;
      }
      &-heightAlign {
        img {
          height: calc(100% - 0.375rem);
        }
      }
    }
    &__zoomIconWrapper {
      position: absolute;
      top: toRem(14px);
      right: toRem(16px);
      color: $white;
      display: flex;
      align-items: center;
      justify-content: center;
      background: $primary-color-10;
      color: $primary-color;
      &:hover {
        background: $primary-color-20;
        color: $primary-color;
      }
      &.isHidden {
        display: none;
      }
    }
  }
  .skeletonContainer {
    margin-top: toRem(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: toRem(1px);
  }
  .focus img {
    box-shadow: 0 0 0 toRem(1.5px) $primary-color,
      inset 0 0 0px toRem(0.5px) $primary-color;
  }
  .active {
    & img,
    & .skeletonContainer {
      box-shadow: 0 0 0 toRem(1.5px) #b9d5f8, inset 0 0 0px toRem(0.5px) #b9d5f8;
    }
  }
  &__image {
    &--pixelated {
      image-rendering: pixelated;
    }
    &--smooth {
      image-rendering: auto;
    }
  }
}
