/* ==========================================================================
   Base Overrides & Helpers
   ========================================================================== */

/* bump Enfold’s default 85% container up to 95% on phones */
@media (max-width: 768px) {
  .responsive #top #wrap_all .container {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* always-win helper class for competition headers */
.comp-header {
  background: #cccccc !important;
  color:      #003366 !important;
  text-align: left !important;
  padding-left: 1em;
}

/* short fixture details (mobile summary block) */
.fixtures__details--short {
  display: flex;
  justify-content: space-between;
  padding: 0.5em 1em;
  font-size: 0.9em;
  background: #f7f7f7;
}
.fixtures__short-date,
.fixtures__short-comp,
.fixtures__short-round {
  flex: 1;
  text-align: center;
}

/* “more…” link centering */
.fixtures__more {
  text-align: center;
}
.fixtures__more-link {
  display: inline-block;
}

/* force fixture-time text to white */
.fixtures__time {
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   League Table
   ----------------------------------------------------------------------- */
.league-table {
  margin: 2em 0;
  font-family: Verdana, Arial, sans-serif;
}
.league-table__title {
  text-align: center;
  font-size: 1.5em;
  margin-bottom: 0.5em;
  color: #333;
}
.league-table__wrapper {
  overflow-x: auto !important;    /* make responsive again */
}
.league-table__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;             /* enforce fixed widths */
  min-width: 0 !important;         /* remove any earlier min-width */
}
.league-table__table th,
.league-table__table td {
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  text-align: center;
}
.league-table__table thead th {
  background: #FFCA47;
  color: #fff;
  font-weight: 400;
  text-align: left;
  border-bottom: 1px solid #e1e7ec;
}
/* stripes */
.league-table__table tbody tr:nth-child(odd)  { background: #fff; }
.league-table__table tbody tr:nth-child(even) { background: #f0f0f0; }
/* column widths */
.league-table__table th:nth-child(1),
.league-table__table td:nth-child(1) { width: 8%;  } /* # */
.league-table__table th:nth-child(2),
.league-table__table td:nth-child(2) { width: 30%; } /* Team */
.league-table__table th:nth-child(n+3),
.league-table__table td:nth-child(n+3) { width: 7.75%; } /* others */
/* text align */
.league-table__table td.col-team,
.league-table__table th.col-team {
  text-align: left;
}
/* logo & link styles */
.league-table__logo {
  width: 24px;
  vertical-align: middle;
  margin-right: 0.5em;
}
.league-table__team {
  vertical-align: middle;
  text-decoration: none;
  color: #0000cc;
}
.league-table__team:hover {
  text-decoration: underline;
}
/* past-season names (span) stay grey and not-clickable */
span.league-table__team {
  color: #333 !important;
  font-weight: 500;
  text-decoration: none !important;
  cursor: default;
}

/* narrow-screen tweaks */
@media (max-width: 768px) {
  .league-table__table th,
  .league-table__table td {
    padding: 0.4em 0.5em;
    font-size: 0.85em;
  }
  .league-table__table th:nth-child(2),
  .league-table__table td:nth-child(2) {
    width: 40%;
  }
  .league-table__table th:nth-child(n+3),
  .league-table__table td:nth-child(n+3) {
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   Fixtures & Results (desktop & mobile)
   ----------------------------------------------------------------------- */

.fixtures {
  margin: 2em 0;
  font-family: Verdana, Arial, sans-serif;
}
.fixtures__title {
  text-align: center;
  font-size: 1.5em;
  margin-bottom: 0.5em;
  color: #333;
}
.fixtures__group {
  margin-bottom: 2em;
}

/* date & round headers */
.fixtures__header {
  padding: 0.75em 1em;
  text-align: center;
}
.fixtures__header--date {
  background: #FFCA47;
  color: #fff;
  font-size: 1.2em;
  font-weight: 700;
}
.fixtures__header--round {
  background: #f7f9fa;
  color: #555;
  font-size: 1em;
  font-weight: 600;
}

/* main fixture line */
.fixtures__item {
  position: relative;            /* for inset logos */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 2.5em;         /* extra side padding for inset logos */
}

/* inset logos on large screens */
.fixtures__logo--home {
  position: absolute;
  top: 50%; left: 1em;
  transform: translateY(-50%);
}
.fixtures__logo--away {
  position: absolute;
  top: 50%; right: 1em;
  transform: translateY(-50%);
}

/* hide inline logos on mobile grid below */
@media (max-width: 768px) {
  .fixtures__logo,
  .league-table__logo {
    display: none !important;
  }
}

/* team blocks */
.fixtures__team {
  display: flex;
  align-items: center;
  flex: 1;
  font-weight: 700;
  color: #000;
  text-decoration: none;
}
.fixtures__team--home {
  justify-content: flex-end;
  text-align: right;
  margin-right: 1em;
}
.fixtures__team--away {
  justify-content: flex-start;
  text-align: left;
  margin-left: 1em;
}
.fixtures__logo {
  width: 32px;
  margin: 0 0.5em;
}
.fixtures__name {
  white-space: nowrap;
}
/* fixture names that shouldn’t link get this */
.fixtures__name.no-link {
  color: #333 !important;
  text-decoration: none !important;
  cursor: default;
}
/* real links */
a.fixtures__name {
  color: #0000cc;
  text-decoration: underline;
}
a.fixtures__name:hover {
  text-decoration: none;
}

/* middle: scores/time/status */
.fixtures__middle {
  display: flex;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  gap: 0.5em;            /* spacing */
  flex-wrap: nowrap;     /* never wrap */
}
.fixtures__score {
  display: inline-block;
  padding: 0.3em 0.6em;
  border-radius: 3px;
  color: #fff;
  font-weight: 500;
}
/* winning/losing/draw colours (can be overridden inline) */
.fixtures__score--winner { background: #7c9c27; }
.fixtures__score--loser  { background: #666;   }
.fixtures__score--draw   { background: #7c9c27; }
/* remove gold band */
.fixtures__score--with-border { border: none !important; }
.fixtures__status--postponed {
  display: inline-block;
  padding: 0.3em 0.6em;
  background: #ccc;
  border-radius: 3px;
  font-weight: 600;
  margin: 0 0.3em;
}

/* details + TV */
.fixtures__details {
  padding: 0.5em 1em 1em;
  text-align: center;
  font-size: 0.9em;
  color: #333;
  line-height: 1.4;
  width: 100%;
  border-top: 0px solid #eee;
}
.fixtures__details strong {
  font-weight: 700;
}
.fixtures__tv {
  margin-top: 0.5em;
}
.fixtures__tv-logo {
  width: 50px;
  height: auto;
}

/* stripes via .fixtures__row rather than old .fixtures__item */
.fixtures__row {
  margin-bottom: 1em;
  overflow-x: auto;
}
.fixtures__row--odd .fixtures__item,
.fixtures__row--odd .fixtures__details   { background: #f0f0f0 !important; }
.fixtures__row--even .fixtures__item,
.fixtures__row--even .fixtures__details  { background: #fff   !important; 


	/* force padding on every time badge, odd or even */
.fixtures__time {
  padding: 0px 3px 0px 3px !important;
}





/* ========================================================================
   Mobile-only grid & stacking overrides
   ====================================================================== */
@media (max-width: 768px) {
  /* 3-column grid: home | middle | away */
  .fixtures__item {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 0.5em;
    padding: 0.5em 1em !important;
  }
  /* stack each team’s logo _above_ its name */
  .fixtures__team {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 !important;
  }
  .fixtures__logo {
    order: 0;
    margin-bottom: 0.25em;
  }
  .fixtures__name {
    order: 1;
  }
  /* ensure “middle” never wraps */
  .fixtures__middle {
    justify-self: center;
    overflow-x: auto;
  }
  /* tighten details block */
  .fixtures__details {
    padding: 0.5em 1em 1em !important;
  }
 

  
    /* make home team flush-right of its 1st column */
  .fixtures__team--home {
    justify-self: end !important;
	margin-right: 0.4em !important;
    text-align: right !important;
  }

  /* make away team flush-left of its 3rd column */
  .fixtures__team--away {
    justify-self: start !important;
	margin-left: 0.4em !important;
    text-align: left !important;
  }  
  
 

	/* force padding on every time badge, odd or even */
	.fixtures__time {
	  display: inline-block !important;
	  padding: 0 0.4em !important;
	  
	}
   
}
