@import '../../../../../scss/settings/color-variables.scss';

::ng-deep.user-card {
  .dropdown-toggle {
    cursor: pointer;
  }
  .cover-img-block {
    position: relative;
    > img {
      width: 100%;
    }
    .change-cover {
      position: absolute;
      top: 30px;
      left: 30px;
      z-index: 5;
      opacity: 0;
      transition: all 0.3s ease-in-out;

      .dropdown-toggle {
        color: $white;
        background: rgba(0, 0, 0, 0.6);
        width: 45px;
        height: 45px;
        border-radius: 50%;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;

        &:after {
          display: none;
        }
      }
    }

    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      z-index: 1;
      background: rgba(0, 0, 0, 0.4);
      transition: all 0.3s ease-in-out;
    }

    &:hover {
      .change-cover,
      .overlay {
        opacity: 1;
      }
    }
  }

  .user-about-block {
    margin-top: -20px;
    z-index: 1;
    position: relative;

    img {
      box-shadow: 0 0 0 5px $white;
    }

    .certificated-badge {
      position: absolute;
      bottom: -5px;
      right: -5px;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      background: $white;
      padding: 5px 3px;

      .bg-icon {
        font-size: 22px;
      }

      .front-icon {
        font-size: 11px;
        position: absolute;
        top: 11px;
        left: 9px;
      }
    }
  }

  .hover-data {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(36, 46, 62, 0.92);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: all 0.3s ease-in-out;
  }

  &:hover {
    .hover-data {
      transform: scale(1);
    }
  }

  .change-profile {
    .dropdown-toggle::after {
      display: none;
    }

    .profile-dp {
      position: relative;
      overflow: hidden;
      padding: 5px;
      width: 110px;
      height: 110px;
      border-radius: 50%;

      .overlay {
        position: absolute;
        top: 5px;
        left: 5px;
        width: calc(100% - 10px);
        height: calc(100% - 10px);
        border-radius: 50%;
        opacity: 0;
        z-index: 1;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.4);
        transition: all 0.3s ease-in-out;

        span {
          background: rgba(0, 0, 0, 0.5);
          color: $white;
          position: absolute;
          bottom: 0;
          width: 100%;
          text-align: center;
          border-top: 1px solid rgba(255, 255, 255, 0.4);
          padding: 0 0 5px;
        }
      }

      &:hover {
        .overlay {
          opacity: 1;
        }
      }
    }
  }
  @media only screen and (max-width: 992px) {
    .user-about-block {
      margin-top: -10px;
    }

    .wid-80 {
      width: 60px;
    }

    .change-profile .profile-dp {
      width: 90px;
      height: 90px;
    }

    .cover-img-block {
      .change-cover {
        .dropdown-toggle {
          padding: 5px 7px;
        }
      }
    }
  }
}
