/**
 * CheveCasa Map Styles
 * Consistent styling for maps across all pages
 */

/* Base map container styling */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Property view map container */
.property-view-map {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    min-height: 300px;
}

/* Search map container */
.search-map {
    width: 100%;
    height: 65vh;
    min-height: 400px;
}

/* Location search container */
.location-search-container {
    position: relative;
    margin-bottom: 1rem;
    width: 100%;
}

#suggestionsList {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#suggestionsList .list-group-item {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

#suggestionsList .list-group-item:hover {
    background-color: #f8f9fa;
}

/* Ensure maps load properly */
.leaflet-container {
    background-color: #f8f8f8;
}

/* Property overlay styling */
.property-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 40vh;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1rem;
    border-top: 2px solid #61674f;
    box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.property-overlay.d-none {
    transform: translateY(100%);
}

.property-overlay.featured {
    border-top: 2px solid #FFD700;
}

/* Property content layout */
.property-content {
    display: flex;
    flex-direction: column;
}

/* Property image styling */
.property-image-container {
    width: 100%;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.property-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f5f5f5;
}

/* Property details section */
.property-details h5,
.property-details p {
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Close button styling */
.close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #f1f1f1;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    cursor: pointer;
}

.close-btn:hover {
    background-color: #e0e0e0;
}

.close-btn i {
    color: #555;
    font-size: 1rem;
}

/* Company logo styling */
.company-logo-container {
    height: 30px;
    width: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.company-logo-container img {
    max-height: 30px;
    max-width: 60px;
    object-fit: contain;
}

/* Marker cluster styling */
.marker-cluster-small {
    background-color: rgba(97, 103, 79, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(97, 103, 79, 0.8);
    color: white;
}
.marker-cluster-medium {
    background-color: rgba(97, 103, 79, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(97, 103, 79, 0.8);
    color: white;
}
.marker-cluster-large {
    background-color: rgba(97, 103, 79, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(97, 103, 79, 0.8);
    color: white;
}

/* Featured badge styling */
.featured-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #ffc107;
    color: #212529;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    vertical-align: middle;
}

/* Featured marker animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.featured-marker {
    animation: pulse 2s infinite;
}

/* Medium screens and up */
@media (min-width: 768px) {
    .property-overlay {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: 600px;
        border: 1px solid #ddd;
        border-radius: 0.5rem;
        bottom: 1.5rem;
    }

    .property-overlay.d-none {
        transform: translate(-50%, 150%);
    }

    .property-content {
        flex-direction: row;
        gap: 1rem;
    }

    .property-image-container {
        width: 150px;
        height: auto;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .property-details {
        flex: 1;
    }
}