@import "../../../variables.less"; 
@import "../../../mixins.less";

#ProfileHeader {
  /* Only for owner because the 'refuse connection' button
  that is displayed on profile of profile of other user
  will be displayed under the banner */
  &.profileHeaderOwner {
    overflow: hidden;
  }

  .profileBannerImg {
    overflow: visible;

    .v-responsive__sizer {
      padding-bottom: 0 !important;
    }
  }

  .profileHeaderTitle {
    margin-top: 28px;
    margin-bottom: 28px;
  }

  .changeBannerButton {
    position: absolute;
    padding: 0;
    margin: 0;
    display: inline;
    background: rgba(0, 0, 0, 0.2) !important;
    left: auto;
    top: 15px;
    height: 36px;
    width: 36px;
    border-radius: 50%;

    .v-input__prepend-outer {
      margin: 0;

      button {
        color: #fff;
        padding: 3px;
      }
    }

    .v-input__control {
      visibility: hidden;
      width: 0;
      height: 0;
    }

    &:not(.skeleton-background) {
      border: 1px solid #fff !important;
    }

    button {
      margin: auto;
      min-width: 30px;
      height: 30px;
      justify-content: flex-end;

      &:before {
        font-family: "PLF-FONT-ICONS";
        content: "\e956";
        font-size: 18px;
      }
    }
  }

  .invitationButtons {
    position: relative;
    top: 4px;

    .acceptToConnectButtonParent {
      display: inline-flex;
  
      .acceptToConnectButton {
        border-right: 1px solid @btnBorder !important;
        border-bottom-right-radius: 0 !important;
        border-top-right-radius: 0 !important;
  
        .v-btn__content {
          span {
            overflow: hidden !important;
            text-overflow: ellipsis !important;
          }
        }
      }
      .peopleButtonMenu {
        border-bottom-left-radius: 0 !important;
        border-top-left-radius: 0 !important;
        min-width: auto;
        padding: 0;

        i {
          margin: 0;
        }

        &.dialogButton {
          display: none;
        }  
      }

    }
    .refuseToConnectButton {
      margin-top: 2px;
      position: absolute;
      left: 0;
      top: 24px;
      min-width: 76%;
      max-width: 76%;
    }
  }
}

.profileHeaderAvatar {
  border: 2px solid @lightWhite !important;
  position: relative !important;

  &.profileHeaderAvatarHoverEdit {
    background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(4, 4, 4) 80%, rgba(0,0,0,1) 100%);

    .v-image__image {
      opacity: 0.8;
    }
  }

  .changeAvatarButton {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    padding: 0;
    margin: 0;
    display: inline;

    .v-input__prepend-outer {
      margin: 0;

      button {
        color: #fff;
        padding: 3px;
      }
    }

    .v-input__control {
      visibility: hidden;
      width: 0;
      height: 0;
    }
  }
}

@media (max-width: @maxTabletWidth) {
  #ProfileHeader {
    .profileBannerImg {
      height: 218px !important;
      min-height: 218px !important;
      max-height: 218px !important;
      background: white;

      > .v-image__image {
        max-height: 50% !important;
        max-width: ~"calc( 100% - 12px )";
        margin: 6px;
      }

      > .v-responsive__content {
        max-height: 50% !important;
        margin-top: 108px;
        display: block;

        > .layout {
          max-height: 100%;
        }

        .profileHeaderAvatar {
          height: 95px !important;
          min-width: 95px !important;
          width: 95px !important;
          position: absolute !important;
          top: 50px !important;
        }

        .profileHeaderTitle {
          margin: 0;
        }

        .profileHeaderText {
          position: absolute;
          top: 145px;

          > .skeleton-text {
            margin-top: 10px !important;
            margin-left: 18px !important;
          }
          .headline {
            color: @textColor !important;
          }
          .subtitle {
            color: @greyColorLighten1 !important;
          }
          .headline, .subtitle {
            max-width: ~"calc(100vw - 50px)";
            box-sizing: border-box;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            display: block;
          }
        }

        #profileHeaderActions {
          margin: 8px 0 !important;

          button {
            margin: 0 6px !important;
            padding: 0 !important;
            min-width: auto !important;
            background: transparent !important;
            border: 0 !important;

            .buttonText {
              display: none;
            }
            i {
              color: @primaryColor !important;
            }
          }

          .acceptToConnectButton, .refuseToConnectButton {
            display: none;
          }

          .invitationButtons {
            min-width: 24px;
            display: inline-block !important;
            height: 21px;
            top: 0;
          }

          .acceptToConnectButtonParent {
            position: absolute;
          }

          .peopleButtonMenu {
            &.dropdownButton {
              display: none;
            }
            &.dialogButton {
              margin: 0 !important;
              display: block;
            }
          }
        }
      }
    }
  }
}