@use "../../../../styles/abstracts/variables";
@use "../../../../styles/abstracts/mixins";

.portfolio {
  width: 100%;
  min-width: 0;

  &__content {
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border-radius: 16px;

    border: 1px solid variables.$col-border-lining;

    background: #19191b;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
    -ms-overflow-style: none;

    &::-webkit-scrollbar {
      display: none;
    }

    /* ==========================================
       TABLE HEADER
    ========================================== */

    &__table {
      display: grid;

      grid-template-columns:
        220px
        140px
        120px
        180px
        180px
        120px;

      gap: 1rem;

      align-items: center;

      width: max-content;
      min-width: 100%;

      padding: 1rem 1.25rem;

      background: rgba(255, 255, 255, 0.03);

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

      span {
        color: rgba(
          255,
          255,
          255,
          0.55
        );

        font-size: 0.74rem;

        font-weight: 600;

        text-transform: uppercase;

        letter-spacing: 0.04em;

        white-space: nowrap;
      }
    }

    /* ==========================================
       TABLE BODY
    ========================================== */

    &__children {
      width: max-content;

      min-width: 100%;

      display: flex;

      flex-direction: column;
    }
  }
}

/* ==========================================
   HEADER
========================================== */

.header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 1rem;

  gap: 1rem;

  @media (max-width: 768px) {
    flex-direction: column;

    align-items: flex-start;
  }

  &__btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    height: 42px;

    padding: 0 1.2rem;

    border-radius: 12px;

    background: variables.$col-orange;

    color: variables.$col-dark;

    font-size: 0.85rem;

    font-weight: 600;

    transition: all 0.2s ease;

    &:hover {
      transform: translateY(-1px);

      box-shadow: 0 8px 18px
        rgba(255, 122, 0, 0.25);
    }
  }
}

/* ==========================================
   PAGINATION
========================================== */

.attend__pagination {
  margin-top: 1.25rem;

  display: flex;

  justify-content: flex-end;
}

/* ==========================================
   SKELETON
========================================== */

.skeletonRow {
  display: grid;

  grid-template-columns:
    220px
    140px
    120px
    180px
    180px
    120px;

  gap: 1rem;

  align-items: center;

  width: max-content;

  min-width: 100%;

  padding: 1rem 1.25rem;

  border-bottom: 1px solid
    rgba(255, 255, 255, 0.05);

  &:nth-child(even) {
    background: rgba(
      255,
      255,
      255,
      0.015
    );
  }
}

.skeletonCell {
  height: 14px;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );

  background-size: 200% 100%;

  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

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

@media (max-width: 1024px) {
  .portfolio__content__table {
    min-width: 1100px;
  }

  .portfolio__content__children {
    min-width: 1100px;
  }

  .skeletonRow {
    min-width: 1100px;
  }
}