/*------------------------------------------------------------------
[Table of contents]

1. .user-status-list
2. .user-status
-------------------------------------------------------------------*/
/*-------------------------
    1. USER STATUS LIST
-------------------------*/
.user-status-list {
  .user-status {
    margin-bottom: 22px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  &.user-status-list-3-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, 276px);
    grid-gap: 22px 0;

    .user-status {
      margin-bottom: 0;
    }
  }
}

/*---------------------
    2. USER STATUS
---------------------*/
.user-status {
  min-height: 44px;
  padding: 2px 0 0 52px;
  position: relative;

  &.no-padding-top {
    padding-top: 0;
  }

  &.no-padding-left {
    padding-left: 0;
  }

  &.notification {
    padding-right: 60px;
  }

  &.user-status-with-icon {
    padding-right: 28px;
  }

  &.request,
  &.request-small {
    .user-status-title {
      margin-top: 2px;
      line-height: (16 / 14) * 1em;
    }

    .user-status-text {
      margin-top: 8px;
    }
  }

  &.request-small {
    padding-right: 48px;
  }

  &.request {
    padding-right: 100px;
  }

  &.user-status-selectable {
    padding-left: 86px;

    .user-avatar,
    .user-avatar-circle {
      left: 34px;
    }

    .checkbox-box {
      position: absolute;
      top: 10px;
      left: 0;
      right: auto;
    }
  }

  .checkbox-box {
    position: absolute;
    top: -16px;
    right: -22px;
    cursor: pointer;
  }

  .user-status-reaction-image {
    width: 20px;
    height: auto;
  }

  .post-format-tag,
  .user-status-avatar,
  .user-status-activity {
    position: absolute;
    top: 0;
    left: 0;
  }

  .post-format-tag,
  .user-status-avatar.picture {
    top: 2px;
  }

  .post-format-tag {
    width: 40px;
    height: 40px;
    box-shadow: none;
  }

  .user-status-avatar {
    &.picture {
      background-color: var(--color-primary);
    }
  }

  .user-status-activity {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;

    &.activity-reaction {
      background-color: $color-activity-reaction;
    }

    &.activity-comment {
      background-color: $color-activity-comment;
    }

    &.activity-share {
      background-color: $color-activity-share;
    }

    &.activity-update {
      background-color: $color-activity-update;
    }

    .user-status-activity-icon {
      fill: $white;
    }
  }

  .user-status-favorite-icon {
    margin-right: 6px;
    position: relative;
    top: -1px;
  }

  .user-status-title {
    color: var(--color-text);
    font-size: $fs-14;
    font-weight: $weight-medium;
    line-height: (20 / 14) * 1em;
    word-break: break-word;

    &.medium {
      font-size: $fs-16;

      & + {
        .user-status-text {
          margin-top: 2px;

          &.user-status-text_edited {
            margin-top: -8px;
          }
        }
      }
    }

    a,
    .bold {
      color: var(--color-text);
      font-weight: $weight-bold;
    }

    .highlighted {
      color: var(--color-primary-dark);
      font-weight: $weight-semibold;
    }

    .vikinger-user-tag,
    .vikinger-pmpro-level-tag {
      margin: 0 2px 2px 6px;
      display: inline-block;
      justify-content: flex-start;
      position: relative;
      top: -2px;

      & + {
        .vikinger-user-tag,
        .vikinger-pmpro-level-tag {
          margin-left: 2px;
        }
      }
    }
  }

  .user-status-timestamp {
    margin-top: 10px;
    color: var(--color-text-alt);
    font-size: $fs-12;
    font-weight: $weight-medium;

    &.small-space {
      margin-top: 4px;
    }

    &.floaty {
      margin-top: 0;
      position: absolute;
      top: 7px;
      right: 0;
    }
  }

  .user-status-text {
    margin-top: 4px;
    color: var(--color-text);
    font-size: $fs-14;
    font-weight: $weight-medium;
    word-break: break-word;

    &.small {
      font-size: $fs-12;
    }

    &.small-space {
      margin-top: 4px;
    }

    &.user-status-text_edited {
      margin-top: -8px;
    }

    a {
      color: var(--color-text);
      font-weight: $weight-bold;

      &:hover {
        color: var(--color-primary-dark);
        text-decoration: none;
      }
    }

    .user-avatar,
    .user-avatar-circle {
      display: inline-block;
      position: relative;
      top: 6px;
      margin: 0 4px;
    }
  }

  .user-status-tag {
    display: inline-block;
    height: 20px;
    padding: 0 8px;
    border-radius: 200px;
    background-color: $black;
    color: $white;
    font-size: $fs-12;
    font-weight: $weight-bold;
    line-height: 20px;
    text-transform: uppercase;
    position: relative;
    top: -3px;

    &.online {
      background-color: $color-online;
    }

    &.offline {
      background-color: $color-offline;
    }

    &.away {
      background-color: $color-away;
    }
  }

  .user-status-icon {
    fill: var(--color-icon);
    opacity: .4;
    position: absolute;
    top: 10px;
    right: 0;

    &.user-status-privacy-icon {
      top: 8px;
    }
  }
  
  .action-request-list {
    position: absolute;
    top: 2px;
    right: 0;
  }
}

.vikinger-user-tag-list {
  display: flex;
  justify-content: center;

  & > {
    .vikinger-user-tag {
      margin-right: 4px;

      &:last-child {
        margin-right: 0;
      }
    }
  }
}

.vikinger-user-tag {
  display: flex;
  justify-content: center;

  &.vikinger-user-tag_small {
    .vikinger-user-tag-text {
      padding-top: 5px;
      font-size: $fs-11;
    }
  }

  .vikinger-user-tag-text {
    padding: 4px 8px;
    border-radius: 200px;
    background-color: var(--color-primary);
    color: $white;
    font-size: $fs-12;
    font-weight: $weight-bold;
    text-transform: uppercase;
  }
}