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

.es-card-wrapper {
  .es-card {
    transition: width 15s;
    border: $es-card-border;
    background: $white;
    position: relative;
    transition: box-shadow 0.5s cubic-bezier(0.6, 0.03, 0.06, 0.93);

    // Adding a min height to card when needed
    &__min-height {
      min-height: 380px;
    }

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

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

    &__label {
      position: absolute;
      top: 17px;
      right: 15px;
      &--icon {
        font-size: 15px;
        color: es-color(black, 6);
        cursor: pointer;
      }
    }

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

    .es-platform {
      top: 17px;
      right: 15px;
      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-right: 3px;
        }

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

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

    &__header {
      min-height: $es-card-header-height;
      padding: $es-card-padding;
      border-bottom: $es-card-border;
      &-long {
        opacity: 1;
        position: absolute;
        max-height: 50px;
        overflow: hidden;
        top: 0;
        left: 0;
        background-color: $white;
        width: 100%;
        min-height: 51px;
        padding: 15px 15px 5px;
        border-bottom: $es-card-border;
        display: flex;
        z-index: 1;
        flex-direction: column;
        transition: max-height 0.3s linear;
        &:hover {
          height: auto;
          max-height: 250px;

          .es-card__name {
            height: auto;
            min-height: 20px;
            max-height: 200px;
            -webkit-line-clamp: 8;
          }
          .es-copy-to {
            display: flex;
            align-items: center;
            font-size: 12px;
            &:hover {
              color: es-color(green);
              font-size: 12px;
            }
          }
        }
      }
    }

    .es-copy-to {
      border-top: $es-card-border;
      margin: 15px 0 0 0;
      padding: 10px 0 4px 0;
      font-size: 12px;
      color: es-color(black, 6);
      cursor: pointer;
      span {
        color: es-color(green);
        margin-right: 10px;
        font-size: 12px;
      }
    }

    &__name {
      margin: 0;
      font-size: 15px;
      overflow: hidden;
      height: 20px;
      max-height: 20px;
      transition: max-height 0.3s linear;
      width: 164px;
      line-height: 20px;
      font-weight: normal;
      display: -webkit-box;
      text-overflow: ellipsis;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 1;
      word-break: break-all;
      word-wrap: break-word;
    }

    &__image-wrapper {
      position: relative;
      background-color: $es-border-color;
      background-image: url("../../assets/img/no-image.png");
      background-repeat: no-repeat;
      background-position: center;
      height: 150px;
      width: 100%;
    } // End of Image Wrapper

    &__text {
      @include card-paragraph-break(218px);
      font-size: 13px;
      margin: 0;
    }

    &__label-text {
      font-size: 12px;
      color: es-color(black, 6);
    }

    &__content {
      padding: $es-card-padding;
      min-height: $es-card-content-height;
      &__content-only {
        min-height: $es-card-content-only-height;
      }
    } // End of Content

    &__social {
      display: flex;
      justify-content: space-around;
      align-items: center;
      border-top: $es-card-border;
      height: 40px;
      &--item {
        color: es-color(black, 3);
        font-size: 14px;
      }
      &--item-active {
        color: es-color(green);
      }
    }

    &__footer {
      display: flex;
      justify-content: space-around;
      border-top: $es-card-border;
      height: 40px;
      margin-top: auto;

      &--item {
        height: 100%;
        display: flex;
        margin: 0 auto;
        align-items: center;
        color: es-color(green);
        cursor: pointer;
        font-size: 15px;
        a {
          color: es-color(green);
        }
      }
    } // End of footer

    &__footer-separator {
      height: 60%;
      width: 1px;
      background: $es-border-color;
      margin: auto 0;
    }
  } // Card end
}
