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

.invest__item {
  display: grid;

  grid-template-columns:
    250px
    150px
    150px
    100px
    200px
    200px
    150px
    150px;

  align-items: center;

  min-height: 68px;

  padding: 0.85rem 1rem;

  border-bottom: 1px solid $col-border-lining;

  transition: background 0.2s ease;

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

  span {
    font-size: 0.8rem;

    opacity: 0.85;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
  }

  /* ==========================
     STATUS
  ========================== */

  .port--success,
  .port--failed,
  .port--progress,
  .port--pending,
  .port--cancelled {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: fit-content;

    min-width: 100px;

    height: 32px;

    padding: 0 0.9rem;

    border-radius: 999px;

    font-size: 0.72rem;

    font-weight: 600;

    border: 1px solid transparent;
  }

  .port--success {
    background: rgba(34, 197, 94, 0.08);

    border-color: rgba(34, 197, 94, 0.18);

    color: #22c55e;
  }

  .port--progress {
    background: rgba(59, 130, 246, 0.08);

    border-color: rgba(59, 130, 246, 0.18);

    color: #3b82f6;
  }

  .port--pending {
    background: rgba(245, 158, 11, 0.08);

    border-color: rgba(245, 158, 11, 0.18);

    color: #f59e0b;
  }

  .port--failed {
    background: rgba(239, 68, 68, 0.08);

    border-color: rgba(239, 68, 68, 0.18);

    color: #ef4444;
  }

  .port--cancelled {
    background: rgba(161, 161, 170, 0.08);

    border-color: rgba(161, 161, 170, 0.18);

    color: #a1a1aa;
  }

  /* ==========================
     ACTIONS
  ========================== */

  &--actions {
    display: flex;

    align-items: center;

    span {
      display: inline-flex;

      align-items: center;
      justify-content: center;

      height: 34px;

      padding: 0 0.9rem;

      border-radius: 10px;

      background: rgba(247, 147, 24, 0.1);

      border: 1px solid rgba(247, 147, 24, 0.15);

      color: #f79318;

      font-size: 0.78rem !important;

      font-weight: 600;

      cursor: pointer;

      opacity: 1 !important;

      transition: all 0.2s ease;

      &:hover {
        background: rgba(247, 147, 24, 0.15);

        transform: translateY(-1px);
      }
    }
  }
}

/* ==========================
   TABLET
========================== */

@media (max-width: 1024px) {
  .invest__item {
    min-height: 64px;
  }
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 768px) {
  .invest__item {
    padding: 0.85rem;

    span {
      font-size: 0.75rem;
    }

    .port--success,
    .port--failed,
    .port--progress,
    .port--pending,
    .port--cancelled {
      min-width: 90px;

      height: 30px;

      font-size: 0.7rem;
    }
  }
}
