@use "../base/mixins" as *;
@use "../base/variables" as *;
@use "../base/typography" as *;

.table {
  width: 100%;

  &--a {
    min-width: 1200px;
  }

  &--b {
    min-width: 560px;
  }

  &__inner {
    overflow: hidden;
    border-radius: 0.8rem;
    border: 1px solid theme-color($table-th-border);
  }

  &__wrap {
    overflow-x: auto;
    width: 100%;

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

  &__row {
    &--th {
      .table:has(.table__row--td) {
        border-bottom: 1px solid theme-color($table-th-border);
      }
    }

    &--td {
      &:not(:last-child) {
        border-bottom: 1px solid theme-color($table-tb-border);
      }
    }
  }

  &__cell {
    white-space: nowrap;

    &-wrap {
      display: flex;
      align-items: center;
      gap: 0.8rem;

      img {
        flex-shrink: 0;
        width: 2rem;
        height: 2rem;
        border-radius: 0.4rem;
        object-fit: cover;
      }
    }

    &-profit {
      display: flex;
      gap: 0.2rem;
    }

    &--th {
      padding: 1.5rem 1.6rem;
      font-weight: 500;

      [data-theme="dark"] & {
        background-color: rgba(#898989, 0.2);
      }

      [data-theme="light"] & {
        background-color: #ffffff;
      }

      @include media("lg") {
        padding: 1.4rem 1.2rem;
      }
    }

    &--td {
      padding: 1.5rem 1.6rem;
      color: theme-color($text-high);
      font-weight: 700;

      @include media("lg") {
        padding: 1.4rem 1.2rem;
      }

      [data-theme="dark"] & {
        background-color: rgba(#898989, 0.04);
      }

      [data-theme="light"] & {
        background-color: rgba(#fff, 0.4);
      }
    }

    &--primary {
      color: theme-color($primary);
    }

    &--secondary {
      color: theme-color($secondary);
    }
  }
}