<STYLE>
/* ========================================
   Sidebets Stats Table — Final version
   ======================================== */

table.sidebets-stats-card {
  background: #ffffff;
  border: 1px solid #e5e5e2;
  border-radius: 12px;
  overflow: hidden;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Header row */
.sidebets-stats-header {
  padding: 16px 20px !important;
  border-bottom: 1px solid #f0f0ee;
  text-align: left;
  font-weight: normal;
}

.sidebets-stats-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a2744;
  margin: 0;
}

.sidebets-stats-subtitle {
  font-size: 11px;
  color: #888;
  margin: 3px 0 0;
  font-weight: 400;
}

/* Column headers — center aligned */
.sidebets-stats-thead th {
  background: #fafbfc;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0ee;
}

.sidebets-stats-thead th:first-child {
  text-align: left;
}

/* Body cells — center aligned */
.sidebets-stats-card tbody td {
  padding: 10px 12px;
  text-align: center;
  color: #1a2744;
  border-bottom: 1px solid #f7f8fa;
  font-weight: 500;
  font-size: 12px;
  vertical-align: middle;
}

.sidebets-stats-card tbody td:first-child {
  text-align: left;
  font-weight: 600;
}

.sidebets-stats-card tbody tr:last-child td {
  border-bottom: none;
}

/* Group headers */
.sidebets-stats-card tr.sidebets-group-header td {
  background: #f7f8fa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 700;
  padding: 6px 12px;
  text-align: left;
}

/* Percentage cell — grid με fixed widths για ευθυγράμμιση */
.sidebets-pct {
  display: inline-grid;
  grid-template-columns: 80px 50px;
  align-items: center;
  gap: 10px;
}

.sidebets-pct-value {
  font-size: 12px;
  color: #1a2744;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}

/* Mini bar — track */
.sidebets-mini-bar {
  width: 80px;
  height: 12px;
  background: #1a2744;
  border-radius: 99px;
  overflow: hidden;
}

/* Empty bar — όταν είναι 0% */
.sidebets-mini-bar.empty {
  background: #e5e5e2;
}

/* Mini bar fill — striped orange */
.sidebets-mini-bar-fill {
  height: 100%;
  border-radius: 99px;
  background-image: linear-gradient(
    135deg,
    #fdb43e 0%,
    #fdb43e 25%,
    #f97d0e 25%,
    #f97d0e 50%,
    #fdb43e 50%,
    #fdb43e 75%,
    #f97d0e 75%,
    #f97d0e 100%
  );
  background-size: 14px 14px;
}

/* Zero rows */
.sidebets-stats-card td.sidebets-zero,
.sidebets-stats-card .sidebets-pct-value.sidebets-zero {
  color: #b0b0b0 !important;
  font-weight: 400;
}

/* Max καθυστέρηση */
.sidebets-kathyst-max {
  background: #fee2e2;
  color: #b91c1c;
  display: inline-block;
  min-width: 28px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

/* Hover state */
.sidebets-stats-card tbody tr:not(.sidebets-group-header):hover {
  background: #fafbfc;
}

/* ============================================================
   RESPONSIVE — Tablet (έως 768px)
   ============================================================ */
@media (max-width: 768px) {
  
  /* Μικρότερα paddings παντού */
  .sidebets-stats-card tbody td {
    padding: 9px 8px;
    font-size: 11px;
  }
  
  .sidebets-stats-thead th {
    padding: 8px 8px;
    font-size: 9px;
  }
  
  .sidebets-stats-header {
    padding: 12px 14px !important;
  }
  
  .sidebets-stats-title {
    font-size: 13px;
  }
  
  /* Μικρότερη μπάρα */
  .sidebets-pct {
    grid-template-columns: 55px 42px;
    gap: 6px;
  }
  
  .sidebets-mini-bar {
    width: 55px;
    height: 10px;
  }
  
  .sidebets-pct-value {
    font-size: 11px;
  }
  
  /* Μικρότερο max-kathysterhsh pill */
  .sidebets-kathyst-max {
    padding: 2px 7px;
    font-size: 10px;
    min-width: 24px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile small (έως 480px)
   ============================================================ */
@media (max-width: 480px) {
  
  /* Κρύψε εντελώς την μπάρα — μόνο το ποσοστό μένει */
  .sidebets-mini-bar {
    display: none;
  }
  
  .sidebets-pct {
    display: inline;
    grid-template-columns: none;
    gap: 0;
  }
  
  .sidebets-pct-value {
    font-size: 11px;
  }
  
  /* Ακόμα μικρότερα paddings */
  .sidebets-stats-card tbody td {
    padding: 8px 6px;
    font-size: 11px;
  }
  
  .sidebets-stats-thead th {
    padding: 6px 6px;
    font-size: 9px;
  }
  
  /* Στις στήλες, σύντμηση: "Στήλη 1" → "Στ. 1" — αυτό γίνεται με JS ή με data-attribute */
  /* Αν θες αυτή τη βελτίωση, στο PHP άλλαξε:
     $var_stats_text = "Στήλη " . $var_stats_index;
     σε:
     $var_stats_text = "<span class='sidebets-full'>Στήλη </span><span class='sidebets-short'>Στ. </span>" . $var_stats_index;
     και στο CSS εδώ:
  */
  .sidebets-short { display: inline; }
  .sidebets-full  { display: none; }
}

@media (min-width: 481px) {
  .sidebets-short { display: none; }
  .sidebets-full  { display: inline; }
}

</STYLE>
