@use "../../../styles/abstracts/variables" as *;

.trans__item {
  display: grid;
  grid-template-columns: 1.7fr 2.7fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid $col-border-lining;
  min-width: 750px; // match the header width
  white-space: nowrap;
  transition: background 0.25s ease;
  line-height: 3.5;

  &:hover {
    background: rgba(0, 0, 0, 0.02);
  }

  span {
    font-size: 0.9rem;
    color: $col-dark-text;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  &--desc {
    color: $col-dark-text;
    font-weight: 500;
  }

  &--category {
    text-transform: capitalize;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    display: inline-block;
    width: fit-content;

    // &.regular {
    //   background: #f1f5f9;
    //   color: #334155;
    // }

    // &.project {
    //   background: #e9d5ff;
    //   color: #6b21a8;
    // }
  }

  &--amount {
    font-weight: 600;
    color: #0f172a;
  }

  &--type {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    width: fit-content;
    height: 2rem;
    text-transform: capitalize;

    &.credit {
      background: $col-success-bg;
      color: $col-success-color;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    &.debit {
      background: $col-danger-bg;
      color: $col-danger-color;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  &--actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
  }

  @media only screen and (max-width: 800px) {
    font-size: 0.8rem;
    grid-template-columns: 2fr 2.5fr 1.5fr 1fr 1fr 1fr;
    padding: 0.5rem;
    line-height: 3;
  }
}
