@use "sass:math";

@import '~styles/config';

.transactionListItem {
  display: flex;
  padding: $gutter 0;

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

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

    width: 60px;

    cursor: pointer;
  }

  &__transaction {
    width: calc(100% - 60px);

    @media (min-width: $min-tablet) {
      display: flex;
      padding: 0 $gutter*0.5;
    }
  }

  &__col {
    display: flex;
    justify-content: space-between;

    margin: 5px 0;

    font-family: $font-heading;

    @media (min-width: $min-tablet) {
      margin: 0;
      width: percentage(math.div(2, 12));

      &.title {
        width: percentage(math.div(3, 12));
      }

      &.SVG {
        width: percentage(math.div(1, 12));
      }

      &.amount {
        justify-content: flex-end;
      }
    }
  }

  &__label {
    @include responsive-font(14, 15);
    font-weight: 500;
    color: $color-grey500;

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

  &__value {
    @media (max-width: $max-tablet) {
      text-align: right;
    }

    .title & {
      @include colorify('color');
      @include responsive-font(15, 17);

      margin: 0 0 0 5px;

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

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

      @media (min-width: $min-tablet) {
        margin: 0 5px;
      }
    }

    &.clickable {
      cursor: pointer;
    }

    .SVG & {
      @include reset-button;
      display: flex;
      flex-direction: column;
      margin: 0 0 0 5px;

      @media (min-width: $min-tablet) {
        margin: 0 5px;
        height: 40px;
        width: 40px;
      }

      @media (min-width: $min-desktop) {
        height: auto;
      }
    }

    .status & {
      @include responsive-font(14, 15);
      margin: 0 0 0 5px;
      font-weight: 500;

      @media (min-width: $min-tablet) {
        margin: 0 5px;
      }
    }

    .amount & {
      @include responsive-font(15, 17);
      margin: 0 0 0 5px;

      @media (min-width: $min-tablet) {
        margin: 0 5px;
      }
    }

    .total & {
      font-weight: 700;
    }
  }

  &__svg {
    height: 20px;
    width: 20px;
    cursor: pointer;
  }

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

    width: 40px;
    cursor: pointer;
  }
}
