// Imports Project Config File with wariables/mixins/functions
@import "../../assets/scss/config";

.es-list-view {
  .es-card {
    border: $es-card-border;
    background: $white;
    width: 100%;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    position: relative;

    &__label {
      position: absolute;
      top: 25px;
      left: 15px;
      flex-direction: row-reverse;
      &--icon {
        font-size: 15px;
        color: es-color(black, 6);
        cursor: pointer;
      }
    }

    &__favourited {
      cursor: pointer;
      color: es-color(orange, 9);
      z-index: 1;
    }

    &__active {
      box-shadow: inset -4px 0px 0px 0px es-color(green);
    }

    &__highlight {
      box-shadow: 0px 0px 10px 2px rgba(109, 183, 73, 0.5);
    }

    &__inner-wrap {
      display: flex;
      flex-direction: row;
      width: 100%;
    }

    .es-platform {
      top: 17px;
      left: 15px;
      flex-direction: row-reverse;
      position: absolute;
      display: flex;
      justify-content: space-between;
      z-index: 2;
      &__item {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-weight: bold;
        display: flex;
        justify-content: center;
        align-items: center;
        color: $white;
        border-radius: 2px;
        background-color: es-color(green);
        i {
          font-size: 12px;
        }

        &:first-child {
          margin-left: 3px;
        }

        &.placeholder {
          background: $placeholder;
          h3 {
            font-size: 13px;
            font-weight: bold;
            color: $white;
          }
        }

        &.isPlaceholder {
          opacity: 0.5;
          filter: grayscale(100%);
        }
      }
    }

    &__header {
      min-width: 300px;
      max-width: 300px;
      margin-left: 75px;
      height: 100%;
      display: flex;
      align-items: center;
      position: relative;
      padding: $es-card-padding;
      overflow: hidden;
      &:hover {
        min-width: 300px;
        max-width: 1200px;
        width: auto;
        transition: max-width 0.3s linear;
        .es-copy-to {
          &:hover {
            color: es-color(green);
          }
        }
        .es-card__header-long {
          margin-left: 0px;
          transition: margin-left 0.3s linear;
        }
      }
      &-short {
        display: none;
      }
      &-long {
        width: auto;
        height: 40px;
        display: flex;
        z-index: 5;
        margin-left: -80px;
        a {
          order: 2;
        }
      }
    } // End of header

    .es-copy-to {
      display: flex;
      font-size: 10px;
      margin-right: 10px;
      order: 1;
      width: 65px;
      cursor: pointer;
      color: es-color(black, 6);
      margin-top: 2px;
      span {
        margin-right: 10px;
        color: es-color(green);
        margin-top: 4px;
      }
    }

    &__name {
      margin: 0;
      font-weight: normal;
      font-size: 13px;
      line-height: 20px;
      width: 100%;
      font-weight: normal;
      display: -webkit-box;
      text-overflow: ellipsis;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      word-break: break-all;
      word-wrap: break-word;
      overflow: hidden;
      outline: 0;
      height: 40px;
    }

    &__image-wrapper {
      order: 1;
      position: relative;
      background-color: $es-border-color;
      background-image: url("../../../assets/img/no-image.png");
      background-repeat: no-repeat;
      background-position: center;
      min-width: 100px;
      max-width: 100px;

      &__image {
        height: 72px;
        width: 100px;
        object-fit: cover;
      }
      &__image-placeholder {
        background-color: $white;
      }
    } // End of Image Wrapper

    &__label-text {
      order: 2;
      margin-right: 10px;
      font-size: 12px;
      color: es-color(black, 6);
    }

    &__text {
      @include card-paragraph-break(300px);
      order: 1;
      font-size: 13px;
      width: 100%;
    }

    // Fixing overflow problem with tooltip and scroll
    &__content-wrap {
      display: flex;
      width: 100%;
      overflow-x: auto;
    }

    &__item {
      display: flex;
      flex-direction: column;
      width: 270px;
      height: 40px;
      padding: 0 20px;
      border-right: $es-card-border;

      &:first-child {
        border-left: $es-card-border;
      }
      &:last-child {
        border-right: none;
      }

      @media only screen and (max-width: 1300px) {
        min-width: 220px;
        width: 220px;
      }
    }

    &__content {
      order: 3;
      display: flex;
      flex-direction: row;
      padding: $es-card-padding;
      align-items: center;
      width: 100%;
      @media only screen and (max-width: 1300px) {
        width: auto;
      }
    } // End of Content

    p {
      font-size: 14px;
      margin: 0;
    }

    &__separator {
      height: 60%;
      width: 1px;
      background: $es-border-color;
      margin: auto 0;
    }

    &__social {
      order: 3;
      display: flex;
      justify-content: space-around;
      align-items: center;
      // height: 40px;
      &--item {
        color: es-color(black, 3);
        font-size: 14px;
        border-right: $es-card-border;
        padding: 0 8px 0 10px;
        &:last-child {
          border-right: none;
          margin-right: 15px;
        }
      }

      &--item-active {
        color: es-color(green);
      }
      @media only screen and (max-width: 1300px) {
        display: none;
      }
    }

    &__footer {
      order: 4;
      display: flex;
      justify-content: space-between;
      padding: 5px 14px;
      border-left: $es-card-border;
      margin: 15px 0px 15px auto;
      margin-left: auto;

      &--item {
        height: 100%;
        width: 33.33%;
        margin: 0;
        margin-top: 6px;
        margin-right: 10px;
        align-items: center;
        color: es-color(green);
        cursor: pointer;
        font-size: 15px;
        display: flex;
        a {
          color: es-color(green);
        }
        &:last-child {
          margin-right: 0px;
        }
      }
    } // End of footer
  } // Card end

  // Styling tags on list view
  .es-tags {
    overflow: visible;
    height: auto;
    min-width: 300px;
    max-width: 300px;
    border-bottom: none;
    &.extended {
      height: 196px;
      position: relative;
      display: flex;
      align-items: flex-start;
      overflow: visible;
      overflow-y: auto;
    }
    &.extended ~ .es-card__content {
      margin-top: 0px;
    }
  }

  .es-dropdown {
    height: auto;
    min-width: auto;
    max-width: 300px;
  }
} // es-tags

.es-sidebar-opened-move-content .es-list-view {
  .es-card__content {
    display: none;
  }
}
