/*
 * Plugin Name: ProTennisLive API Integrator
 * Description: Styles for ProTennisLive API integration shortcodes.
 * Version:     1.0.0
 * Author:      Your Name
 */

/* --- General Body Styles (Preserved from your input) --- */
body {
  background-color: #4390a5 !important;
  font-family: "Open Sans", sans-serif;
}

.ptl-table {
  width: 100%;
  border-collapse: separate; /* Crucial for border-radius and border-spacing */
  border-spacing: 0; /* Remove space between cell borders */
  font-size: 1rem;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px; /* Rounded corners for the entire table */
  overflow: hidden; /* Ensures content respects border-radius */
  color: white; /* Applies to table text */
  table-layout: fixed; /* Ensures column widths are respected */
}

.ptl-table th,
.ptl-table td {
  /*border: 1px solid #22728d; /* Lighter border, adjusted to your theme */
  padding: 12px 15px; /* More padding */
  text-align: left;
  vertical-align: middle;
  /*text-transform: uppercase; /* Preserved from your input */
  word-wrap: break-word; /* Ensure long names/scores wrap */
}

.ptl-table th {
  text-transform: uppercase;
}

.ptl-table th:not(:first-child),
.ptl-table td:not(:first-child) {
  text-align: center;
}

.ptl-table td:first-child {
  border-right: 1px solid #22728d;
}

.ptl-table thead {
  background-color: #22728d; /* Primary blue for header, adjusted to your theme */
  color: #ffffff;
  font-weight: 600;
}

.ptl-table tbody tr:nth-child(even) {
  /* Keeping this for general tables, but results table will have separate styling */
  background-color: rgba(
    34,
    114,
    141,
    0.35
  ); /* Subtle zebra striping for dark background */
}

.ptl-table tbody tr:hover {
  background-color: rgba(
    255,
    255,
    255,
    0.1
  ); /* Subtle hover effect, adjusted for dark background */
}

.ptl-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem; /* Gap between tables */
  margin-bottom: 25px; /* Space below the grid of matches */
  justify-content: center; /* Center the grid items */
  margin-top: 2rem;
}

.ptl-match-table {
  /* Inherits general .ptl-table styles */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12); /* Slightly stronger shadow for results table */
  width: 100%; /* Ensure tables fill their grid column */
  margin-bottom: 0; /* Remove default table margin-bottom, handled by grid gap */
}

.ptl-match-table th:nth-child(1), /* Player */
.ptl-match-table td:nth-child(1) {
  max-width: 70%; /* More width for player names */
}
.ptl-match-table th:nth-child(2), /* Set 1 */
.ptl-match-table td:nth-child(2) {
  width: 75px;
}
.ptl-match-table th:nth-child(3), /* Set 2 */
.ptl-match-table td:nth-child(3) {
  width: 75px;
}
.ptl-match-table th:nth-child(4), /* Set 3 */
.ptl-match-table td:nth-child(4) {
  width: 75px;
}

/* Superscript styling for tie-break scores */
.ptl-match-table sup {
  font-size: 0.7em; /* Smaller font size for superscript */
  vertical-align: super; /* Position it as superscript */
  line-height: 0; /* Prevents increasing line height */
  position: relative;
  top: -0.5em; /* Adjust vertical position */
}

/* Remove borders between rows within a single match table */
.ptl-match-table tbody tr td {
  border-bottom: none;
}

.ptl-match-table strong {
  color: #f2ff00;
}

/* --- General PTL Messages (Preserved from your input) --- */
.ptl-empty {
  font-style: italic;
  color: #666;
  margin: 8px 0;
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
}

.ptl-message {
  color: #fff;
  margin: 8px 0;
  padding: 25px;
  background-color: #22728d;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
}

.ptl-raw {
  white-space: pre-wrap;
  background: #f9f9f9;
  padding: 10px;
  border: 1px solid #eee;
  font-size: 13px;
  overflow-x: auto; /* For long debug output */
  border-radius: 5px;
}
.ptl-error {
  color: #b00020;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
}

/* --- Styles for protennislive_players shortcode (Preserved from your input) --- */
.protennislive-players-container {
  font-family: inherit;
  background-color: #4390a5;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
}
.protennislive-players-container h2 {
  color: #f2ff00;
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
  font-size: 2.2em;
  font-weight: 700;
  padding-bottom: 10px;
  display: inline-block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}
.player-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-content: center;
}
.player-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Ensures rounded corners on image */
}

.player-headshot {
  background-color: #22728d;
  width: 100%;
  overflow: hidden;
  margin-bottom: 15px;
  border-radius: 25px 25px 0 0;
}
.player-headshot img {
  max-width: 200px !important;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.player-info {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  width: 100%;
}

h3.player-name {
  font-family: "Open Sans", "sans-serif";
  color: #f2ff00;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: left;
  letter-spacing: -0.09375;
  text-transform: uppercase;
  line-height: 1.5rem;
}
.player-info p {
  font-family: "open sans", "sans-serif";
  margin: 2px 0;
  color: #fff;
  font-size: 14px;
  text-align: left;
}
.player-info strong {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.035rem;
  display: inline-block;
}

.player-height-weight,
.player-atp-rang {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.player-info p .strong-left {
  display: inline-block;
  width: 130px;
}

p.player-atp-rang .strong-right {
  display: inline-block;
  width: 130px;
}

p.player-atp-rang span:nth-of-type(2) {
  display: inline-block;
  width: 168px;
}

p.player-height-weight .strong-right,
p.player-atp-rang .strong-right {
  display: inline-block;
  width: 130px;
}

.player-bio-btn {
  align-self: center !important;
  margin-top: 10px;
}

.player-bio-link {
  display: inline-block;
  background-color: #f2ff00;
  color: #0c3865 !important;
  padding: 10px 32px;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border-radius: 31px 31px 31px 31px;
  font-weight: 800 !important;
  letter-spacing: -0.0375rem !important;
}

/* --- Styles for ptl_results shortcode (New/Adjusted) --- */
.ptl-results-container,
.ptl-live-matches-container {
  border-radius: 10px;
  margin-bottom: 30px;
  font-family: inherit;/* Adjusted to your theme's font */
  color: white; /* Default text color for the container */
}

/* --- Styles for ptl_schedule shortcode (New) --- */
.ptl-schedule-container {
  margin-bottom: 30px;
  color: white; /* Default text color for the container */
}

.ptl-schedule-container h2,
.ptl-live-matches-container h2,
.ptl-results-container h2 {
  color: #f2ff00;
  font-size: 3.375rem;
  font-weight: 800;
  letter-spacing: -0.2025rem;
  text-transform: uppercase;
}

.ptl-live-matches-container h2::after {
  content: url(../live-icon.svg);
  margin-left: 1rem;
}

.ptl-results-container h3 {
  /* Subheadings for Singles/Doubles */
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin-top: 5rem;
  margin-bottom: 1rem;
  text-align: left;
  font-size: 1.875rem;
  font-weight: 800;
  border-bottom: 1px solid #22728d; /* Adjusted border color */
  padding-bottom: 8px;
  width: 100%;
}

.ptl-date-section {
  margin-bottom: 2rem;
  border-bottom: 2px solid #22728d;
  padding-bottom: 1rem;
}

.ptl-date-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.ptl-date-heading {
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.1rem;
  border-bottom: 1px solid #22728d;
  padding-bottom: 8px;
}

.ptl-round-heading {
  color: #f2ff00;
  margin-top: 3rem;
  margin-bottom: 2rem;
  text-align: left;
  font-size: 1.875rem;
  font-weight: 800;
  border-bottom: 1px solid #22728d;
  padding-bottom: 8px;
  width: 100%;
}

.ptl-court-heading {
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.05rem;
  border-bottom: 1px solid #22728d;
  padding-bottom: 8px;
}

/* Specific styles for the schedule table */
.ptl-schedule-table {
  /* Inherits general .ptl-table styles, but can be overridden here if needed */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12); /* Slightly stronger shadow for schedule table */
  margin-bottom: 1rem;
}

.ptl-schedule-table td,
.ptl-schedule-table th,
.ptl-schedule-table thead tr th {
  border: 1px solid transparent !important;
}

table thead:first-child tr:first-child td {
  border-block-start: none !important;
}

/* Column Widths for schedule table layout */
.ptl-schedule-table th:nth-child(1), /* Zeit */
.ptl-schedule-table td:nth-child(1) {
  width: 160px;
}
.ptl-schedule-table th:nth-child(2), /* Runde */
.ptl-schedule-table td:nth-child(2) {
  width: 100px;
}
.ptl-schedule-table th:nth-child(3), /* Spieler / Team 1 */
.ptl-schedule-table td:nth-child(3) {
  width: calc(50% - 260px);
}
.ptl-schedule-table th:nth-child(4), /* Spieler / Team 2 */
.ptl-schedule-table td:nth-child(4) {
  width: calc(50% - 260px);
}

/* Specific styles for the results table (overrides general .ptl-table for results) */
.ptl-results-table {
  /* Inherits general .ptl-table styles, but can be overridden here if needed */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12); /* Slightly stronger shadow for results table */
}

/* Spacing between matches: Apply margin to the second row of each match block */
.ptl-results-table tbody tr.ptl-match-separator {
  margin-bottom: 25px; /* Add space below each match block */
}

/* Apply consistent border-bottom to all cells (including Datum) in the second row of a match,
   but only if it's NOT the last match block in the table. */
.ptl-results-table tbody tr.ptl-match-separator:not(:last-child) td {
  /*border-bottom: 2px solid ; /* Consistent border for all cells in the second row of a match */
}

/* Ensure the last match block doesn't have extra margin or borders */
.ptl-results-table tbody tr:last-child.ptl-match-separator {
  margin-bottom: 0; /* No margin after the very last match */
}
/* No need to explicitly remove border-bottom from td:last-child.ptl-match-separator td
   as :not(:last-child) in the rule above handles it. */

/* Column Widths for consistent table layout */
.ptl-results-table th:nth-child(1), /* Datum */
.ptl-results-table td:nth-child(1) {
  width: 20%; /* Increased width */
}
.ptl-results-table th:nth-child(2), /* Spieler/Team */
.ptl-results-table td:nth-child(2) {
  width: 35%; /* Increased width */
}
.ptl-results-table th:nth-child(3), /* Set 1 */
.ptl-results-table td:nth-child(3) {
  width: 15%; /* Adjusted width */
}
.ptl-results-table th:nth-child(4), /* Set 2 */
.ptl-results-table td:nth-child(4) {
  width: 15%; /* Adjusted width */
}
.ptl-results-table th:nth-child(5), /* Set 3 */
.ptl-results-table td:nth-child(5) {
  width: 15%; /* Adjusted width */
}

/* Bolding for winner names and set scores */
.ptl-results-table strong {
  color: #f2ff00; /* Adjusted to your theme's highlight color for bold text */
}

/* --- Styles for ptl_live_draw shortcode (New) --- */
.ptl-live-draw-container {
  margin-bottom: 30px;
  font-family: "Open Sans", sans-serif; /* Adjusted to your theme's font */
  color: white; /* Default text color for the container */
}

.ptl-live-draw-container h2 {
  /* Main title for live draw */
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 3.375rem;
  font-weight: 700;
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: -0.2025rem;
  text-align: center;
}

.ptl-live-draw-container h3 {
  /* Event title (e.g., "Men's Singles") */
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.1rem;
  text-align: center;
}

/* Tree-like draw structure */
.ptl-draw-tree {
  margin-bottom: 2rem;
}

.ptl-draw-grid {
  display: flex; /* Use flexbox to allow horizontal scrolling without wrapping */
  gap: 2rem;
  align-items: stretch; /* Stretch columns to be the same height */
  overflow-x: auto; /* Enable horizontal scrollbar when content overflows */
  padding: 1rem 0;
  cursor: grab; /* Indicate that the area is scrollable by dragging */
  user-select: none; /* Prevent text selection while dragging */

  /* --- Custom Scrollbar Styles for Firefox --- */
  scrollbar-width: auto; /* Can be 'thin' or 'auto' */
  scrollbar-color: #f2ff00 #22728d; /* thumb color, track color */
}

/* Style for when the user is actively dragging the grid */
.ptl-draw-grid.grabbing {
  cursor: grabbing;
}

/* --- Custom Scrollbar Styles for Webkit browsers (Chrome, Safari, Edge) --- */
.ptl-draw-grid::-webkit-scrollbar {
  height: 16px; /* Height of the horizontal scrollbar */
}

.ptl-draw-grid::-webkit-scrollbar-track {
  background: #22728d; /* Color of the tracking area */
  border-radius: 10px;
}

.ptl-draw-grid::-webkit-scrollbar-thumb {
  background-color: #f2ff00; /* Color of the scroll thumb */
  border-radius: 10px; /* Roundness of the scroll thumb */
  border: 4px solid #22728d; /* Creates padding around the thumb */
}

.ptl-draw-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 250px; /* Set a fixed width for each round's column */
  flex-shrink: 0; /* Prevent columns from shrinking, forcing the container to scroll */
}

.ptl-draw-column .ptl-round-heading {
  color: #f2ff00; /* Adjusted to your theme's highlight color */
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.05rem;
  text-align: center;
  border-bottom: 2px solid #22728d;
  padding-bottom: 8px;
}

.ptl-draw-match {
  background-color: rgba(34, 114, 141, 0.3);
  border: 1px solid #22728d;
  border-radius: 8px;
  padding: 12px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.mens-singles .round-of-16 .ptl-draw-match {
  margin-top: 112px;
}

.mens-singles .round-of-16 .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 120%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-singles .round-of-16 .ptl-draw-match:nth-of-type(1) {
  margin-top: 52px;
}

.mens-singles .round-of-16 .ptl-draw-match::after,
.mens-singles .quarterfinal .ptl-draw-match::after,
.mens-singles .semifinal .ptl-draw-match::after,
.mens-singles .final .ptl-draw-match::after,
.mens-doubles .quarterfinal .ptl-draw-match::after,
.mens-doubles .semifinal .ptl-draw-match::after,
.mens-doubles .final .ptl-draw-match::after,
.mens-qualifying-singles .qualifying-round-2 .ptl-draw-match::after {
  content: "";
  width: 1.25rem;
  height: 2px;
  background: #d7d9dc;
  position: absolute;
  top: 50%;
  left: -1.25rem;
}

.mens-singles .quarterfinal .ptl-draw-match {
  margin-top: 337px;
}

.mens-singles .quarterfinal .ptl-draw-match:nth-of-type(1) {
  margin-top: 162px;
}

.mens-singles .quarterfinal .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 240%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-singles .semifinal .ptl-draw-match {
  margin-top: 788px;
}

.mens-singles .semifinal .ptl-draw-match:nth-of-type(1) {
  margin-top: 387px;
}

.mens-singles .semifinal .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 475%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-singles .final .ptl-draw-match:nth-of-type(1) {
  margin-top: auto;
  margin-bottom: auto;
}

.mens-singles .final .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 920px;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-doubles .quarterfinal .ptl-draw-match {
  margin-top: 170px;
}

.mens-doubles .quarterfinal .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 120%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-doubles .quarterfinal .ptl-draw-match:nth-of-type(1) {
  margin-top: 70px;
}

.mens-doubles .semifinal .ptl-draw-match {
  margin-top: 455px;
}

.mens-doubles .semifinal .ptl-draw-match:nth-of-type(1) {
  margin-top: 243px;
}

.mens-doubles .semifinal .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 300%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-doubles .final .ptl-draw-match:nth-of-type(1) {
  margin-top: auto;
  margin-bottom: auto;
}

.mens-doubles .final .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 550%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-qualifying-singles .qualifying-round-2 .ptl-draw-match {
  margin-top: 112px;
}

.mens-qualifying-singles .qualifying-round-2 .ptl-draw-match::before {
  content: "";
  width: 0.75rem;
  height: 120%;
  border: 2px solid #d7d9dc;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-left: 0;
  position: absolute;
  left: -2rem;
}

.mens-qualifying-singles .qualifying-round-2 .ptl-draw-match:nth-of-type(1) {
  margin-top: 52px;
}

.ptl-match-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ptl-match-scores {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 8px;
}

.ptl-scores-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.ptl-scores-row:last-child {
  margin-bottom: 0;
}

.ptl-player-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.ptl-player-name strong {
  color: #f2ff00;
}

.ptl-score {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 20px;
}

/* Highlight winning scores */
.ptl-scores-row.winner .ptl-player-name {
  color: #f2ff00;
  font-weight: 700;
}

/* Highlight individual winning sets */
.ptl-score.winning-score {
  background-color: rgba(242, 255, 0, 0.3);
  border-color: #f2ff00;
  color: #f2ff00;
  font-weight: 700;
}

.ptl-player-top {
  font-weight: 600;
  margin-bottom: 4px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ptl-player-bottom {
  font-weight: 600;
  margin-top: 4px;
  padding: 4px 0;
}

.ptl-match-result {
  font-size: 0.9rem;
  color: #f2ff00;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
  padding: 4px;
  background-color: rgba(242, 255, 0, 0.1);
  border-radius: 4px;
}

.ptl-no-matches {
  text-align: center;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  padding: 20px;
}

/* Responsive adjustments for draw tree */
@media (max-width: 900px) {
  .ptl-draw-match {
    min-height: 70px;
    padding: 10px;
  }
}

@media (max-width: 1020px) {
  .player-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 850px) {
  .ptl-matches-grid {
    gap: 2rem;
  }
}

/* --- Responsive adjustments (New/Adjusted for results table) --- */
@media (max-width: 779px) {
  .protennislive-players-container, {
    padding: 15px;
  }

.ptl-results-container {
  padding: 0px;
}

  .protennislive-players-container h2,
  .ptl-results-container h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    letter-spacing: -0.1rem;
  }
  .ptl-results-container h3 {
    font-size: 1.5em;
    margin-top: 3rem;
  }

  .player-card {
    padding: 15px;
  }
}

@media (max-width: 561px) {
  .player-list-grid {
    gap: 1rem;
  }

  .player-headshot img {
    max-width: 200px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .player-info p {
    margin: 2px 0;
  }

  .player-height-weight,
  .player-atp-rang {
    gap: 4px;
  }
}

@media (max-width: 400px) {
  .ptl-match-table th:nth-child(2), /* Set 1 */
  .ptl-match-table td:nth-child(2) {
    width: 50px;
  }
  .ptl-match-table th:nth-child(3), /* Set 2 */
  .ptl-match-table td:nth-child(3) {
    width: 50px;
  }
  .ptl-match-table th:nth-child(4), /* Set 3 */
  .ptl-match-table td:nth-child(4) {
    width: 50px;
  }
  /* This targets the Set headers and makes their text content invisible */
  .ptl-match-table thead th:nth-child(2),
  .ptl-match-table thead th:nth-child(3),
  .ptl-match-table thead th:nth-child(4) {
    font-size: 0;
    padding: 0;
  }
}

/* Responsive adjustments for schedule table */
@media (max-width: 779px) {
  .ptl-schedule-container {
    padding: 15px;
  }

  .ptl-schedule-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    letter-spacing: -0.1rem;
  }

  .ptl-date-heading {
    font-size: 1.5em;
  }

  .ptl-round-heading {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .ptl-schedule-table {
    font-size: 0.9rem;
  }

  .ptl-schedule-table th,
  .ptl-schedule-table td {
    padding: 8px 10px;
  }
}

.ptl-live-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Live Matches Table Styles - Using same styling as results table */
.ptl-live-matches-table {
  max-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  color: white;
  table-layout: fixed;
}

.ptl-live-matches-table th,
.ptl-live-matches-table td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
  word-wrap: break-word;
}

.ptl-live-matches-table th {
  text-transform: uppercase;
}

.ptl-live-matches-table th:not(:first-child),
.ptl-live-matches-table td:not(:first-child) {
  text-align: center;
}

.ptl-live-matches-table td:first-child {
  border-right: 1px solid #22728d;
}

/* Ensure set scores are always centered */
.ptl-live-matches-table .ptl-set-score {
  text-align: center !important;
}

.ptl-live-matches-table thead {
  background-color: #22728d;
  color: #ffffff;
  font-weight: 600;
}

.ptl-live-matches-table tbody tr:nth-child(even) {
  background-color: rgba(34, 114, 141, 0.35);
}

.ptl-live-matches-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Serve indicator using CSS ::after */
.ptl-serving::after {
  content: "●";
  margin-left: 8px;
  color: #ff6b6b;
  font-size: 16px;
  font-weight: bold;
  display: inline-block;
  animation: pulse 1.5s infinite;
  text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

/* Pulse animation for serve indicator */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Current game score styling - white color */
.ptl-current-score {
  font-weight: bold;
  color: white;
  min-width: 50px;
}

/* Seed styling */
.ptl-seed {
  color: #6c757d;
  font-size: 12px;
}

/* Status styling */
.ptl-status-live {
  color: #e74c3c;
  font-weight: bold;
}

.ptl-status-completed {
  color: #28a745;
  font-weight: bold;
}

.ptl-status-pending {
  color: #6c757d;
}

/* Set score styling */
.ptl-set-score {
  text-align: center;
  font-weight: bold;
}

.ptl-winning-set {
  background-color: rgba(255, 193, 7, 0.3);
  color: #ffc107;
  font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
  .ptl-live-matches-container {
    padding: 0px;
    border: none;
    box-shadow: none;
    overflow-x: auto;
  }

  .ptl-live-match-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .ptl-live-matches-container .ptl-match-court,
  .ptl-live-matches-container .ptl-match-time {
    font-size: 0.9rem;
  }

  .ptl-live-matches-table {
    min-width: 300px; /* adjust depending on your table’s content */
    border-collapse: collapse;
  }

  .ptl-live-matches-container h2 {
    font-size: 2rem;
    letter-spacing: -0.08rem;
  }

  .ptl-live-matches-container h2::after {
    display: inline-block;
    width: 30px;
  }

  /* Compact table column widths for new layout */
  .ptl-live-matches-table th:nth-child(1), /* Spieler */
  .ptl-live-matches-table td:nth-child(1) {
    min-width: 150px !important;
    text-align: left;
  }

  .ptl-live-matches-table th:nth-child(2),
  .ptl-live-matches-table th:nth-child(3),
  .ptl-live-matches-table th:nth-child(4),
  .ptl-live-matches-table th:nth-child(5) {
    font-size: 0px;
  }

  .ptl-live-matches-table th:nth-child(2), /* Aktueller Spielstand */
.ptl-live-matches-table td:nth-child(2) {
    width: 75px !important;
  }

  .ptl-live-matches-table th:nth-child(3), /* Set 1 */
  .ptl-live-matches-table td:nth-child(3) {
    width: 50px !important;
  }

  .ptl-live-matches-table th:nth-child(4), /* Set 2 */
.ptl-live-matches-table td:nth-child(4) {
    width: 50px !important;
  }

  .ptl-live-matches-table th:nth-child(5), /* Set 3 */
.ptl-live-matches-table td:nth-child(5) {
    width: 50px !important;
  }

  .ptl-schedule-container {
    padding: 0px;
  }

  .ptl-schedule-table td:nth-child(1),
  .ptl-schedule-table th:nth-child(1) {
    width: 100px;
  }

  .ptl-schedule-table th:nth-child(2),
  .ptl-schedule-table td:nth-child(2) {
    display: none;
  }

  .ptl-table th,
  .ptl-table td {
    font-size: 14px;
  }
}

/* Match header styling */
.ptl-match-header {
  margin: 10px 0 5px 0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: white;
  max-width: 700px;
}

.ptl-match-date {
  font-weight: bold;
}

.ptl-match-court {
  font-size: 14px;
  font-weight: 500;
}

.ptl-match-time {
  font-size: 14px;
  color: white;
  font-weight: 700;
}

/* Compact table column widths for new layout */
.ptl-live-matches-table th:nth-child(1), /* Spieler */
.ptl-live-matches-table td:nth-child(1) {
  width: 70%;
  text-align: left;
}

.ptl-live-matches-table th:nth-child(2), /* Aktueller Spielstand */
.ptl-live-matches-table td:nth-child(2) {
  width: 150px;
}

.ptl-live-matches-table th:nth-child(3), /* Set 1 */
.ptl-live-matches-table td:nth-child(3) {
  width: 75px;
}

.ptl-live-matches-table th:nth-child(4), /* Set 2 */
.ptl-live-matches-table td:nth-child(4) {
  width: 75px;
}

.ptl-live-matches-table th:nth-child(5), /* Set 3 */
.ptl-live-matches-table td:nth-child(5) {
  width: 75px;
}
