#team-table-wrapper,
#member-table-wrapper, #ab-table-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#team-table-mobile, #member-table-mobile, #ab-table-mobile {
  display: none;
}
#team-table-desktop, #member-table-desktop, #ab-table-desktop {
  display: table;
}

.team-select {
  width: 70%;
}

#member__table .table, #ab__table .table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
}

#member__table .table td, #ab__table .table td {
  padding: 7px 10px;
}

#member__table .table td.athlete-info-td, #ab__table .table td.athlete-info-td {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#member-table-desktop thead, #ab-table-desktop thead {
  position: sticky;
  top: -5px;
  background-color: #fff;
}

#member-table-mobile .heading, #ab-table-mobile .heading {
  padding: 10px 20px;
  position: sticky;
  top: -5px;
  background-color: #edf6ff;
  z-index: 1;
  font-weight: bold;
  font-size: 14px;
}

.paginationjs .paginationjs-pages li.active > a {
  background-color: var(--primary-color2) !important;
}

.table-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.table-footer #total-record {
  /* to the right */
  right: 0;
  position: absolute;
}

.search-row {
  width: 100%;
}

.search-row .row {
  display: grid;
  gap: 8px;
  width: 100%;
  grid-template-columns: 200px 200px auto;
}
.search-row .row .field, .search-row .row .select, .search-row .row select {
  width: 100%;
}
/* .search-row .row .field.has-addons.s1-end {
  grid-column: span 2;
}
.search-row .row .field.has-addons {
  grid-column: 2 / span 2;
} */

.search-row .field {
  width: 100%;
  flex: 1;
}

.search-row .field .search-control {
  width: 100%;
}

/* .search-row .select-field{
  max-width: 30%;
} */

/* Gold index */
.medal-index {
  width: 24px;
  height: 24px;
  max-width: 40px;
  color: rgb(255, 255, 255);
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  background: rgb(0, 111, 186);
}

.gold-index {
  width: 36px;
  height: 36px;
  max-width: 40px;
  font-size: 14px;
  background: linear-gradient(
    to left bottom,
    rgb(218, 165, 32),
    rgb(245, 229, 188),
    rgb(218, 165, 32)
  );
}

.silver-index {
  width: 32px;
  height: 32px;
  max-width: 40px;
  font-size: 13px;
  background: linear-gradient(
    to left bottom,
    rgb(153, 153, 153),
    rgb(230, 230, 230),
    rgb(153, 153, 153)
  );
}

.bronze-index {
  width: 28px;
  height: 28px;
  max-width: 40px;
  font-size: 12px;
  background: linear-gradient(
    to left bottom,
    rgb(205, 127, 50),
    rgb(235, 204, 173),
    rgb(205, 127, 50)
  );
}

#member__table {
  font-size: 14px;
  max-height: 753px;
  overflow-y: auto; 
}

#member__table tbody tr td:first-child {
  padding: 5px;
}

#member__table .tooltip .tooltiptext {
  left: -50%;
}

#team-table-mobile .item {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
}

#team-table-mobile .medal-wrap {
  flex: 0 1 40px;
}

#team-table-mobile .item:nth-child(odd) {
  background-color: #f5f5f5;
}
#team-table-mobile .item:nth-child(even) {
  background-color: #fff;
}

#team-table-mobile .item .left {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 1;
}

#team-table-mobile .item .left .info {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}

#team-table-mobile .item .left .info .card-title {
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}

#team-table-mobile .item .left .info .card-subtitle {
  font-size: 12px;
  color: #777;
}

#team-table-mobile .item .left .info .additional-info {
  display: flex;
  gap: 0.5rem;
}

#team-table-mobile .item .info .stat {
  display: flex;
  flex: 1;
  justify-content: space-between;
}

#team-table-mobile .item .info .stat .left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

#team-table-mobile .progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* background: 
    radial-gradient(closest-side, white 79%, transparent 80% 100%),
    conic-gradient(hotpink 75%, pink 0);     */
}

.member__table__stat {
  font-size: 11.5px;
}

.member__table__runner {
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: calc(100% - 60px);
}

.member__table__image {
 flex-shrink: 0;
}

.member__table__runner .member-name {
  font-size: 13.5px;
}

.mobile-stat {
  display: flex;
  gap: 12px;
  align-items: center;
}

.medal-index {
  margin-right: 0 auto;
}



#team-table-mobile .progress-bar::before {
  content: attr(data-value);
  font-size: 8px;
}

@media screen and (min-width: 1024px){
  .ranking-accordion {
    padding: 12px 10%;
  }
  .member__table__runner .member-name {
    font-size: 15.5px;
  }
}

@media screen and (max-width: 1023px) {
  .member__table__runner {
    font-size: 13.5px;
  }
}

@media screen and (max-width: 768px) {
  .search-row .row {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-row .row .field.has-addons {
    grid-column: span 2;
  }

  #team-table-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  #team-table-desktop {
    display: none;
  }

  #member-table-mobile, #ab-table-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #member-table-mobile .mobile-row, #ab-table-mobile .mobile-row {
    display: flex;
    padding: 0.5rem;
    gap: 4px;
  }

  #member-table-mobile .mobile-row:nth-child(odd), #ab-table-mobile .mobile-row:nth-child(odd) {
    background-color: #f5f5f5;
  }

  #member-table-mobile .mobile-row:nth-child(even), #ab-table-mobile .mobile-row:nth-child(even) {
    background-color: #fff;
  }

  #member-table-desktop, #ab-table-desktop {
    display: none;
  }

  .table-footer {
    flex-direction: column;
  }

  .table-footer #total-record {
    /* to the bottom */
    bottom: 0;
    position: relative;
  }

  #member-table-wrapper table {
    /* min-width: 500px; */
  }

  .search-row {
    flex-direction: column;
    width: 100%;
  }

  .team-select {
    width: 100%;
  }

  .search-row .search-control,
  .search-row .select-field .control,
  search-row .select-field .control .select,
  .search-row .select-field .control .select,
  select {
    width: 100%;
  }
}

@media screen and (max-width: 600px){ 
  /* .search-row .select-field{
    max-width: unset;
  } */

  .responsive thead {
    visibility: hidden;
    height: 0;
    position: absolute;
  }
  
  .responsive tr {
    display: block;
    margin-bottom: .8em;
  }
  
  .responsive td, #member__table #member-table-desktop td.athlete-info-td, #ab__table #ab-table-desktop td.athlete-info-td {
    border: 1px solid;
    border-bottom: none;
    display: flex;
    font-size: .8em;
    justify-content: space-between;
    align-items: center;
  }
  
  .responsive td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  
  .responsive td:last-child {
    border-bottom: 1px solid;
  }

  .member__table__image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }

  /* .member__table__runner {
    align-items: flex-end;
  } */

  /* .mobile-stat {
    flex-flow: row-reverse;
  } */

  .medal-index {
    margin-right: 0.25rem;
  }
}

.tabs.is-toggle li.is-active a {
  background-color: var(--primary-color2);
  border-color: var(--primary-color2);
}


.table-wrapper .table {
  margin-bottom: 0;
}
.table-wrapper:not(:last-child) {
  margin-bottom: 1.5rem;
}

@media screen and (max-width: 1023px) {
  .table-wrapper {
    overflow-x: auto;
  }
}