.football-map-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.football-map-header {
    margin-bottom: 25px;
}

.football-map-header h1 {
    margin-bottom: 10px;
}

.football-map-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

.football-map-sidebar {
    padding: 20px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    max-height: 700px;
    overflow-y: auto;
}

.football-map-sidebar h2 {
    margin-top: 0;
    font-size: 20px;
}

.league-group {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.league-group h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.football-map-sidebar label {
    display: block;
    margin: 7px 0;
    cursor: pointer;
    font-size: 14px;
}

.map-filter-all {
    padding-bottom: 10px;
}

.map-filter-parent {
    padding: 10px 0 4px;
    border-top: 1px solid #ddd;
}

#football-grounds-map {
    width: 100%;
    height: 700px;
    min-height: 500px;
}

.club-map-popup h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.club-map-popup p {
    margin: 5px 0;
}

.club-map-popup a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
}

@media (max-width: 800px) {

    .football-map-layout {
        grid-template-columns: 1fr;
    }

    .football-map-sidebar {
        max-height: none;
    }

    #football-grounds-map {
        height: 600px;
    }

}

/* Make the map index more compact */
.football-map-sidebar label {
    margin-top: 3px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.league-group {
    margin-top: 12px;
    padding-top: 8px;
}

.league-group h3 {
    margin-bottom: 5px;
    line-height: 1.3;
}

.map-filter-parent {
    padding-top: 6px;
    padding-bottom: 2px;
}


/* Tighter spacing in the map index */
.football-map-sidebar label {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.1 !important;
}

.football-map-sidebar input[type="checkbox"] {
    margin-top: 0;
    margin-bottom: 0;
}

.football-map-sidebar li {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.1 !important;
}

.football-map-sidebar ul {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.league-group {
    margin-top: 6px !important;
    padding-top: 0 !important;
}

.league-group h3 {
    margin-top: 4px !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
}


/* Keep checkboxes and their labels on the same line */
.football-map-sidebar label {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 6px;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 1px 0 !important;
}

/* Keep checkboxes compact and aligned */
.football-map-sidebar input[type="checkbox"] {
    display: inline-block !important;
    flex-shrink: 0;
    margin: 0 4px 0 0 !important;
    vertical-align: middle;
}

/* Reduce space between index entries */
.football-map-sidebar li {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}


/* Align checkbox and text consistently in league sections */
.football-map-sidebar .league-group label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100%;
    text-align: left !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    line-height: 1.2 !important;
}

.football-map-sidebar .league-group input[type="checkbox"] {
    position: static !important;
    float: none !important;
    flex: 0 0 auto !important;
    margin: 0 4px 0 0 !important;
    vertical-align: middle !important;
}