@use "sass:math";

@import '~styles/config';

.profileListItem {
  display: flex;
  align-items: center;

  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: $color-grey100;

  transition: background-color 300ms ease-in-out;

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

  &__checkbox {
    @include colorify('color');
    display: flex;
    justify-content: center;
    align-items: center;

    width: 60px;

    cursor: pointer;
  }

  &__profile {
    @include reset-anchor;
    padding: $gutter 0;
    width: calc(100% - 100px);

    @media (min-width: $min-tablet) {
      display: flex;
      flex-direction: column;
    }

    &.noSelection {
      width: calc(100% - 40px);
    }

    &.noEdit {
      width: 100%;
    }

    .isDisabled & {
      opacity: 0.4;
    }

    &:hover,
    &:focus {
      cursor: pointer;
    }
  }

  &__profileWrapper {
    width: 100%;

    @media (min-width: $min-tablet) {
      display: flex;
    }
  }

  &__subscription {
    display: flex;
    align-items: center;

    @media (min-width: $min-tablet) {
      width: percentage(math.div(5, 12));
    }
  }

  &__subscriptionWrapper {
    padding: 0 0 8px 8px;
    @media (min-width: $min-tablet) {
      padding: 0 24px;
    }
  }

  &__title {
    text-decoration: none;
    font-size: 20px;
    @media (min-width: $min-tablet) {
      @include responsive-font(15, 17);
    }

    font-family: $font-heading;
    font-weight: 700;
    color: $color-dark;

    transition: color 120ms ease-in;
    hyphens: auto;

    &.profile {
      @include colorify('color');
    }

    &.usagePack {
      position: relative;
      margin-right: 16px;
      font-size: 16px;
      font-weight: 500;

      &::after {
        content: ' - ';
        position: absolute;
        right: -8px;
      }

      @media (min-width: $min-tablet) {
        font-weight: 700;
        @include responsive-font(15, 17);
        @include colorify('color');

        &::after {
          content: '';
        }
      }
    }
  }

  &__subtitle {
    font-size: 16px;
    @media (min-width: $min-tablet) {
      @include responsive-font(12, 14);
      margin-top: 8px;
    }

    font-family: $font-heading;
    font-weight: 500;
    color: $color-dark;

    &.profile,
    &.usagePack {
      @media (min-width: $min-tablet) {
        margin-top: 8px;
      }
    }

    &.total {
      font-size: 8px;
      color: $color-grey500;
    }

    &Prefix {
      color: $color-grey500;
    }
  }

  &__usagePacks {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;

    @media (min-width: $min-tablet) {
      flex-wrap: nowrap;
      width: percentage(math.div(4, 12));
    }
  }

  &__usagePack {
    @include responsive-font(15, 18);
    display: flex;
    flex-wrap: wrap;
    padding: 0 8px 8px;

    @media (min-width: $min-tablet) {
      flex-direction: column;
      padding: 0 8px;
    }
  }

  &__usageListItems {
    display: flex;
    @media (min-width: $min-tablet) {
      width: percentage(math.div(5, 12));
    }
  }

  &__total {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;

    @media (min-width: $min-tablet) {
      flex-wrap: nowrap;
      width: percentage(math.div(3, 12));
    }
  }

  &__totalWrapper {
    padding: 0 8px;
    width: 100%;
    text-align: right;
    @media (min-width: $min-tablet) {
      padding: 0 24px 0 8px;
    }
  }

  &__status {
    padding: 0 0 8px 8px;
    font-size: 16px;

    @media (min-width: $min-tablet) {
      margin-top: 8px;
      padding: 0 24px;

      font-size: 15px;
    }
  }

  &__edit {
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    width: 40px;
    cursor: pointer;
  }
}
