/* ###### 7.4 Contacts  ###### */

@media (min-width: 768px) and (max-width: 991.98px) {
  .main-content-body-show {
    .main-header-contacts .main-header-menu-icon {
      display: flex;
    }

    .main-content-left-contacts {
      display: block;
    }
  }
}

.main-content-left-contacts {
  width: 100%;
  display: block;
  padding: 0;

  .main-content-breadcrumb,
  .main-content-title {
    padding-inline-start: 20px;
  }
}

@media (min-width: 992px) {
  .main-content-left-contacts {
    .main-content-breadcrumb,
    .main-content-title {
      padding-inline-start: 0;
    }
  }
}

@media (min-width: 768px) {
  .main-contacts-list {
    height: 730px;
    position: relative;
  }
}

.main-contact-label {
  padding-block-start: 20px;
  padding-block-end: 10px;
  padding-inline-start: 20px;
  font-weight: 700;
  font-size: 15px;
  color: #{$primary};
  position: relative;
  border-block-start: 1px solid #{$border};
  margin-inline-start: -10px;

  &::after {
    content: "";
    position: absolute;
    inset-block-end: -1px;
    inset-inline-start: 0;
    inset-inline-end: 0;
    border-block-end: 1px solid #{$border};
    z-index: 5;
  }
}

@media (min-width: 992px) {
  .main-contact-label {
    padding-inline-start: 30px;
  }
}

.main-contact-item {
  padding: 10px 20px;
  border: 1px solid transparent;
  border-inline-end-width: 0;
  display: flex;
  position: relative;
  cursor: pointer;

  + .main-contact-item {
    margin-block-start: -1px;
    border-block-start-color: #{$gray-200};

    &::before {
      content: "";
      position: absolute;
      inset-block-start: -1px;
      inset-inline-start: 0px;
      inset-inline-end: 0;
      border-block-start: 1px solid #{$gray-200};
    }
  }

  &:hover,
  &:focus {
    background-color: #{$gray-100};
    border-block-start-color: #{$gray-200};
    border-block-end-color: #{$gray-200};
  }

  &.selected {
    z-index: 1;
    border-inline-start-color: #{$primary};
    border-block-start-color: #{$gray-200};
    border-block-end-color: #{$gray-200};
    background-color: #{$gray-100};
  }
}

@media (min-width: 992px) {
  .main-contact-item {
    padding: 15px 30px;
  }
}

.main-contact-body {
  flex: 1;
  margin-inline-start: 15px;

  h6 {
    color: #{$gray-600};
    font-weight: 500;
    margin-block-end: 0px;
  }

  span {
    font-size: 13px;
    color: #{$gray-600};
  }
}

.main-contact-star {
  display: block;
  font-size: 20px;
  color: #{$muted};
  position: relative;
  outline: none;
  margin: auto;
  text-align: center;
  a {
    color: #{$muted};
  }
  &:hover,
  &:focus {
    color: #{$gray-600};
  }

  &.active {
    color: #{$warning};
  }
}

.main-content-body-contacts {
  display: none;
}

@media (min-width: 768px) {
  .main-content-body-contacts {
    display: block;
    overflow-y: auto;
  }
}

@media (min-width: 992px) {
  .main-content-body-contacts {
    overflow: visible;
  }
}

.main-contact-info-header {
  padding-block-start: 40px;
  padding-inline-start: 20px;
  padding-block-end: 20px;
  border-block-end: 1px solid #{$border};
  position: relative;

  .media {
    display: block;
  }

  .main-img-user {
    width: 100px;
    height: 100px;

    a {
      position: absolute;
      inset-block-end: 0;
      inset-inline-end: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background-color: #{$gray-600};
      color: rgb($white) ;
      font-size: 18px;
      line-height: 0.9;
      box-shadow: 0 0 0 2px rgb($white) ;
      border-radius: 100%;

      &:hover,
      &:focus {
        background-color: #{$primary};
      }
    }
  }

  .media-body {
    margin-block-start: 30px;

    h4 {
      color: #{$gray-900};
      font-size: 26px;
      font-weight: 500;
      margin-block-end: 8px;
      line-height: 1;
    }

    p {
      color: #{$default-color};
      margin-block-end: 15px;
    }

    .nav-link {
      padding: 0;
      display: flex;
      align-items: center;
      color: #{$gray-600};
      font-size: 13px;

      i {
        font-size: 0.875rem;
        line-height: 0;
        margin-inline-end: 5px;

        &.typcn {
          line-height: 0.9;

          &::before {
            width: auto;
          }
        }
      }

      &:hover,
      &:focus {
        color: #{$primary};
      }

      + .nav-link {
        margin-inline-start: 10px;
      }
    }
  }
}

@media (min-width: 576px) {
  .main-contact-info-header {
    padding-block-start: 20px;
  }
}

@media (min-width: 992px) {
  .main-contact-info-header {
    padding-inline-start: 30px;
    padding-block-end: 25px;
  }
}

@media (min-width: 992px) {
  .main-contact-info-header .media {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 992px) {
  .main-contact-info-header .media-body {
    margin-block-start: 0;
    margin-inline-start: 30px;
  }
}

@media (min-width: 576px) {
  .main-contact-info-header .media-body .nav-link {
    font-size: 0.875rem;
  }
}

@media (min-width: 576px) {
  .main-contact-info-header .media-body .nav-link i {
    margin-inline-end: 7px;
  }
}

@media (min-width: 576px) {
  .main-contact-info-header .media-body .nav-link + .nav-link {
    margin-inline-start: 25px;
  }
}

.main-contact-action {
  position: absolute;
  inset-block-start: 24px;
  inset-inline-end: 20px;
  display: flex;

  a {
    display: flex;
    align-items: center;
    color: #{$gray-600};
    font-size: 12px;

    &:hover,
    &:focus {
      color: #{$primary};
    }

    i {
      font-size: 15px;
      line-height: 0;
    }
  }
}

@media (min-width: 992px) {
  .main-contact-action {
    inset-inline-end: 20px;
  }
}

.main-contact-info-body {
  padding-inline-start: 20px;

  .media-list {
    padding: 20px 0;
  }

  .media {
    align-items: center;
    position: relative;

    + .media {
      margin-block-start: 30px;

      &::before {
        content: "";
        position: absolute;
        inset-block-start: -15px;
        inset-inline-start: -19px;
        inset-inline-end: 0;
        border-block-start: 1px dotted #{$gray-300};
      }
    }

    &:last-child {
      margin-block-end: 15px;
    }
  }

  .media-icon {
    font-size: 32px;
    color: #{$gray-500};
    line-height: 1;
    width: 40px;
    text-align: center;
  }

  .media-body {
    margin-inline-start: 0;

    > div + div {
      margin-block-start: 15px;
    }

    label {
      color: #{$gray-600};
      margin-block-end: 0;
      display: block;
      font-size: 13px;
    }

    span {
      font-size: 12px;
      display: block;
      font-weight: 400;
    }
  }
}

@media (min-width: 992px) {
  .main-contact-info-body {
    height: calc(100% - 126px);
    position: relative;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body .media-list {
    padding: 25px 0;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body .media-icon {
    width: 100px;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body .media-body {
    display: flex;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body .media-body > div {
    flex: 1;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body .media-body > div + div {
    margin-block-start: 0;
  }
}

@media (min-width: 992px) {
  .main-contact-info-body {
    height: calc(100% - 126px);
    position: relative;
  }
}

.main-contact-info-header .main-img-user img {
  width: 100px !important;
  height: 100px !important;
}

@media (min-width: 769px) and (max-width: 991px) {
  .main-contacts-list {
    height: 627px;
    position: relative;
  }
}

@media (max-width: 768px) {
  .main-contacts-list {
    height: 600px;
    position: relative;
  }
}

.main-contact-item .main-img-user::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  width: 6px;
  height: 6px;
  background-color: #17b86a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
  border-radius: 100%;
  inset-block-end: 3px;
  display: block !important;
}

.main-content-body-contacts .main-contact-info-header .main-img-user::after {
  display: none !important;
}

.contact-icon {
  display: inline-flex;
  width: 35px;
  height: 35px;
  text-align: center;
  font-size: 1rem;
  align-items: center;
  justify-content: center;
  margin-inline-start: 3px;
  border-radius: 4px;
}
.main-contact-star .dropdown-menu.dropdown-menu-right {
  inset-block-start: -20px;
  box-shadow: 0px 0px 10px 0px #e5edff;
}

#mainContactList {
  .tab-content {
    padding: 1.5rem;
  }
}
