/* =========================
   CONTENT LINKS
========================= */

.contentData a,
.contentDate a {
  color: #222;
  text-decoration: none;
}

.contentData a:hover,
.team a:hover {
  color: #CC0000;
}

/* =========================
   ANAL TABLE
========================= */

.analTable {
  border: 1px solid #e6e6e6;
  box-shadow: rgba(149,157,165,0.2) 0px 8px 24px;
  border-radius: 15px;
  display: block;
  font-size: 14px;
  width: 650px;
  padding: 8px;
}

.analTable > .row {
  display: table;
  table-layout: fixed;
  width: 100%;
  background: white;
}

/* =========================
   FIXTURE CARD
========================= */

.fixture-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto auto;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  position: relative;
  transition: box-shadow 0.2s ease;
}

.fixture-card.admin {
  grid-template-rows: auto auto auto auto;
}

.fixture-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* --- Admin Row --- */
.fixture-admin {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 5px;
}

/* --- Date --- */
.fixture-date {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 5px;
  text-align: center;
}

.fixture-day {
  font-size: 2.3em;
}

.fixture-month {
  font-size: 0.85em;
  color: #777;
}

.fixture-weekday {
  color: red;
  font-weight: 600;
}

/* --- Layout --- */

.fixture-top,
.fixture-middle,
.fixture-bottom {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fixture-middle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  width: 100%;
}

/* FIXED BUG */
.fixture-bottom {
  grid-row: 3;
  margin-top: 6px;
}

/* --- Referee --- */

.fixture-ref {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ref-head {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* --- Teams --- */

.team {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-team {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
}

.away-team {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px;
}

.team-crest {
  width: 26px;
  height: 26px;
}

.team-name {
  font-size: 1.1em;
  font-weight: 500;
  color: #222;
  white-space: normal;
}

/* --- Score --- */

.fixture-score {
  background: <?php echo hex2rgba($primary_color, 0.6); ?>;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2em;
  white-space: nowrap;
}

.score-sep {
  color: #888;
  margin: 0 3px;
}

/* --- Venue --- */

.fixture-venue {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fixture-venue img {
  width: 18px;
  opacity: 0.8;
}

/* --- Attendance --- */

.fixture-attendance {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 0.85em;
  color: #777;
}

/* --- Toggle Button --- */

.toggle-matchStats {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.triangle {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #333;
  transition: transform 0.3s ease;
}

button.toggle-matchStats[aria-expanded="true"] .triangle {
  transform: rotate(180deg);
}

/* --- Match Stats --- */

.matchStats {
  grid-column: 1 / span 2;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.matchStats-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 10px;
}

.matchStats-row {
  display: contents;
}

.matchStats-cell {
  padding: 2px 5px;
}

.matchStats-cell.home {
  text-align: right;
}

.matchStats-cell.away {
  text-align: left;
}

.plusNeg {
	height: 20px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

  .page-content {
    margin: 0;
    width: 100%;
  }

  .analTable {
    width: 95vw;
    border: 0;
    box-shadow: none;
  }

  .fixture-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 93vw;
  }

  .fixture-date {
    flex-direction: row;
  }

  .fixture-main {
    flex-direction: column;
  }

  .fixture-middle {
    grid-template-columns: 1fr auto 1fr;
  }

  .matchStats-grid {
    grid-template-columns: 1fr 1fr;
    font-size: 10px;
  }

  .matchStats-row > div:first-child {
    display: none;
  }
}
