@import '../../../../constants/theme.scss';
@import '../../../../utils/mixins.scss';

.error {
  @include spacing($margin: 0 auto);
  @include theme(color, contrast1);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
}

.table {
  border: 1px solid $grey-3;
  border-collapse: collapse;

  & th,
  & td {
    border: 1px solid $grey-3;
  }
}

.caption {
  @include spacing(0 0 1rem);
  @include theme(color, contrast2);
  font-size: 1.5rem;
  font-weight: 500;
}

.coinCell {
  @include spacing(0.5rem 0.75rem);
  width: 28%;
}

.priceCell {
  @include spacing(0.5rem 0.75rem);
  width: 44%;
}

.capCell {
  @include spacing(0.5rem 0.75rem);
  width: 28%;
}

.headerRow {
  & th {
    @include theme(color, ePrimary);
    @include spacing(1rem);
    text-align: left;
    font-weight: 600;
  }
}

.coinCellContent {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;

  & .nameContainer {
    display: flex;
    flex-direction: column;

    & .symbol {
      @include theme(color, contrast1);
      text-transform: uppercase;
      font-size: 0.95rem;
      font-weight: bold;
    }

    & .name {
      @include theme(color, contrast1Opacity50);
      font-size: 0.75rem;
      font-weight: 400;
      letter-spacing: -0.25px;
    }
  }

  & .image {
    width: 1.75rem;
    aspect-ratio: 1 / 1;
  }
}

.priceCellContent {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;

  & .price {
    @include theme(color, contrast1);
    font-size: 0.95rem;
    font-weight: bold;
  }

  & .lowHigh {
    display: flex;
    flex-direction: row;

    & .tablet {
      @include spacing(0.5rem);
      font-size: 0.75rem;

      &.tabletHigh {
        @include theme(color, green1);
        @include theme(background-color, green2);
        border-top-left-radius: 0.2rem;
        border-bottom-left-radius: 0.2rem;
      }

      &.tabletLow {
        @include theme(color, red1);
        @include theme(background-color, red2);
        border-top-right-radius: 0.2rem;
        border-bottom-right-radius: 0.2rem;
      }
    }
  }
}

.cap {
  @include theme(color, contrast1Opacity90);
  font-size: 0.95rem;
  font-weight: bold;
}

.buttonsContainer {
  @include spacing(1rem 0 0);
  display: flex;
  flex-direction: row;
  align-self: flex-end;
  gap: 0.5rem;
}
