/* File: assets/css/map-search.css */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Prevent scrolling on the body */
    font-family: 'Jost', sans-serif;
}

.map-layout-container {
    display: flex;
    height: calc(100vh - 71px); /* Adjust 71px to your header's height */
}

#map-container {
    flex-grow: 1; /* Map takes up the remaining space */
    height: 100%;
}

#properties-sidebar {
    flex: 0 0 400px; /* Sidebar with a fixed width */
    height: 100%;
    background-color: #ffffff;
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #181616;
}

#sidebar-loader {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}
.loader-hidden {
    visibility: hidden;
}


#properties-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0.5rem;
}

.property-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 0.5rem;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}
.property-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.property-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.property-card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-card-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0B1B3C;
    margin: 0 0 0.3rem;
}

.property-card-address {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
    margin: 0 0 0.25rem;
}

.property-card-city {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0 0 0.75rem;
}

.property-card-details {
    font-size: 0.9em;
    color: #495057;
    margin: 0 0 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #dee2e6;
}

.property-card-button {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    background-color: #0B1B3C;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    display: block;
    text-align: center;
    margin-top: auto;
    transition: background-color 0.2s ease;
}
.property-card-button:hover {
    background-color: #1C2F5C;
}

.no-results, .error-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1.1rem;
}
.error-message {
    color: #dc3545;
}


/* Custom Map Marker */
.map-marker {
    width: 24px;
    height: 34px;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%230B1B3C%22%3E%3Cpath%20d%3D%22M12%202C8.13%202%205%205.13%205%209c0%204.75%205.9%2012.08%206.35%2012.57.22.27.53.43.85.43s.63-.16.85-.43C13.1%2021.08%2019%2013.75%2019%209c0-3.87-3.13-7-7-7zm0%209.5c-1.38%200-2.5-1.12-2.5-2.5S10.62%206.5%2012%206.5s2.5%201.12%202.5%202.5S13.38%2011.5%2012%2011.5z%22%2F%3E%3C%2Fsvg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* Custom Map Popup */
.mapboxgl-popup-content {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-family: 'Jost', sans-serif;
}
.map-popup {
    width: 250px;
}
.map-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}
.map-popup-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #0B1B3C;
    padding: 10px 12px 0;
}
.map-popup-address {
    font-size: 0.9em;
    color: #333;
    padding: 2px 12px 10px;
}
.map-popup a {
    display: block;
    background-color: #0B1B3C;
    color: white;
    text-decoration: none;
    padding: 8px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
}
