@import "src/assets/styles/responsive-base.scss";

h1 {
  margin-bottom: 48px;
}

.contacts{
  max-width: 600px;
}

#contact-search {
  margin: 32px 0;
  max-width: 600px;

  #contact-search-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    .mat-mdc-form-field{
      margin-top: 10px;
      margin-bottom: 10px;
      width: 100%;
    }

    .add-button{
      display: none;
      &.visible{
        display: block;
      }
    }
  }
}

.one-contact {
  .contact-line {
    display: flex;
    justify-content: space-between;

    .avatar-cont {
      display: flex;
      align-items: center;
      margin: 16px 0;

      app-avatar {
        width: 30px;
        height: 30px;
      }
    }

    .avatar-buttons {
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
  }
}

:host {
  display: flex;
  height: 100%;

  > div {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;

    > div {
      position: absolute;
    }
  }
}

.contact-container{
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;

  padding: 10px;
  @include screen('phone'){
      max-width: 600px;
  }

  &.compact-view{
    flex-direction: column;
    align-content: flex-start;

    app-avatar{
      display: none;
    }

    .contact-item{
      padding: 0px 5px;
    }
  }


  .contact-item{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    padding: 5px 5px;
    border-radius: 3px;
    border: 1px solid transparent;
  
    &.selected{
        background-color: rgba(255, 255, 255, 0.1);
    }

    .avatar-cont{
      display:flex;
      app-avatar{
        width:30px;
        height:30px;
        margin: 0;
        margin-right: 10px;
      }
    }

    .avatar-name-cont{
      width: 140px;

      .overflow{
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  
    &:hover{
      background-color: rgba(255, 255, 255, 0.1);
    }
  }
}

