/* ======================================================= */
/* Unified Table CSS for all tables                        */
/* Works for table-matches and table-player               */
/* ======================================================= */

/* Base tables */
.table-matches,
.table-player {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #aaa;
  font-size: 13px;
  font-family: Arial, sans-serif;
}

/* Header */
.table-matches thead th,
.table-player thead th {
  background-color: #222;
  color: #f0d880;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid #aaa;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.table-matches thead,
.table-player thead {
  border-bottom: 2px solid #aaa;
}

/* Cells */
.table-matches td,
.table-player td {
  padding: 10px 6px;
  border: 1px solid #aaa;
  vertical-align: top;
}

/* Season separator row */
.table-matches .season-row td,
.table-player .season-row td {
  background: #f9f9f9;
  font-weight: 500;
  text-align: left;
  padding: 6px;
}

/* Home / Away / Neutral rows */
.table-matches .row-home,
.table-player .row-home { background-color: #ddd; }
.table-matches .row-away,
.table-player .row-away { background-color: #eee; }
.table-matches .row-neutral,
.table-player .row-neutral { background-color: #eee; }

/* Hover effect for match rows */
.table-matches tbody tr:hover,
.table-player tbody tr:hover {
  background-color: #bbb;
}

.table-matches tbody tr,
.table-player tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.table-matches tbody tr.season-row:hover,
.table-player tbody tr.season-row:hover {
  background-color: inherit;
}

/* Preserve result coloring on hover */
.table-matches tbody tr:hover td.result.win,
.table-player tbody tr:hover td.result.win {
  background-color: #c0ffc0;
}

.table-matches tbody tr:hover td.result.loss,
.table-player tbody tr:hover td.result.loss {
  background-color: #ff8080;
}

.table-matches tbody tr:hover td.result.draw,
.table-player tbody tr:hover td.result.draw {
  background-color: #ffffbb;
}

/* Result cell */
.table-matches .result,
.table-player .result {
  text-align: center;
  font-weight: bold;
}

/* Result states */
.table-matches .win,
.table-player .win { background-color: #c0ffc0; }
.table-matches .loss,
.table-player .loss { background-color: #ff8080; }
.table-matches .draw,
.table-player .draw { background-color: #ffffbb; }

/* Extras text */
.table-matches .extras,
.table-player .extras { color: #8080ff; }

/* Media icons */
.table-matches .media img,
.table-player .media img {
  vertical-align: middle;
  margin-right: 4;
  display: inline-block;
}
@media screen and (max-width: 768px) {
  .table-matches .col-att,
  .table-player .col-att,
  .table-matches .col-day,
  .table-player .col-day {
   display: none;
  }
  
  .table-matches .season-row td,
  .table-player .season-row td {
    display: table-caption;  /* spans the full table width */
    caption-side: top;       /* optional: keeps it visually like a row */
    text-align: left;         /* keep left-aligned */
  }
}

