@use "../../../scss/globals.scss";

.all-friends-modal {
  display: flex;
  flex-direction: column;
  gap: globals.$spacing-unit;
  max-height: 400px;
  margin-top: calc(globals.$spacing-unit * -1);

  &__title {
    display: flex;
    align-items: center;
    gap: globals.$spacing-unit;
  }

  &__count {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
  }

  &__list {
    display: flex;
    flex-direction: column;
    gap: globals.$spacing-unit;
    overflow-y: auto;
    padding-right: globals.$spacing-unit;
  }

  &__item {
    display: flex;
    align-items: center;
    gap: calc(globals.$spacing-unit * 2);
    padding: calc(globals.$spacing-unit * 1.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all ease 0.2s;

    &:hover {
      background-color: rgba(255, 255, 255, 0.05);
    }
  }

  &__info {
    display: flex;
    flex-direction: column;
    gap: calc(globals.$spacing-unit / 2);
    flex: 1;
    min-width: 0;
  }

  &__name {
    font-weight: 600;
    color: globals.$muted-color;
    font-size: globals.$body-font-size;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__game {
    display: flex;
    align-items: center;
    gap: globals.$spacing-unit;
    font-size: globals.$small-font-size;
    color: globals.$body-color;

    img {
      border-radius: 4px;
    }

    small {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  &__empty {
    text-align: center;
    padding: calc(globals.$spacing-unit * 4);
    color: globals.$body-color;
  }

  &__loading {
    display: flex;
    justify-content: center;
    padding: calc(globals.$spacing-unit * 2);
  }

  &__load-more {
    display: flex;
    justify-content: center;
    padding-top: globals.$spacing-unit;
  }
}
