/*competitionFixture.css*/

.competition-page {
    box-sizing: border-box;
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 45px 2% 100px;
    position: relative;
    z-index: 1;
}

.competition-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.compLogoH {
    text-align: center;
}

#SSContainer {
    text-align: center;
    margin: 20px 0;
}

#SDropdown {
    padding: 8px 12px;
}




/* Fixture card */

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

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

/* Date */

.fixture-date {
    align-items: center;
    background: #f5f5f5;
    border-radius: 10px;
    color: #555;
    display: flex;
    flex-direction: column;
    font-family: 'Lato', sans-serif;
    grid-column: 1;
    grid-row: 1 / -1;
    justify-content: center;
    padding: 5px;
    text-align: center;
}

.fixture-day {
    color: #333;
    font-size: 2.3em;
    font-weight: 400;
    margin: 2px 0;
}

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

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

/* Main fixture */

.fixture-main-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
    grid-column: 2;
    justify-content: center;
    text-align: center;
    width: 100%;
}

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

.fixture-score {
    color: #333;
    font-size: 1.2em;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}

/* Teams */

.home-team,
.away-team {
    align-items: center;
    display: flex;
    gap: 5px;
}

.home-team {
    justify-self: end;
}

.away-team {
    justify-self: start;
}

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

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

/* Top and bottom */

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

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

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

.fixture-bottom {
    margin-top: 6px;
}

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

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


/* Competition logo */

.compLogoH {
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.compLogoH.fade {
    opacity: 0;
}

.compLogoH.fade-in .compLogo {
    transform: scale(1.05);
}

.compLogo {
    max-height: 300px;
    transition: transform 0.4s ease;
}


/* Round expand/collapse icon */

.plusNeg {
    width: 15px;
    height: 15px;
    transition: transform 0.3s ease;
}

.plusNeg.rotate {
    transform: rotate(180deg);
}


/* Match statistics toggle */

.toggle-matchStats {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    padding: 0;
    position: absolute;
    right: 10px;
}

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

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

.roundHead {
    align-items: center;
    border-bottom: 1px solid #e6e6e6;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 500;
    gap: 8px;
    line-height: 1.4;
    min-height: 50px;
    padding: 8px 10px;
    text-align: left;
}

.roundHead .plusNeg {
    flex-shrink: 0;
}

.gameDate {
    color: #888;
    font-size: 14px;
    margin-left: 6px;
}

.roundToggle {
    appearance: none;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    display: block;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 100%;
}

.roundToggle:focus {
    outline: none;
}

.roundToggle:hover .roundHead {
    background: #f8f8f8;
}

.w3gt-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.w3gt-content.show {
    max-height: 5000px;
    opacity: 1;
    overflow: visible;
}


/* =========================
   MATCH STATS
========================= */

.matchStats {
    grid-column: 1 / span 2;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    width: 100%;
    font-size: 11px;
}

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

.matchStats-row {
    display: contents;
}

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

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

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

.event-home,
.event-away {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.event-home {
    justify-content: flex-end;
}

.event-away {
    justify-content: flex-start;
}

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

.card_icon {
    width: auto;
    height: 15px;
    vertical-align: middle;
}

.player-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.player-link:hover {
    color: #cc0000;
}

.matchStats-timeline {
    position: relative;
    width: 100%;
    padding: 10px 0;
}

.matchStats-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #ddd;
    transform: translateX(-50%);
}

.timeline-event {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    align-items: center;
    min-height: 38px;
}

.timeline-home {
    grid-column: 1;
    text-align: right;
    padding-right: 8px;
    font-size: 0.9rem;
}

.timeline-away {
    grid-column: 3;
    text-align: left;
    padding-left: 8px;
    font-size: 0.9rem;
}

.timeline-time {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.event-time-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd;
  font-size: 10px;
  font-weight: 700;
}

.timeline-event.home .event-time-circle {
  background: var(--home-primary);
  color: var(--home-font);
}

.timeline-event.away .event-time-circle {
  background: var(--away-primary);
  color: var(--away-font);
}

.timeline-home .player-link,
.timeline-away .player-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.timeline-home .player-link:hover,
.timeline-away .player-link:hover {
    color: #cc0000;
}

.timeline-home .card_icon,
.timeline-away .card_icon {
    width: auto;
    height: 15px;
    vertical-align: middle;
}



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

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

.ref-name {
  font-size: 13px;
  text-decoration: none;
}

.fixture-attendance {
  margin-left: auto;
  font-size: 12px;
}

.fixture-attendance a {
  text-decoration: none;
}

.fixture-link-left {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.fixture-link-left .extra-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  text-decoration: none;
}











@media (max-width: 700px) {

    .competition-page {
        margin-left: 0;
        width: 100%;
        padding: 70px 2% 80px;
    }

    .competition-content {
        max-width: 95vw;
        margin: 0 auto;
    }
    
    .matchStats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 10px;
	}
	
	.matchStats-row > div:first-child {
	    display: none;
	}
	
	.matchStats-cell.home {
	    justify-self: end;
	    text-align: right;
	}
	
	.matchStats-cell.away {
	    justify-self: start;
	    text-align: left;
	}
	
	.event-home,
	.event-away {
	    gap: 3px;
	    line-height: 1.1;
	}

}