/* Ensure the body and HTML take up the full view */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    text-align: center;
    z-index: 1000; /* Ensure header is above map elements if needed */
}

/* Map container must have a defined height */
#map {
    height: 100%; /* Fill the card container */
    width: 100%;
    z-index: 1; /* Keep map below popups/controls */
    min-height: 300px; /* Minimum height for usability */
}

/* Styles for the proximity buffer area */
.buffer-area {
    /* fill-color: #1f78b4; */
    color: #1f78b4;
    /* weight: 2; */
    opacity: 0.7;
    fill-opacity: 0.2;
}

/** Styles for search and listings titles **/
.search-title {
    font-weight: 500;
    font-style: monospace;
    color: #6b7280; /* neutral gray (Tailwind gray-500 range) */
    letter-spacing: 0.04em;
}


.listings-title {
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 15px;
}

/* Keep listing cards content-driven so collapse sections expand naturally */
#listings .card,
#user-buildings-list .card {
    height: auto;
}

/* Marker cluster styling */
.cluster-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.cluster-icon img {
    filter: brightness(0.9);
}

/* DivIcon cluster marker */
.cluster-marker {
    position: relative;
    width: 32px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cluster-marker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cluster-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* ==========================================================
   Demo App – Navbar Styles
   ========================================================== */

/* Navbar shell */
.demo-navbar {
    background-color: #f8f9fa; /* Bootstrap bg-light */
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Brand */
.demo-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #111827;
}

.demo-navbar .navbar-brand:hover,
.demo-navbar .navbar-brand:focus {
    color: #111827;
}

/* Base nav links */
.demo-navbar .nav-link {
    position: relative;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.demo-navbar .nav-link:hover,
.demo-navbar .nav-link:focus {
    color: #111827;
}

/* Subtle underline hover + active */
.demo-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #111827;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.demo-navbar .nav-link:hover::after,
.demo-navbar .nav-link.active::after {
    width: 60%;
}

.demo-navbar .nav-link.active {
    color: #111827;
}

/* ==========================================================
   CTA – Create Listing
   Targeted via href to avoid JS changes
   ========================================================== */

.demo-navbar .nav-link[href*="create"] {
    font-weight: 600;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

/* CTA hover */
.demo-navbar .nav-link[href*="create"]:hover,
.demo-navbar .nav-link[href*="create"]:focus {
    background-color: #111827;
    color: #ffffff;
    border-color: #111827;
}

/* Disable underline for CTA */
.demo-navbar .nav-link[href*="create"]::after {
    display: none;
}

/* ==========================================================
   Auth link hierarchy
   ========================================================== */

/* Register slightly stronger */
.demo-navbar .nav-link[href*="register"] {
    font-weight: 600;
}

/* Sign out slightly muted */
.demo-navbar .nav-link[href*="logout"] {
    color: rgba(0, 0, 0, 0.55);
}

.demo-navbar .nav-link[href*="logout"]:hover {
    color: #111827;
}

/* ==========================================================
   Mobile refinements
   ========================================================== */

@media (max-width: 991px) {
    .demo-navbar .navbar-nav {
        padding-top: 0.5rem;
    }

    .demo-navbar .nav-link {
        padding: 0.6rem 0;
    }

    .demo-navbar .nav-link[href*="create"] {
        margin: 0.5rem 0 0;
        width: fit-content;
    }

    /* In mobile view, adjust the container and map height */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* For mobile, set the map to a fixed but responsive height */
    #map {
        height: 400px;
        min-height: 400px;
    }

    /* Ensure cards don't overflow on mobile */
    .card {
        margin-bottom: 1rem;
    }

    /* Make listings container scrollable on mobile */
    #listings {
        max-height: 50vh !important;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    #map {
        height: 350px;
        min-height: 350px;
    }

    #listings {
        max-height: 40vh !important;
    }
}

/* Desktop/tablet refinements */
@media (min-width: 992px) {
    /* On larger screens, use full viewport minus navbar heights */
    #map {
        height: calc(100vh - 180px);
        min-height: 500px;
    }
}


