body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Match navbar background color */
}

.header {
    padding: 10px;
    text-align: center;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent dark background */
    backdrop-filter: blur(10px); /* Glass effect */
    border-radius: 10px; /* Smooth rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Subtle shadow for a floating effect */
}

.leaflet-popup-content {
    margin: 8px 11px !important; /* top/bottom: 8px, left/right: 11px (only 3px difference) */
    line-height: 1.4;
    font-size: 13px;
}

#navbar {
    overflow: hidden;
    background-color: #708090;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Navbar links */
#navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px;
    text-decoration: none;
}

/* Page content */
.content {
    padding: 16px;
    font-size: 20px;
    border-radius: 10px;
    background-color: rgba(136, 136, 136, 0.5);
}

/* The sticky class is added to the navbar with JS when it reaches its scroll position */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}

/* Add some top padding to the page content to prevent sudden quick movement (as the navigation bar gets a new position at the top of the page (position:fixed and top:0) */
.sticky + .content {
    padding-top: 60px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#map {    
    height: calc(100vh - 56px); /* Adjust height to account for the navbar height */
    width: 100%;
    position: relative;
    background-color: #333;
}

#parks_count {
    width: 55px;
    margin-left: 20px;
    text-align: center;
}

select.form-select {
    font-size: -1;
}

.sidepanel {
    width: 400px; /* Set the width to 400px */
}

.sidepanel-content {
    font-size: 1rem;
    color: #39ff14; /* Neon green color for text */
}

.sidepanel-content h4 {
    margin-top: 0;
    margin-bottom: 0;
}

.sidepanel-content a {
    text-decoration: none;
    font-size: 1rem;
    color: #199900;
    transition: color 0.3s ease-in;
}

.sidepanel-content a:hover {
    color: #116600;
    text-decoration: underline;
}

.sidepanel-tab-content[data-tab-content="tab-2"] img {
    width: 100%; /* Make the image responsive */
    height: auto;
    display: block;
    margin: 0 auto; /* Center the image horizontally */
}

/* Updated button styling to accommodate vertical text */
.sidepanel-toggle-button {
    width: 40px !important;
    height: 200px !important; /* Increased height to fit "Legend & Park Info" text */
}

.sidepanel-toggle-container {
    width: 40px !important;
    height: 200px !important; /* Match button height */
    top: calc(50% - 100px) !important; /* Center vertically (half of 200px) */
}

.sidepanel-toggle-button .vertical-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    font-size: 12px;
    font-weight: bold;
    color: #4B5057;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}

.sidepanel-toggle-button::before {
    display: none !important;
}

.sidepanel.sidepanel-dark .sidepanel-toggle-button .vertical-text {
    color: #6D737C;
}

.glowing-marker {
    filter: drop-shadow(0 0 10px #8000ff) 
            drop-shadow(0 0 20px #8000ff) 
            drop-shadow(0 0 30px #8000ff);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    0% {
        filter: drop-shadow(0 0 10px #8000ff) 
                drop-shadow(0 0 20px #8000ff) 
                drop-shadow(0 0 30px #8000ff);
    }
    100% {
        filter: drop-shadow(0 0 15px #8000ff) 
                drop-shadow(0 0 25px #8000ff) 
                drop-shadow(0 0 40px #8000ff);
    }
}

/* ---------------------------------------------------
   SIDEPANEL TOGGLE VISIBILITY ENHANCEMENTS
   --------------------------------------------------- */

/* Add a subtle green accent border to the button to frame it */
.sidepanel-toggle-button {
    border: 1px solid rgba(57, 255, 20, 0.3) !important;
    transition: all 0.3s ease;
}

/* Upgrade the vertical text to be bright, larger, and glowing */
.sidepanel-toggle-button .vertical-text,
.sidepanel.sidepanel-dark .sidepanel-toggle-button .vertical-text {
    color: #39ff14 !important; /* Neon Green */
    font-size: 13px !important; /* Slightly larger */
    letter-spacing: 2px !important;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5); /* Subtle glow */
    animation: tab-breathe 2s ease-in-out infinite alternate !important; /* Breathing effect */
}

/* Eye-catching breathing animation */
@keyframes tab-breathe {
    0% { text-shadow: 0 0 2px rgba(57, 255, 20, 0.2); opacity: 0.7; }
    100% { text-shadow: 0 0 12px rgba(57, 255, 20, 0.9); opacity: 1; }
}

/* Make the button light up when hovered */
.sidepanel-toggle-button:hover,
.sidepanel.sidepanel-dark .sidepanel-toggle-button:hover {
    background-color: rgba(57, 255, 20, 0.15) !important;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4) inset;
    cursor: pointer;
}

/* Make the text turn pure white when hovered */
.sidepanel-toggle-button:hover .vertical-text,
.sidepanel.sidepanel-dark .sidepanel-toggle-button:hover .vertical-text {
    color: #ffffff !important;
    text-shadow: 0 0 12px #39ff14 !important;
    animation: none !important; /* Stop breathing on hover so it feels locked in */
}

/* ---------------------------------------------------
   SELECT2 DARK THEME OVERRIDES
   --------------------------------------------------- */
/* 1. Main container height and borders */
.select2-container--default .select2-selection--single {
    background-color: #212529 !important; 
    border: 1px solid #495057 !important;
    border-radius: 0.25rem !important;
    height: 38px !important; /* Match bootstrap navbar */
}

/* 2. The actual text inside the box */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f8f9fa !important;
    line-height: 36px !important; /* Container height minus 2px for borders perfectly centers vertically */
    text-align: center !important; /* Centers horizontally */
    padding-right: 24px !important; /* Room for the arrow */
    padding-left: 24px !important; /* Matches the right side so it centers mathematically */
}

/* 3. The dropdown arrow on the right */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* 4. Dropdown menu and search bar styling */
.select2-dropdown {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
}
.select2-search--dropdown .select2-search__field {
    background-color: #343a40 !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
    border-radius: 4px;
}
.select2-results__option {
    color: #f8f9fa !important;
}

/* 5. Neon Green hover effect for search results */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #39ff14 !important; 
    color: #000 !important;
    font-weight: bold;
}