#aquatics-championships-2025-table {
  display: block;

  --table-width: 500px;
  --table-margin: 24px auto;
  --base-font-size: 21px;
  --mobile-font-size: 1rem;
  --small-font-size: 35px;
  --country-name-font-size: 16px;
  --medal-font-size: 26px;
  --text-color: #000000;
  --white-text: #FFFFFF;
  --sg-row-color: #FC837F;
  --white-bg: rgba(255, 255, 255, 0.7);
  --sg-bg: rgba(252, 131, 127, 1);
  --tbody-padding: 0 5px;
  --cell-padding: 7px 0 0;
  --bg-padding: 3px 5px;
  --bg-height: 33px;
  --bg-line-height: 33px;
  --medal-height: 40px;
  --medal-margin: -34px auto 10px auto;
  --medal-height-m: 6rem;
  --medal-top-m: -45px;
  --medal-mobile-height-xs: 6rem;
  --medal-mobile-top-xs: -37px;
  --medal-mobile-top-s: -41px;
  --medal-mobile-top-mt: -20px;
  --countries-block-gap: 6px;
  --countries-block-gap-m: 10px;
  --countries-block-width-m: 245px;
  --countries-col-padding-left: 47px;
  --countries-col-padding-left-m: 16px;
  --countries-col-maxwidth-m: 230px;
  --countries-col-width-mobile: 158%;
  --countries-flags-size: 33px;
  --countries-flags-height-mobile: 3rem;
  --countries-flags-height-m: 3rem;
  --border-radius: 50px;
  --border-radius-partial: 50px 0 0 50px;
  --border-radius-partial-end: 0 50px 50px 0;
}

body {
  margin: 0;
}

#aquatics-championships-2025-table,
#aquatics-championships-2025-table #olympicsGames-tbl,
#aquatics-championships-2025-table .table-container {
  overflow: hidden;
}

#aquatics-championships-2025-table .aquatics-header {
  max-width: var(--table-width);
  margin: var(--table-margin);
  margin-bottom: 0;
  margin-top: 0;
  position: relative;
  z-index: 22;
}

#aquatics-championships-2025-table .aquatics-header .logo {
  padding: 20px;
}

#aquatics-championships-2025-table .aquatics-header .logo img {
  width: 81px !important;
  max-width: none !important;
}

#aquatics-championships-2025-table .aquatics-header .aquatics-championships-logo {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

#aquatics-championships-2025-table .aquatics-header .games-logo {
  flex: 0 0 45%;
  background: #fff;
  padding: 15px 50px 15px 15px;
  border-radius: 0 100px 100px 0;
  position: relative;
  top: 27px;
  z-index: 10;
}

#aquatics-championships-2025-table .aquatics-header .games-logo img {
  width: 90px !important;
  max-width: none !important;
}

#aquatics-championships-2025-table .aquatics-header .aquatics-championships-title {
  padding-right: 20px;
  position: relative;
  top: 23px;
  z-index: 10;
}

#aquatics-championships-2025-table .aquatics-header .aquatics-championships-title h1 {
  margin: 0;
  font-size: 62px;
  color: var(--white-text);
}

#aquatics-championships-2025-table .aquatics-header .aquatics-championships-cartoon {
  position: absolute;
  top: -22px;
  right: 30px;
  width: 80px;
}

/* ==================== WRAPPER SECTION ==================== */
#aquatics-championships-2025-table .aquatics-wrapper {
  position: relative;
  background: url("/sites/default/files/World_Aquatics_Medal_Table_2025/aquaticsChampionships_images/aquatics-championships.png") no-repeat top center/cover;
  max-width: var(--table-width);
  margin: var(--table-margin);
  margin-top: 0;
  padding: 40px 16px 20px;
  box-sizing: border-box;
  overflow: hidden;
  top: -30px;
}

#aquatics-championships-2025-table .aquatics-wrapper::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: url("/sites/default/files/World_Aquatics_Medal_Table_2025/aquaticsChampionships_images/aquatics-championships-bg.png") no-repeat left center/cover;
  opacity: 0.2;
}

/* ==================== TABLE STRUCTURE ==================== */
#aquatics-championships-2025-table #aquatics-medaltally-table {
  max-width: var(--table-width);
  width: 100%;
  height: auto;
  border-collapse: collapse;
  display: table;
  margin: var(--table-margin);
  margin-top: 0;
  margin-bottom: 0;
  background: transparent !important;
}

#aquatics-championships-2025-table .header-tbl {
  font-size: 0;
  margin-bottom: 0;
}

#aquatics-championships-2025-table .header-tbl img {
  height: auto;
  width: 100%;
  z-index: 2;
  position: relative;
}

#aquatics-championships-2025-table .header-tbl #header-bar {
  margin-top: -1px;
  z-index: 2;
  position: relative;
}

/* ==================== TABLE BODY ==================== */
#aquatics-championships-2025-table tbody {
  position: relative;
  width: 100%;
  opacity: 1;
  color: var(--white-text);
  letter-spacing: 0;
  margin: 0;
  border-radius: 0;
  height: auto;
  padding: var(--tbody-padding);
  font-size: var(--base-font-size);
  display: inherit;
}

#aquatics-championships-2025-table tbody #thRow .thead-white-bg {
  background: #fff;
  border-radius: var(--border-radius) !important;
}

/* ==================== TABLE ROWS ==================== */
#aquatics-championships-2025-table table.tbl-body tr {
  z-index: 2;
  position: relative;
  background: none;
}

#aquatics-championships-2025-table table.tbl-body tr:last-child {
  border-bottom: 0;
}

#aquatics-championships-2025-table table.tbl-body tr#sg {
  background-color: var(--sg-row-color);
}

#aquatics-championships-2025-table table.tbl-body tr#sg td,
#aquatics-championships-2025-table table.tbl-body #SGP td {
  color: var(--white-text);
}

#aquatics-championships-2025-table table.tbl-body tr#thRow {
  height: auto;
  align-items: baseline;
}

/* ==================== TABLE HEADERS ==================== */
#aquatics-championships-2025-table .tbl-body tr th {
  font-weight: normal;
  background: unset;
  text-align: center;
  border: none !important;
  padding: 0 !important;
  color: var(--text-color);
  vertical-align: middle;
}

#aquatics-championships-2025-table .tbl-body tr th img {
  height: var(--medal-height);
  width: var(--medal-height);
  display: flex;
  align-items: center;
  margin: 0 auto;
}

#aquatics-championships-2025-table .tbl-body tr th.countries-col {
  text-align: left;
  padding-left: var(--countries-col-padding-left) !important;
}

#aquatics-championships-2025-table .tbl-body tr th.countries-col span {
  width: 65px;
  display: block;
  background: #fff;
  height: 41px;
  line-height: 41px;
  border-radius: var(--border-radius);
  text-align: center;
}

/* ==================== TABLE CELLS ==================== */
#aquatics-championships-2025-table table.tbl-body tr td {
  text-align: center;
  border: none !important;
  color: var(--text-color);
  padding: var(--cell-padding) !important;
}

#aquatics-championships-2025-table .tbl-body tr td p {
  margin: 0;
}

#aquatics-championships-2025-table .tbl-body tr td .fntBold {
  font-weight: 700;
  font-size: var(--medal-font-size);
  line-height: 30px;
  height: 38px;
}

/* ==================== BACKGROUND STYLES ==================== */
#aquatics-championships-2025-table .bg-white {
  background: var(--white-bg);
  height: var(--bg-height);
  padding: var(--bg-padding);
  line-height: var(--bg-line-height);
}

#aquatics-championships-2025-table .tbl-body tbody tr#SGP .bg-white {
  background: var(--sg-bg);
}

#aquatics-championships-2025-table .tbl-body tbody tr td:nth-child(2) .bg-white {
  border-radius: var(--border-radius-partial);
}

#aquatics-championships-2025-table .tbl-body tbody tr td:last-child .bg-white {
  border-radius: var(--border-radius-partial-end);
}

/* ==================== COUNTRIES SECTION ==================== */
#aquatics-championships-2025-table .countries-col .countries-name {
  padding-left: 0;
  text-align: left;
  font-size: var(--country-name-font-size);
}

#aquatics-championships-2025-table table.tbl-body tr td.countries-col .countries-block {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--countries-block-gap);
  height: 38px;
}

#aquatics-championships-2025-table .countries-col img.countries-flags {
  height: var(--countries-flags-size);
  width: var(--countries-flags-size);
  max-width: var(--countries-flags-size);
  max-height: var(--countries-flags-size);
  border-radius: var(--border-radius);
  object-fit: cover;
  border: 1px solid #ccc;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Large tablets (portrait) */
@media only screen and (min-device-width: 767px) and (max-device-width: 1284px) and (orientation: portrait) {
  #aquatics-championships-2025-table table.tbl-body tr td.countries-col .countries-block {
    gap: var(--countries-block-gap-m);
    width: inherit;
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 520px) {
  #aquatics-championships-2025-table .aquatics-wrapper {
    padding: 40px 8px 20px;
  }
  #aquatics-championships-2025-table .aquatics-header .aquatics-championships-title h1 {
    font-size: 45px;
  }
  #aquatics-championships-2025-table .aquatics-header .aquatics-championships-title {
    padding-right: 8px;
    top: 14px;
  }
  #aquatics-championships-2025-table .aquatics-header .logo {
    padding: 20px 8px;
  }
  #aquatics-championships-2025-table .aquatics-header .games-logo {
    padding: 15px 70px 15px 8px;
  }
  #aquatics-championships-2025-table .aquatics-header .aquatics-championships-cartoon {
    right: 10px;
  }
  #aquatics-championships-2025-table .tbl-body tr th.countries-col {
    padding-left: 20px;
    width: 32%;
  }
  #aquatics-championships-2025-table .countries-col .countries-name {
    line-height: normal;
    font-size: 14px;
  }
  #aquatics-championships-2025-table tbody #thRow .thead-white-bg span {
    width: 60px;
    display: block;
  }
  #aquatics-championships-2025-table .tbl-body tr th#copper-logo img {
    margin-right: 3px;
  }
  #aquatics-championships-2025-table .countries-col img.countries-flags {
    height: 24px;
    width: 24px;
  }
  #aquatics-championships-2025-table .tbl-body tr td .fntBold {
    font-size: 22px;
  }
}
