section#ganhadores {
  display: grid;
  row-gap: 2.4rem;
}

menu.ganhadores--modalidade {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

menu.ganhadores--modalidade button:not(.active) {
    opacity: 0.4;
}

menu.ganhadores--modalidade button:not(.active):hover {
    opacity: 1;
}

.ganhadores--container {
    row-gap: 2.4rem;
    padding-inline: 2rem;
}

.ganhadores--container p {
    font-size: 2.4rem;
    text-align: center;
}

menu.ganhadores--filtro {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
menu.ganhadores--filtro button {
  width: 2.8rem;
  height: 2.8rem;
  text-align: center;
  font-weight: 700;
  border-radius: 50%;
  background: #BFCCEC;
  color: #2C3DA8;
}
menu.ganhadores--filtro button.active {
  background-color: #2C3DA8;
  color: #fff;
}
menu.ganhadores--filtro button:disabled {
  color: #000;
  opacity: 0.2;
}

table.table {
  margin-inline: auto;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.ganhadores--container {
    display: none;
}

section:has([data-ganhadores="viagem"].active) .ganhadores--container[data-ganhadores="viagem"],
section:has([data-ganhadores="capacete"].active) .ganhadores--container[data-ganhadores="capacete"],
section:has([data-ganhadores="desconto"].active) .ganhadores--container[data-ganhadores="desconto"] {
    display: grid;
}

@media screen and (max-width: 768px) {
  section#ganhadores {
    padding-block: 2.4rem;
  }

  menu.ganhadores--modalidade {
    margin-inline: 4rem;
  }

  table {
    width: 70vw;
    max-width: 500px;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: grid;
    margin-block: 2rem;
    padding-block: 2rem;
    border-radius: 10px;
    background-color: #0a0047;
  }

  tbody tr td {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-block: 2rem;
    word-wrap: break-word;
    text-align: center;
    color: #fff;
    font-weight: bold;
  }

  tbody tr td::before {
    content: attr(data-header);
    color: #00c4fe;
    font-weight: bold;
  }

  tbody tr td:first-of-type {
    border-top-left-radius: 0.8rem;
    border-top-right-radius: 0.8rem;
  }

  tbody tr td:last-of-type {
    border-bottom-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
  }

  h1.section-title {
    width: 80vw;
  }

  tr.table--content__default.loading {
    background-color: #f5f6fa;
    height: 380px;
    position: relative;
  }
  
  tr.table--content__default.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #dadada 25%, #e9e9e9 50%, #dedede 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite linear;
    z-index: 1;
    border-radius: 0.8rem;
  }
}

@media screen and (min-width: 768px) {
  section#ganhadores {
    padding-inline: 2rem;
    padding-block: 6.4rem;
  }

  h1.section-title {
    font-size: 4.8rem;
  }

  table.table:first-of-type {
    margin-bottom: 4rem;
  }
  table {
    max-width: 1300px;
    width: 100%;
    border-spacing: 0 1rem;
    border-collapse: separate;
  }

  thead th:first-of-type,
  tbody tr td:first-of-type {
    border-top-left-radius: 0.8rem;
    border-bottom-left-radius: 0.8rem;
  }

  thead th:last-of-type,
  tbody tr td:last-of-type {
    border-top-right-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
  }

  thead tr th {
    background-color: #0a0047;
    font-weight: bold;
    color: #fff;
  }

  tbody tr {
    background-color: #f5f6fa;
  }

  thead tr th,
  tbody tr td {
    padding: 2rem;
    text-align: center;
    vertical-align: middle;
  }

  tr.table--content__default.loading td span {
    position: relative;
  }
  
  tr.table--content__default.loading td span::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: linear-gradient(90deg, #dadada 25%, #e9e9e9 50%, #dedede 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite linear;
    z-index: 1;
  }
}
