.row {
  background: #ffffff;
  border-radius: 1.6rem;
  position: relative;
  text-align: center;
  @include flex-direction(column);
  @include flex-align(stretch, stretch);
  box-shadow: 0px 4px 4px -2px rgba(27, 27, 28, 0.04), 0px 6px 8px -2px rgba(27, 27, 28, 0.06);

  a {
    > span {
      width: auto;
    }
  }

  & > div:last-child:not(.container){
    padding: 0.8rem 2.4rem;
    background-color: #fafafa;
    border-radius: 0px 0px 16px 16px;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5rem;

    a {
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.5rem;
      margin: 0;
      width: auto;
    }
  }
}

.list,
.toplist_2 {
  &.rowNoTandC,
  > .container {
    @include min(tablet) {
      grid-template-columns: 1.5fr 1.5fr 1fr;
      text-align: inherit;
      column-gap: 2.4rem;
      row-gap: 2.4rem;
      align-items: center;
      
      ul {
        grid-row: 1/span 2;
        grid-column: 2;
        padding-left: 3rem;
      }

      > a:last-child {
        grid-column: 3;
      }
    }
  
    @include min(laptop) {
      grid-template-columns: 2.5fr 2fr 2fr 0.5fr;
  
      ul {
        grid-row: 1;
      }

      > a:last-child {
        grid-column: 4;
      }
    }
  }
}

.rowNoTandC {
  padding: 1.6rem;
  gap: 2.4rem;

  @include min(laptop) {
    padding: 2.4rem;
  }
}

.grid {
  @include flex-align(stretch, stretch);

  @include min(tablet) {
    @include flex-align(stretch, space-between);

    &.toplist_0,
    &.toplist_1 {
      display: flex !important;
    }
    
    > div {
      > a {
        > img {
          width: 8.8rem;
          height: 8.8rem;
        }
      }
    }
  }

  @include min(laptop) {
    &.toplist_2 {
      display: flex !important;
      align-items: flex-start;

      > ul {
        padding: 0;
      }

      > a:last-child {
        align-self: stretch;
      }
    }
  }
}

.container {
  padding: 1.6rem;
  @include flex-direction(column);
  @include flex-align(stretch, stretch);
  gap: 2.4rem;
  flex: 1;

  @include min(tablet) {
    display: grid;
  }

  @include min(laptop) {
    padding: 2.4rem;
  }
}

.toplist_0::before {
  background-color: var(--toplist-ranking-first-color) !important;
}

.toplist_1::before {
  background-color: var(--toplist-ranking-second-color) !important;
}

.toplist_2::before {
  background-color: var(--toplist-ranking-third-color) !important;
}