body.page-id-9 {
    height: 100%;
    width: 100%;
    color: #404040;
    font:
        400 20px/28px 'Source Sans Pro',
        'Helvetica Neue',
        sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

div.elementor-element-359c1a5 > div.e-con-inner {
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.heading > h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 400;
    line-height: 20px;
    padding: 20px 2px;
}

a {
    color: #404040;
    text-decoration: none;
}

a:hover {
    color: #101010;
}

.elementor a.listings-a {
    display: inline-block;
    height: 100%;
    max-height: 160px;
    width: 100%;
}

p {
    margin: 0px;
}

.custom-mapbox-shortcode {
    position: relative;
    height: 85vh;
}

@media (max-width: 768px) {
    .custom-mapbox-shortcode {
        height: 75vh;
    }
}

/* header bar fixes */

header .custom-logo-link img.custom-logo {
    width: 50px;
    margin-left: 20px;
}

@media (max-width: 768px) {
    .ast-builder-grid-row-layout-default > div:nth-child(1) {
        height: fit-content;
        margin-top: 15px;
    }
}

.sidebar {
    position: absolute;
    width: 40%;
    height: inherit;
    top: 0;
    left: 0;
    border: 1px solid rgb(0 0 0 / 25%);
    display: flex;
    flex-direction: column;
}

.sidebar.hidden {
    display: none;
}

#map {
    will-change: transform;
    transform: translateZ(0);
    touch-action: none;
}

.mapboxgl-canvas {
    touch-action: none;
}

.map {
    position: absolute;
    left: 40%;
    width: 60%;
    top: 0;
    bottom: 0;
    border: 1px solid rgb(0 0 0 / 25%);
    height: inherit;
}

.map.full {
    left: 0;
    width: 100%;
}

#mobileToggler {
    display: none;
}

.desktop-court-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: inherit;
}

.desktop-nav-button {
    border-radius: 0;
    height: 20%;
    padding: 15px 10px 15px 10px;
}

.desktop-nav-button.prev {
    border-radius: 10px 0 0 10px;
}

.desktop-nav-button.next {
    border-radius: 0 10px 10px 0;
}

.mobile-buffer {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 65%;
    max-height: 200px;
    height: 100%;
}

.full > .mobile-buffer {
    width: 45%;
}

.mobile-court {
    background-color: #fb2056;
    color: white;
}

.mobile-court > div > h5 {
    color: white;
}

.elementor a.listings-a.mobile-court {
    max-height: unset;
    height: inherit;
    border-radius: 8px;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    .mobile-objective {
        height: 100%;
    }
    
    .full > .mobile-buffer {
        width: 100%;
    }
    
    .map {
        position: absolute;
        left: 0%;
        width: 100%;
        top: 0;
        bottom: 0;
        height: inherit; /* Adjust dynamically */
    }

    .sidebar {
        position: absolute;
        width: 100%;
        height: inherit; /* Adjust dynamically */
        top: 0;
        left: 0%;
        background: white;
        z-index: 1000;
        transform: translateY(0%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }
    
    #mobileToggler {
        display: block;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        width: fit-content;
        transform: translateX(100%);
        position: fixed;
        bottom: 0;
    }
    
    #mobileToggler.hidden {
        display: none;
    }
    
    .mobile-buffer {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 180px;
    }
    
    .mobile-court {
        background-color: #fb2056;
        color: white;
    }
    
    .mobile-court > div > h5 {
        color: white;
    }
    
    .mobile-court > div > div > p {
        margin-bottom: 1.6em;
    }
    
    .swipe-enabled {
        display: inline-block;
        padding: 10px 20px;
        position: relative;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        cursor: grab;
        user-select: none;
        touch-action: pan-y;
        transition: transform 0.2s ease;
    }
    
    /* Arrows */
    a.swipe-enabled::before,
    a.swipe-enabled::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 12px;
        height: 12px;
        border-top: 2px solid #fff;
        border-right: 2px solid #fff;
        transform: translateY(-50%);
    }
    
    a.swipe-enabled::before {
        left: 5px;
        transform: translateY(-50%) rotate(-135deg);
    }
    
    a.swipe-enabled::after {
        right: 5px;
        transform: translateY(-50%) rotate(45deg);
    }
    
    /* Hover feedback */
    a.swipe-enabled:hover {
        transform: scale(1.02);
    }
    
    .elementor a.listings-a.mobile-court {
        border-radius: 0;
    }
}

.heading {
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 60px;
    line-height: 60px;
    padding: 0 10px;
}

/* Listings tweaks */
.listings {
    flex-grow: 1; /* Makes it take up remaining space */
    overflow-y: auto; /* Enables vertical scrolling */
    max-height: calc(100vh - 180px - var(--header-height));
}

::-webkit-scrollbar {
    width: 3px;
    height: 3px;
    border-left: 0;
    background: rgba(0 0 0 0.1);
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: #00853e;
    border-radius: 0;
}

/* Marker tweaks */
.mapboxgl-popup-close-button {
    display: none;
}

.mapboxgl-popup-content {
    font:
        400 15px/22px 'Source Sans Pro',
        'Helvetica Neue',
        sans-serif;
    padding: 0;
    width: 180px;
}

.mapboxgl-popup-content h5 {
    background: #91c949;
    color: #fff;
    margin: 0;
    padding: 10px;
    border-radius: 5px 5px 0 0;
    font-weight: 500;
    margin-top: -15px;
}

.mapboxgl-popup-content h6 {
    margin: 0;
    padding: 10px;
    font-weight: 300;
}

.mapboxgl-popup-content div {
    padding: 10px;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-content {
    margin-top: 15px;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-tip {
    border-bottom-color: #91c949;
}

/* Part 8 tweaks */
img.marker.courts-display {
    border: none;
    cursor: pointer;
    height: 50px;
    width: 50px;
}

/* Courts */
.courts-display {
    display: inline-block;
    width: 56px;
    height: auto;
}

.mapboxgl-popup {
    padding-bottom: 50px;
}

/* Search bar tweaks */
.mapboxgl-ctrl-geocoder {
    border: 0;
    border-radius: 0;
    position: relative;
    top: 0;
    width: 50vw;
    margin-top: 0;
}

@media (max-width: 768px) {
    .mapboxgl-ctrl-geocoder .suggestions > li > a {
        line-height: inherit;
    }
}

.mapboxgl-ctrl-geocoder > div {
    min-width: 100%;
    margin-left: 0;
}

.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon-search {
    display: none;
}

.mapboxgl-ctrl-bottom-right > div.mapboxgl-ctrl.mapboxgl-ctrl-attrib {
    display: none;
}

/* Middle Detail View of Courts */
.middle-view-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* grid-template-rows: repeat(3, 1fr); */
    gap: 0 0;
    grid-template-areas:
        "Image Title Title"
        "Image Description Description2"
        "Image Description Description2";
    align-items: center;
    border: 1px solid #D3D3D3;
    border-radius: 8px;
    margin: 10px 10px 10px 10px;
    height: inherit;
    max-height: inherit;
    overflow: auto;
}

.middle-view-container.clone {
    margin: 0;
    padding: 10px;
}

.middle-view-container.no-image {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "Title Title"
        "Description Description2"
        "Description Description2";
}

.middle-view-container .mv-image {
    grid-area: Image;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: inherit;
    object-fit: cover;
    display: block;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* .middle-view-container .mv-image.r2r-image {
    object-fit: contain;
} */

div > div.mv-description,
div > div.mv-description-2 {
    width: 100%;
    font-size: 1rem;
    display: grid;
    align-self: stretch;
    align-content: space-evenly;
    justify-content: space-evenly;
    line-height: normal;
}

div > div.mv-description {
    grid-area: Description;
}

div > div.mv-description-2 {
    grid-area: Description2;
}

div > div.mv-description.full-description {
	grid-column: 2 / span 2;
	padding-inline: 5px;
	text-align: justify;
}

@media (max-width: 768px) {
    div > div.mv-description,
    div > div.mv-description-2 {
        font-size: 0.8rem;
    }
}

.mv-title {
    grid-area: Title;
    width: 100%;
    padding-top: 5px;
}

p {
    display: flex;
    align-items: center;
}

p.icon-description {
    margin: 0;
    overflow: auto;
}

.icon-description > img.icon-display {
    height: 1em;
    width: auto;
    margin-right: 8px;
}

.title-description {
    text-align: center;
}

h5.title-description.mv-title {
    margin: 0;
}

div.mapboxgl-ctrl > a.mapboxgl-ctrl-logo {
    display: none;
}

/* Map Legend CSS */

.mapboxgl-ctrl.mapboxgl-ctrl-group.legend {
    margin: 3px;
}

.mapboxgl-ctrl.mapboxgl-ctrl-group.legend {
    margin-bottom: 10px;
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-legend-control {
    width: 100%;
    background-color: crimson;
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-legend-control.hiding {
    padding-inline: 59px;
    border-radius: 4px;
}

.legend-items {
    background: white;
    padding: 6px;
    border-radius: 8px;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: fit-content;
}

.legend-items div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-items img {
    width: 35px;
    height: 35px;
}

.legend-toggle {
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 14px;
    padding: 0;
    border-radius: 3px;
}

.legend-items.hidden {
    display: none;
}

@media (max-width: 768px) {
    .mapboxgl-ctrl-icon.mapboxgl-ctrl-legend-control.hiding {
        padding-inline: 22px;
    }
    
    .mapboxgl-ctrl.mapboxgl-ctrl-group.legend {
        margin-bottom: 50px;
    }
    
   .legend-items {
        padding: 3px;
        font-size: 13px;
        gap: 1px;
    }
    
    .legend-items div {
        gap: 2px;
    }
    
    .legend-items img {
        width: 25px;
        height: 25px;
    }
    
    h5.title-description.mv-title {
        font-size: 1.05rem;
    }
}

/* Recenter button appereance */
.mapboxgl-ctrl-recenter {
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
}

/* Filter control appereance */

.filter-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 1002;
    display: none;
}

@media (max-width: 768px) {
    .filter-panel {
        width: 80%;
    }
}

.filter-panel.visible {
    display: block;
    transform: translateX(0);
}

.filter-panel h3 {
    margin-top: 0;
}

.filter-section {
    margin-bottom: 20px;
}

#applyFilterBtn {
    padding: 10px;
    background: #0077cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 5px;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group button {
    padding: 8px 12px;
    border: 1px solid #aaa;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
}

.btn-group button.active {
    background: #0077cc;
    color: white;
    border-color: #0077cc;
}






