:root {
    /* Match Info Box */
    --match-info-box-height: 35px;
}

.map-stat-box.skeleton {
  height: 90px;
}

/* === Team Details Collapsible Area === */
.collapse-body {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: 8px;

  width: 100%;
  max-height: 0;
  
  margin-left: 0;
  margin-right: 0;

  font-size: .9rem;

  overflow: hidden;
  opacity: 0;

  transition: all .5s ease;
}
.collapse-body.show {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 2px solid var(--secondary-light2);
  max-height: 1500px;
  opacity: 1;
}


/* === Details box === */
.details-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.details-box-header {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: start;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  position: relative;
  padding-inline: 1em;
  margin-block: .5em;
}

/* === Match box general styling */
.matches-box-container {
  width: 100%;
  height: auto;
}
.matches-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  gap: .25em;
  font-size: 1em;
}

.match-info-box {
  display: flex;
  height: var(--match-info-box-height);
  width: 100%;
  box-sizing: border-box;
  padding: calc(var(--border-radius-sm)/4) calc(var(--border-radius-sm)/2);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  background-color: var(--background-secondary2);
  text-decoration: none;
  transition: background 0.2s ease;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}
.match-info-box:nth-of-type(2n+1) {
  background-color: var(--background-secondary3);
}
.match-info-box:hover {
  background-color: var(--secondary);
  cursor: pointer;
}

/* === Match info date styling === */
.match-info-time {
  display: flex;
  justify-content: center;
  align-items: center;

  flex: 0 0 80px;

  font-size: .9em;
}

/*  === Match info maps styling === */
.match-info-maps {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  width: auto;
  min-width: 70px;
  justify-content: flex-end;
}
.match-info-maps img {
  height: 80%;
  width: auto;
  display: block;
  object-fit: contain;
}

/* === Match info (teams + score) styling === */
.match-info-team-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;

  gap: 5px;

  min-width: 0;
  overflow: hidden;
}
.match-info-team-wrapper > * {
  display: flex;
  align-items: center;
  height: 100%;
}

.match-info-team-avatar {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: var(--border-radius-xs);
  display: block;
}

.match-info-team.opponent {
  display: flex;
  align-items: center;
  height: 100%;

  gap: 5px;

  overflow: hidden;
  white-space: nowrap;
}
.match-info-avatar {
  height: 100%;
  display: flex;
  align-items: center;
}
.match-info-avatar img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  aspect-ratio: 1/1;
  border-radius: var(--border-radius-xs);
}

.match-info-name {
  text-overflow: ellipsis;
  overflow: hidden;

  font-size: 1em;
  font-weight: bold;
}

/* === Recent Matches ===  */
.match-info-team-wrapper .match-score {
  flex: 0 0 45px;
  justify-content: center;

  font-size: 1em;
  font-weight: bold;

  overflow: visible;
  flex-wrap: nowrap;
}
.match-score-full {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
}
.match-score-left {
  text-align: right;
}
.match-score-divider {
  margin: 0 4px;
}
.match-score-right {
  text-align: left;
}

/* === Team statistics === */
.maps-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  width: 100%;
  height: auto;
  gap: 2px;
  font-size: 1em;
}
.map-stat-box {
  padding: calc(var(--border-radius-sm)/2);
  font-size: 0.75em;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  background-color: var(--background-secondary2);
  text-decoration: none;
  transition: background 0.2s ease;
}
.map-stat-box:hover {
  background-color: var(--secondary);
}
.map-stat-box img {
  width: 80%;
  height: auto;
  border-radius: 3px;
  object-fit: cover;
  margin-bottom: 5px; /* space between image and text */
}
.map-name {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.map-badge {
  width: 100%;
  background-color: var(--secondary-light2);
  border-radius: var(--border-radius-sm);
}


/* === Player statistics styling ===  */
.player-stats-box {
  width: 100%;
  height: auto;
  padding: 5px;
}

.table-custom {
  width: 100%;
  height: auto;

  font-size: clamp(0.8em, -0.3662em + 1.5584vw, 1em);
}
.table-custom .ellipsis {
  max-width: 200px;
}

/* === View all styling === */
.details-refer.btn.btn-custom {
  position: absolute;
  right: 3px;
  height: 1.5em;

  font-size: .7em;
}


@media screen and (max-width: 992px) {
  .table-custom .ellipsis {
    max-width: 100px;
  }
}

@media screen and (max-width: 1280px) {
  .collapse-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .map-stat-box {
    font-size: 0.7em;
  }

  .table-custom .ellipsis {
    max-width: 200px;
  }
}