@import '../../lib/commonStyles/layout.scss';
@import '../../lib/commonStyles/reset.scss';
@import '../../lib/commonStyles/colors.scss';
@import '../../lib/commonStyles/fonts.scss';
@import '../../lib/commonStyles/text-ellipsis';

$rowHeight: 50px;

.root {
  padding: 0 15px;
}

@mixin label {
  width: 20%;
  color: $ash;
  vertical-align: middle;
  @include secondary-font;
}

.clearBoth {
  clear: both;
}

.section {
  line-height: 23px;
  overflow: hidden;
  margin: 0;
  padding: 20px 0;
  list-style: none;

  .item {
    overflow: hidden;
    min-width: 250px;
    &:not(:first-child) {
      margin-top: 20px;
    }
  }

  .label {
    @include label;
    display: inline-block;
    word-break: break-all;
    span {
      vertical-align: middle;
    }
  }

  .content {
    float: right;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 80%;
    box-sizing: border-box;
    padding-left: 5px;

    .text {
      display: inline-block;
      min-width: 40%;
      max-width: 80%;
      vertical-align: middle;
      @include secondary-font;
      @include text-ellipsis;
      color: $night;
      user-select: text;
    }
  }
}

.contacts {
  border-bottom: 1px solid $gray;

  .number {
    max-width: calc(80% - 70px);
  }

  .menu {
    float: right;
    text-align: right;
    margin-right: 5px;
    button {
      border: none;
      background: none;
      &:hover,
      &:focus,
      &:active {
        outline: none;
        i {
          color: $primary-color;
        }
        path {
          fill: $primary-color;
        }
      }
      &.disabled {
        cursor: not-allowed;
      }
      &.disabled:hover,
      &.disabled:focus,
      &.disabled:active {
        outline: none;
        i {
          color: #666;
        }
        path {
          fill: #666;
        }
      }
    }
    i {
      font-size: 20px;
      color: $ash;
    }
    .faxIcon {
      vertical-align: middle;
      path {
        fill: $ash;
      }
    }
  }
}

.profile {
  padding: 20px 0;
  border-bottom: 1px solid $gray;
}

.profileWrapper {
  position: relative;
  width: 100%;
  vertical-align: middle;
  display: flex;
}

.site {
  display: flex;
  padding-top: 15px;
  font-size: 13px;
  .label {
    flex: 1;
    color: #797979;
  }
  .content {
    overflow: hidden;
    flex: 4;
    padding-left: 5px;
  }
}

.avatar {
  display: flex;
  width: 45px;
  height: 45px;
  min-width: 45px;
  padding-right: 8px;
  padding-bottom: 5px;
  position: relative;

  .avatarImage {
    @include reset;
    width: 100%;
    height: 100%;
    line-height: 30px;
    text-align: center;
    border-radius: 100%;
  }

  .inactive {
    opacity: 0.3;
  }

  .sourceWrapper {
    position: absolute;
    overflow: hidden;
    background: #fff;
    padding: 2px;
    width: 16px;
    height: 16px;
    border-radius: 10px;
    top: -2px;
    right: 2px;
  }
}

.name {
  @include primary-font;
  @include text-ellipsis;
  font-size: 15px;
  user-select: text;
}

.name.withoutPresence {
  margin-top: -5px;
}

.info {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding-left: 5px;
}

.status {
  position: relative;
  .presence {
    overflow: hidden;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    border: 1px solid #fff;
    float: left;

    .presenceIcon {
      @include reset;
      width: 100%;
      height: 100%;
      position: relative;

      div {
        top: -2px;
        left: -1px;
      }
    }
  }
  .presenceName {
    @include field-value-font;
    color: $ash;
    margin-left: 5px;
    vertical-align: top;
  }
}

.email {
  li:not(:first-child) {
    margin-top: 20px;
  }
  li {
    a {
      width: 100%;
      vertical-align: middle;
      display: inline-block;
      user-select: text;
      @include secondary-font;
      @include text-ellipsis;
    }
    a,
    a:hover,
    a:visited,
    a:focus {
      color: $primary-color;
    }
  }
  .underline:hover {
    cursor: pointer;
    text-decoration: underline;
  }
}

.inactiveText {
  font-size: $tertiary-font-size;
  color: $coin;
}

.companyInfo {
  border-bottom: 1px solid $gray;
}
