﻿/* MAIN 2-COLUMN LAYOUT */
/* Page background tone */
.fixture-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    padding: 20px;
    background: linear-gradient(to bottom, #f8fafc, #eef2f7);
    border-radius: 16px;
}

/* LEFT COLUMN - STACKED PITCHES */
.pitch-column {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e8edf3;
}

.pitch-stack {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

/* RIGHT COLUMN */
.info-column {
    padding-top: 10px;
}


/* Each pitch */
.pitch-container {
    width: 100%;
    position: relative;
    text-align: center;
}

.pitch {
    width: 100%;
    aspect-ratio: 486 / 363;
    background-image: url('/images/football-pitch-half.png');
    background-size: cover;
    background-position: center;
}

.pitch-container + .pitch-container {
    margin-top: -2px; /* slight overlap to remove seam */
}


.player {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100px;
}

.shirt {
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    margin: auto;
    font-weight: 600;
    font-size: 12px;
    color: white;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

/* Mini shirt badge */
.mini-shirt {
    width: 28px;
    height: 28px;
    line-height: 24px;
    border-radius: 50%;
    margin: auto;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.player.goalkeeper .shirt {
    border: 2px solid #ffd600;
    box-shadow: 0 0 0 2px rgba(255,214,0,0.3), 0 2px 6px rgba(0,0,0,0.4);
}

.player-name {
    font-size: clamp(10px, 1vw, 13px);
    color: white;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flip pitch for away team */
.pitch-container.away .pitch {
    transform: rotate(180deg);
}

.pitch-container.away .player {
    transform: translate(-50%, -50%) rotate(180deg);
}


/* Desktop improvement */
@media (min-width: 768px) {

    .shirt {
        width: 32px;
        height: 32px;
        line-height: 28px;
        font-size: 12px;
    }
}
@media (max-width: 768px) {

    .fixture-layout {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .pitch-column {
        padding: 14px;
    }

    .team-card {
        padding: 14px;
    }

    .info-column {
        margin-top: 24px;
    }
    .team-header {
        flex-direction: column;
        gap: 6px;
    }
}

.lineup-pitch-wrapper {
    text-align: center;
    margin-bottom: 12px;
}

.team-formation {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px; /* space between formation and pitch */
}



/* Team card */
.team-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid #e6ebf2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .team-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 40px rgba(0,0,0,0.1);
    }

/* Subtle differentiation */
.home-card {
    border-top: 4px solid #0057b8;
}

.away-card {
    border-top: 4px solid #d32f2f;
}

/* Header section */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9aa6b2;
    margin-bottom: 2px;
}

.value {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
}

/* Player list */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* Position */
.position {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

/* Player name */
.name {
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

.team-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}
.player-events {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

/* Goal */
.event.goal {
    font-size: 14px;
}

/* Yellow card */
.yellow-card {
    width: 10px;
    height: 14px;
    background: #facc15;
    border-radius: 2px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Red card */
.red-card {
    width: 10px;
    height: 14px;
    background: #dc2626;
    border-radius: 2px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Highlight when synced */
.player.highlight .shirt,
.player.highlight .player-name {
    transform: scale(1.4);
    transition: 0.15s ease;
    z-index: 5;
}

.player-row.highlight {
    background: #e0f2fe;
}

.player-row {
    display: grid;
    grid-template-columns: 34px 36px 1fr auto auto; /* added extra column for substitute */
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
}

    .player-row:hover {
        background: #f1f5f9;
    }

.player-events {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-details {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.team-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fixtureevents-badge-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.fixtureevents-flag-icon {
    font-size: 20px;
    line-height: 1;
}

.tournament-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 1.5rem; /* control height only */
    width: auto; /* allow width to adjust */
}

    .tournament-icon img {
        height: 100%; /* scale by height */
        width: auto; /* maintain ratio */
        object-fit: contain;
        display: block;
    }
.fixture-time .badge {
    line-height: 1;
}
/* Ensure header buttons are always clickable */
.public-fixture-date,
.previousdate,
.nextdate {
    position: relative;
    z-index: 5;
}


/* Prevent fixture grid from sitting above header */
.fixture-grid {
    position: relative;
    z-index: 1;
}
.date-nav-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 576px) {
    .public-fixture-date{
        font-size:1em;
    }
    h4.d-flex {
        flex-wrap: wrap;
        gap: 8px;
    }

    h4 .d-flex {
        margin-left: auto;
    }
}

/* ===========================
   MANAGER CARD
=========================== */

.manager-card {
    background: linear-gradient(145deg, #ffffff, #f4f6f9);
    border-radius: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    max-width: 320px;
    margin: 0 auto;
}

    .manager-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    }

.manager-header {
    letter-spacing: 1px;
}

.manager-photo-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.manager-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.manager-photo-placeholder {
    font-size: 3rem;
    color: #ccc;
}

.manager-name {
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

.player-meta {
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.player-age {
    font-weight: 500;
    opacity: 0.85;
}

.age-divider {
    opacity: 0.5;
}