/* match Vcard for brackets */
.match-container {
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
  max-width: 300px;
  padding-top: 5px;
  padding-bottom: 10px;
  padding-left: 12px;
}

.match-container .match-header-cup {
  border-bottom: 1px solid rgb(179, 179, 179);
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  margin-left: 6px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.team-row img {
  width: 34px;
  height: 34px;
  margin: 0 auto;
}

.team-name {
  font-size: 14px;
  font-weight: bold;
}

.team-seed {
  font-size: 12px;
  font-weight: bold;
  color: gray;
}

.scores {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.score-box {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 30px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  font-weight: bold;
}

.score-box.gray {
  background-color: #ddd;
}

.score-box.tbd {
  background-color: transparent;
  color: gray;
  font-style: italic;
}

/* playoff brackets */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.tournament-bracket {
  display: flex;
  flex-direction: column;
}
@media (min-width: 48em) {
  .tournament-bracket {
    flex-direction: row;
  }
}
.tournament-bracket__round {
  display: block;
  margin-left: -3px;
  flex: 1;
}
.tournament-bracket__round-title {
  margin: 10px;
  padding: 10px;
  background-color: #141414;
  color: white;
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center;
  font-style: italic;
  border-radius: 6px;
}
.tournament-bracket__list {
  display: flex;
  flex-direction: column;
  flex-flow: row wrap;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  border-bottom: 1px dashed #e5e5e5;
  padding-bottom: 2em;
  margin-bottom: 2em;
  transition: padding 0.2s ease-in-out, margin 0.2s ease-in-out;
}
@media (max-width: 32em) {
  .tournament-bracket__list {
    padding-bottom: 1em;
    margin-bottom: 1em;
  }
}
@media (min-width: 48em) {
  .tournament-bracket__list {
    margin-bottom: 0;
    padding-bottom: 0;
    border-right: 1px dashed #e5e5e5;
    border-bottom: 0;
  }
}
.tournament-bracket__round:last-child .tournament-bracket__list {
  border: 0;
}
.tournament-bracket__item {
  display: flex;
  flex: 0 1 auto;
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding: 2% 0;
  width: 48%;
  transition: padding 0.2s linear;
}
.tournament-bracket__item:nth-child(odd) {
  margin-right: 2%;
}
.tournament-bracket__item:nth-child(even) {
  margin-left: 2%;
}
.tournament-bracket__item::after {
  transition: width 0.2s linear;
}
@media (max-width: 32em) {
  .tournament-bracket__item {
    width: 100%;
  }
  .tournament-bracket__item:nth-child(odd),
  .tournament-bracket__item:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
  }
}
@media (min-width: 48em) {
  .tournament-bracket__item {
    padding: 0.5em 1em;
    width: 100%;
  }
  .tournament-bracket__item:nth-child(odd),
  .tournament-bracket__item:nth-child(even) {
    margin: 0;
  }
  .tournament-bracket__item::after {
    position: absolute;
    right: 0;
    content: '';
    display: block;
    width: 6em;
    height: 45%;
    border-right: 2px solid #9e9e9e;
  }
  .tournament-bracket__item:nth-child(odd)::after {
    top: 50%;
    border-top: 2px solid #9e9e9e;
    transform: translateY(-1px);
  }
  .tournament-bracket--rounded .tournament-bracket__item:nth-child(odd)::after {
    border-top-right-radius: 0.6em;
  }
  .tournament-bracket__item:nth-child(even)::after {
    bottom: 50%;
    border-bottom: 2px solid #9e9e9e;
    transform: translateY(1px);
  }
  .tournament-bracket--rounded .tournament-bracket__item:nth-child(even)::after {
    border-bottom-right-radius: 0.6em;
  }
  .tournament-bracket__round:first-child .tournament-bracket__item {
    padding-left: 0;
  }
  .tournament-bracket__round:last-child .tournament-bracket__item {
    padding-right: 0;
  }
  .tournament-bracket__round:last-child .tournament-bracket__item::after {
    display: none;
  }
  .tournament-bracket__round:nth-last-child(2) .tournament-bracket__item::after {
    border-radius: 0;
    border-right: 0;
  }
}
@media (min-width: 72em) {
  .tournament-bracket__item {
    padding: 0.5em 1.5em;
  }
  .tournament-bracket__item::after {
    width: 9em;
  }
}

@media (min-width: 98em) {
  .tournament-bracket__item {
    padding: 0.5em 1.5em;
  }
  .tournament-bracket__item::after {
    width: 18em;
  }
}
.tournament-bracket__match {
  z-index: 9;
  display: flex;
  width: 96%;
  background-color: #ffffff;
  /* padding: 1em; */
  border: 1px solid transparent;
  border-radius: 0.8em;
  /* box-shadow: 0 2px 0 0 #e5e5e5;*/
  outline: none;
  cursor: pointer;
  transition: padding 0.2s ease-in-out, border 0.2s linear;
  min-width: 150px;
  max-width: 160px;
}

.tournament-bracket__match__quarter {
  z-index: 9;
  display: flex;
  width: 96%;
  background-color: #ffffff;
  /* padding: 1em; */
  border: 1px solid transparent;
  border-radius: 0.8em;
  /* box-shadow: 0 2px 0 0 #e5e5e5;*/
  outline: none;
  cursor: pointer;
  transition: padding 0.2s ease-in-out, border 0.2s linear;
  min-width: 230px;
}

@media (max-width: 48em) {
  .tournament-bracket__match {
    margin: 0 auto !important;
  }
  .tournament-bracket__match__quarter {
      display: flex; /* Use Flexbox for child alignment */
      justify-content: space-between; /* Ensure even spacing between child elements */
      align-items: center; /* Vertically align content */
      width: 96%; /* Use the full width of the parent container */
      /* padding: 10px; */ /* Add padding for better spacing */
      box-sizing: border-box; /* Include padding in the element's width */
      background-color: #ffffff;
      border: 1px solid transparent;
      border-radius: 0.8em;
      cursor: pointer;
      transition: padding 0.2s ease-in-out, border 0.2s linear;
      min-width: 230px; /* Ensures it stays responsive */
  }
}

@media (max-width: 32em) {
  .tournament-bracket__item {
      display: flex;
      flex-direction: column; /* Stack items vertically */
      justify-content: center; /* Center content vertically */
      align-items: center; /* Center content horizontally */
      width: 100%; /* Full width for responsiveness */
      padding: 5px 0; /* Reduce padding for less white space */
      margin: 5px 0; /* Reduce margin between items */
      box-sizing: border-box; /* Include padding in width calculation */
  }

  .tournament-bracket__match__quarter {
      display: flex; /* Use Flexbox */
      flex-direction: column; /* Stack team rows vertically */
      justify-content: center; /* Center content vertically */
      align-items: center; /* Center all content horizontally */
      width: 80%; /* Make the match container take up most of the width */
      padding: 10px; /* Adjust padding for a cleaner layout */
      background-color: #ffffff; /* Keep a consistent background */
      /*border: 1px solid #ccc;*/ /* Add a subtle border */
      border-radius: 8px; /* Rounded corners for better appearance */
      box-sizing: border-box; /* Include padding in width calculation */
  }

  .team-row {
      display: flex;
      align-items: center;
      justify-content: space-between; /* Spread team content evenly */
      width: 100%; /* Ensure team rows span the full container width */
      gap: 5px; /* Add space between team elements */
  }

  .team-row img {
      width: 28px; /* Adjust logo size for smaller screens */
      height: 28px;
  }

  .team-name {
      font-size: 12px; /* Adjust font size for smaller screens */
      font-weight: bold;
      flex: 1; /* Allow team name to take up available space */
      text-align: left; /* Align text to the left */
  }

  .scores {
      display: flex;
      align-items: center;
      gap: 4px; /* Reduce spacing between score elements */
      flex: 0; /* Prevent scores from stretching unnecessarily */
  }

  .score-box {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 30px; /* Reduce width for compact design */
      height: 25px; /* Reduce height for compact design */
      border: 1px solid #ccc;
      background-color: #f9f9f9;
      font-size: 12px; /* Adjust font size */
      font-weight: bold;
  }

  .match-header-cup {
      text-align: center; /* Center-align the date header */
      margin-bottom: 5px; /* Reduce space below the header */
      font-size: 12px; /* Adjust font size for smaller screens */
      font-weight: bold;
  }
}



.tournament-bracket__match:focus {
  border-color: #2196F3;
}
.tournament-bracket__match::before,
.tournament-bracket__match::after {
  transition: all 0.2s linear;
}
@media (max-width: 32em) {
  .tournament-bracket__match {
    padding: 0.75em 0.5em;
    width: 100%;
  }
}
@media (min-width: 48em) {
  .tournament-bracket__match::before,
  .tournament-bracket__match::after {
    position: absolute;
    left: 0;
    z-index: 1;
    content: '';
    display: block;
    width: 1em;
    height: 10%;
    border-left: 2px solid #9e9e9e;
  }
  .tournament-bracket__match::before {
    bottom: 50%;
    border-bottom: 2px solid #9e9e9e;
    transform: translate(0, 1px);
  }
  .tournament-bracket--rounded .tournament-bracket__match::before {
    border-bottom-left-radius: 0.6em;
  }
  .tournament-bracket__match::after {
    top: 50%;
    border-top: 2px solid #9e9e9e;
    transform: translate(0, -1px);
  }
  .tournament-bracket--rounded .tournament-bracket__match::after {
    border-top-left-radius: 0.6em;
  }
}
@media (min-width: 72em) {
  .tournament-bracket__match::before,
  .tournament-bracket__match::after {
    width: 1.5em;
  }
  .tournament-bracket__match::before {
    transform: translate(0, 1px);
  }
  .tournament-bracket__match::after {
    transform: translate(0, -1px);
  }
}
.tournament-bracket__round:last-child .tournament-bracket__match::before,
.tournament-bracket__round:last-child .tournament-bracket__match::after {
  border-left: 0;
}
.tournament-bracket__round:last-child .tournament-bracket__match::before {
  border-bottom-left-radius: 0;
}
.tournament-bracket__round:last-child .tournament-bracket__match::after {
  display: none;
}
.tournament-bracket__round:first-child .tournament-bracket__match::before,
.tournament-bracket__round:first-child .tournament-bracket__match::after {
  display: none;
}
.tournament-bracket__content {
  display: flex;
}
.tournament-bracket__content::after {
  content: ':';
  width: 1em;
  text-align: center;
  padding: 0.2em 0.1em;
}
@media (min-width: 48em) {
  .tournament-bracket__content::after {
    order: 1;
  }
}
.tournament-bracket__content .tournament-bracket__team:first-child {
  width: 50%;
  order: 0;
  text-align: right;
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__content .tournament-bracket__team:first-child {
    align-items: flex-end;
  }
}
.tournament-bracket__content .tournament-bracket__team:first-child .tournament-bracket__country {
  order: 2;
  justify-content: flex-end;
}
@media (min-width: 32em) {
  .tournament-bracket__content .tournament-bracket__team:first-child .tournament-bracket__country {
    order: 0;
  }
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__content .tournament-bracket__team:first-child .tournament-bracket__country {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
}
.tournament-bracket__content .tournament-bracket__team:first-child .tournament-bracket__score {
  order: 0;
}
@media (min-width: 32em) {
  .tournament-bracket__content .tournament-bracket__team:first-child .tournament-bracket__score {
    order: 2;
  }
}
.tournament-bracket__content .tournament-bracket__team:last-child {
  width: 50%;
  order: 2;
  text-align: left;
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__content .tournament-bracket__team:last-child {
    align-items: flex-start;
  }
}
@media (min-width: 48em) {
  .tournament-bracket__content .tournament-bracket__team:last-child .tournament-bracket__country {
    justify-content: flex-start;
  }
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__content .tournament-bracket__team:last-child .tournament-bracket__country {
    align-items: flex-start;
  }
}
.tournament-bracket__content .tournament-bracket__team:last-child .tournament-bracket__code {
  order: 1;
}
.tournament-bracket__table {
  width: 100%;
}
.tournament-bracket__caption {
  font-size: 0.8rem;
  color: #BDBDBD;
  font-weight: 300;
  padding-bottom: 0.75em;
}
.tournament-bracket__team {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
}
@media (min-width: 32em) {
  .tournament-bracket__team {
    flex-direction: column-reverse;
  }
}
@media (min-width: 48em) {
  .tournament-bracket__team {
    flex-direction: column-reverse;
  }
}
.tournament-bracket__country {
  font-size: 0.95rem;
  display: flex;
  margin-top: 0.5em;
  align-items: center;
}
@media (max-width: 32em) {
  .tournament-bracket__country {
    margin-top: 0;
  }
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__country {
    display: flex;
    flex-direction: column;
  }
  .tournament-bracket__country .tournament-bracket__code {
    margin-top: 0.2em;
  }
}
.tournament-bracket__code {
  padding: 0 0.5em;
  color: #212121;
  font-weight: 600;
  text-transform: uppercase;
  border: 0;
  text-decoration: none;
  cursor: help;
  transition: padding 0.2s ease-in-out;
}
@media (max-width: 32em) {
  .tournament-bracket__code {
    padding: 0 0.25em;
  }
}
@media (min-width: 48em) and (max-width: 52em) {
  .tournament-bracket__code {
    padding: 0;
  }
}
.tournament-bracket__score {
  display: flex;
  align-items: center;
}
.tournament-bracket__team:first-child .tournament-bracket__score {
  flex-direction: row-reverse;
  padding-left: 0.75em;
}
.tournament-bracket__team:last-child .tournament-bracket__score {
  padding-right: 0.75em;
}
.tournament-bracket__number {
  display: inline-block;
  padding: 0.2em 0.4em 0.2em;
  border-bottom: 0.075em solid transparent;
  font-size: 0.95rem;
  background-color: #F5F5F5;
  border-color: #dddddd;
}
.tournament-bracket__team--winner .tournament-bracket__number {
  background-color: #FFF176;
  border-color: #fad674;
}
.tournament-bracket__medal {
  padding: 0 0.5em;
}
.tournament-bracket__medal--gold {
  color: #FFD700;
}
.tournament-bracket__medal--silver {
  color: #C0C0C0;
}
.tournament-bracket__medal--bronze {
  color: #CD7F32;
}