.guest-match {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6.7rem;
}
.guest-match__left {
  flex: 1;
}
.guest-match__right {
  width: 100%;
  max-width: 60%;
}

/* Score Section */
.match-score-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
}

.team-left,
.team-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 50%;
  background: #f15b2e;
  padding-top: 2.7rem;
  padding-bottom: 2.7rem;
  background-image: url("../images/bgteam-left.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.team-right {
  background: #f98562;
  background-image: url(../images/bgteam.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.match-formation {
  margin-bottom: 2rem;
}
.team-logo {
  width: 3.0625rem;
  height: 3.0625rem;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: .3rem;
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.default-logo {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
}

.team-name {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: #fff;
  text-align: center;
  line-height: 3rem;
}

.score-display {
  position: absolute;
  left: 50%;
  top: 39%;
  transform: translate(-50%, -50%);
}
.match-details__info {
  background-color: #fff;
  border-radius: 1.6rem;
  padding: 1.6rem;
  width: 100%;
  display: flex;
  flex-flow: column;
  gap: 0.8rem;
}
.match-details__title {
  font-size: 1.6rem;
  letter-spacing: -0.32px;
  min-height: 3.2rem;
  font-weight: 700;
  align-content: center;
  margin: 0;
}
.match-details__values {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.match-details__entry {
  display: flex;
  justify-content: space-between;
}
.match-details__key {
  flex: 1 1 40%;
  color: #7d5980;
}
.game-timeline__home-logo.position-absolute.d-none.d-sm-flex.align-items-center,
.game-timeline__away-logo.position-absolute.d-none.d-sm-flex.align-items-center {
  display: none !important;
}
.match-details__value {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: -0.28px;
  font-weight: 700;
  color: #37003c;
  flex: 1 1 60%;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  text-align: right;
}
.score-box {
  background: #343449;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  text-align: center;
  min-width: 5.1875rem;
  font-size: 2.4rem;
}
.score-box span {
  font-size: 1.2rem;
  font-weight: 500;
}

/* Match Timeline Section */
.match-timeline-wrapper {
  background: #343449;
  border-radius: 1.5rem;
  padding: 3.1rem 0;
  margin-bottom: 1rem;
  margin-top: -2.7rem;
  z-index: 2222;
  position: relative;
  color: #fff;
}
.match-timeline-wrapper .game-timeline.match-timeline {
  padding: 4rem 1rem !important;
  height: 20rem;
}
.match .match-timeline-wrapper .game-timeline__home-logo {
  left: -10px;
  top: -30px;
  color: #000;
}
.match .match-timeline-wrapper .game-timeline__away-logo {
  bottom: -30px;
  left: -10px;
  color: #000;
}
.match .match-timeline-wrapper .game-timeline__line-separator,
.match .match-timeline-wrapper .game-timeline__line-separator-small {
  border-right: 1px solid #ffccbc;
}
.match .match-timeline-wrapper .game-timeline__progress-filled,
.match #events-tab .game-timeline__progress-filled {
  background-color: #f15b2e;
}
.match-timeline-wrapper .anwp-section + .anwp-section {
  margin-top: 0;
  background: #fff;
  color: #000;
  border-bottom: 0.3rem solid #f15b2e;
  padding-bottom: 2rem;
}
.match-timeline-wrapper .match-goals .anwp-fl-block-header,
.match-timeline-wrapper .match-goals span.anwp-text-nowrap,
.match-timeline-wrapper .match-goals .match__event-type {
  display: none;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  background: #fff;
  font-size: 1.2rem;
  margin: 0 auto;
  text-align: center;
  padding-top: 0.5rem;
}

.half-label {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #000;
  text-transform: uppercase;
  text-align: center;
  margin: 0 auto;
}

.timeline-content {
  position: relative;
  height: 3.75rem;
}

.timeline-bar {
  position: relative;
  height: 0.8125rem;
  background: #f0f0f0;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.timeline-progress {
  height: 100%;
  background: #f15b2e;
  border-radius: 0.25rem;
}

.timeline-progress.first-half {
  width: 50%;
}

.timeline-progress.second-half {
  width: 50%;
  margin-left: 50%;
}

.timeline-markers {
  position: relative;
  height: 1rem;
}

.marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.5rem;
  color: white;
  background: #f15b2e;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
  text-align: center;
  min-width: 1.03125rem;
}

.goal-events {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  height: 1rem;
}

.goal-event {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.goal-icon {
  font-size: 0.58625rem;
  color: #333;
}

.card-events {
  position: absolute;
  top: 2.5rem;
  left: 0;
  right: 0;
  height: 0.625rem;
}

.card-event {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 0.6875rem;
  height: 0.625rem;
  border: 0.5px solid #cdcdcd;
}

.card-event.yellow {
  background: #edd626;
}

/* Player Events */
.player-events {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.player-event {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-name {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 0.5rem;
  color: #000;
  line-height: 1.2;
}

/* Match Info Footer */
.match-info-footer {
  text-align: center;
  color: white;
  margin-top: 1rem;
}

.match-info-footer p {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.25rem 0;
}

.match-info-footer p:last-child {
  margin-bottom: 0;
}
.match-tabs-container {
  margin: 20px 0;
}

.match-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-direction: row;
  width: fit-content;
  max-width: unset;
  background: #fff;
}
div#events-tab {
  margin-top: 5rem;
}
.match-tab {
  background: #3a3a44;
  border: none;
  border-radius: 3px;
  color: white;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 600;
  height: 37px;
  padding: 0 15px;
  transition: background-color 0.3s ease;
  width: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-tab:hover {
  background: #4a4a54;
}

.match-tab.active {
  background: #f15b2e;
}

.match-tab span {
  line-height: 22px;
  white-space: nowrap;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Responsive Design */
@media (max-width: 48rem) {
  .match-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .score-box {
    font-size: 1.25rem;
    min-width: 4rem;
  }

  .team-name {
    font-size: 0.75rem;
  }
}

@media (max-width: 30rem) {
  .match-score-section {
    flex-direction: column;
    gap: 1rem;
  }

  .score-display {
    position: static;
    transform: none;
    order: 2;
  }

  .team-left,
  .team-right {
    order: 1;
  }

  .team-right {
    order: 3;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Player Stats Table Styling - Improved from shortcode-premium-stats-players.php */
.anwp-fl-match-player-stats-section {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.anwp-fl-match-player-stats-section .anwp-table {
  font-family: "Roboto", sans-serif;
  border: none;
  background: #fff;
  width: 100%;
  border-collapse: collapse;
}

/* Header Styling */
.anwp-fl-match-player-stats-section .anwp-table thead {
  background: #343449;
  color: #fff;
}

.anwp-fl-match-player-stats-section .anwp-table th {
  background: #343449 !important;
  border-right: 1px solid #4a4a54 !important;
  border-bottom: none !important;
  padding: 12px 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-align: center !important;
  color: #fff !important;
  position: relative;
}

.anwp-fl-match-player-stats-section .anwp-table th:first-child {
  text-align: left !important;
  padding-left: 16px !important;
}

.anwp-fl-match-player-stats-section .anwp-table th:last-child {
  border-right: none !important;
}

/* Sortable Column Styling - Improved */
.anwp-fl-match-player-stats-section .anwp-table th.sortable-column {
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
  vertical-align: middle;
}

.anwp-fl-match-player-stats-section .anwp-table th.sortable-column:hover {
  background: #4a4a54 !important;
}
.anwp-fl-match-player-stats-table {
  overflow: auto;
}
/* Sort Link Structure - Like shortcode-premium-stats-players.php */
.anwp-fl-match-player-stats-section .anwp-table th.sortable-column .sort-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  width: 10rem;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column:first-child
  .sort-link {
  justify-content: flex-start;
}

/* Sort Icon Styling - Improved */
.anwp-fl-match-player-stats-section .anwp-table th.sortable-column .sort-icon {
  font-size: 12px;
  color: #fff;
  opacity: 0.7;
  transition: all 0.2s ease;
  font-weight: bold;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column:hover
  .sort-icon {
  opacity: 1;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column.sort-asc
  .sort-icon {
  color: #f15b2e;
  opacity: 1;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column.sort-desc
  .sort-icon {
  color: #f15b2e;
  opacity: 1;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column.sorted-column {
  background: #f15b2e !important;
  color: #fff !important;
}

.anwp-fl-match-player-stats-section
  .anwp-table
  th.sortable-column.sorted-column
  .sort-icon {
  color: #fff !important;
}

/* Table Body Styling */
.anwp-fl-match-player-stats-section .anwp-table tbody {
  background: #fff;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr {
  border-bottom: 1px solid #e9ecef !important;
  transition: background-color 0.2s ease;
  background: #fff !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr:hover {
  background: #f8f9fa !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td {
  padding: 12px 8px !important;
  border-right: 1px solid #e9ecef !important;
  border-top: none !important;
  border-left: none !important;
  font-size: 14px !important;
  text-align: center !important;
  vertical-align: middle !important;
  background: transparent !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td:first-child {
  text-align: left !important;
  padding: 12px 16px !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td:last-child {
  border-right: none !important;
}

/* Highlight sorted column cells */
.anwp-fl-match-player-stats-section .anwp-table tbody tr td.sorted-column {
  background: #f8f9fa !important;
  font-weight: 600 !important;
  color: #343449 !important;
}

/* Rank Styling - From shortcode-premium-stats-players.php */
.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #fff8dc 100%) !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #f5f5f5 100%) !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #f4e4bc 100%) !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-1:hover,
.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-2:hover,
.anwp-fl-match-player-stats-section .anwp-table tbody tr.rank-3:hover {
  filter: brightness(1.05);
}

/* Position-specific styling - From shortcode-premium-stats-players.php */
.anwp-fl-match-player-stats-section .anwp-table tbody tr td.position-g {
  color: #dc3545 !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td.position-d {
  color: #007bff !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td.position-m {
  color: #28a745 !important;
}

.anwp-fl-match-player-stats-section .anwp-table tbody tr td.position-f {
  color: #ffc107 !important;
}

/* Player photo styling */
.anwp-player-photo {
  border: 2px solid #e9ecef !important;
  transition: border-color 0.2s ease;
}

.anwp-player-photo:hover {
  border-color: #f15b2e !important;
}

.anwp-player-photo-placeholder {
  border: 2px solid #e9ecef !important;
  transition: border-color 0.2s ease;
}

.anwp-player-photo-placeholder:hover {
  border-color: #f15b2e !important;
}

/* Position badge styling */
.anwp-position-badge {
  transition: all 0.2s ease;
}

.anwp-position-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Table header styling */
.anwp-fl-match-player-stats--header {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #343449;
  margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .anwp-player-photo,
  .anwp-player-photo-placeholder {
    width: 25px !important;
    height: 25px !important;
    margin-right: 6px !important;
  }

  .anwp-fl-match-player-stats-section .anwp-table tbody tr td:first-child {
    padding: 8px 12px !important;
  }

  .anwp-fl-match-player-stats-section .anwp-table th {
    padding: 8px 4px !important;
    font-size: 12px !important;
  }

  .anwp-fl-match-player-stats-section .anwp-table tbody tr td {
    padding: 8px 4px !important;
    font-size: 12px !important;
  }

  .anwp-fl-match-player-stats--header {
    font-size: 14px;
  }
}
