/* css/nearby-places.css */

.nearby-places-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

#nearby-places-map {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.places-list-container {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
}

.places-list-container h3 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 1.2rem;
    font-weight: 600;
}

.places-list-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.place-item {
    padding: 12px;
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.place-item:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}

.place-item.active {
    background-color: #e3f2fd;
    border-color: #1976D2;
}

.place-info {
    flex: 1;
}

.place-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.place-address {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.place-description {
    margin-top: 4px;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.place-distance {
    font-size: 0.875rem;
    color: #888;
    white-space: nowrap;
    padding-left: 1rem;
    min-width: 70px;
    text-align: right;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 200px;
    font-size: 0.875rem;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-icon {
    margin-right: 8px;
}

/* New custom annotation styles */
.custom-annotation {
    background-color: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 250px;
}

.custom-annotation h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.custom-annotation p {
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.4;
}

.custom-annotation .category {
    color: #666;
    font-style: italic;
}

.custom-annotation .description {
    color: #444;
    margin: 8px 0;
}

.custom-annotation .distance {
    color: #888;
    font-size: 11px;
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 4px;
}

@media (max-width: 768px) {
    #nearby-places-map {
        height: 50vh;
        min-height: 300px;
    }

    .places-list-content {
        max-height: 300px;
    }

    .place-item {
        padding: 0.5rem;
    }

    .map-legend {
        max-width: 150px;
        padding: 8px;
        bottom: 10px;
        left: 10px;
    }
}

/* Category Filters */
.category-filters {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active {
    background: #e3f2fd;
    border-color: #1976D2;
    color: #1976D2;
}

.filter-icon {
    font-size: 1.1em;
}

/* Enhanced Annotation Styles */
.custom-annotation.detailed {
    min-width: 200px;
    max-width: 300px;
}

.annotation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.annotation-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.annotation-body {
    font-size: 0.875rem;
}

.annotation-body .category {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.annotation-body .description {
    margin: 0.5rem 0;
    line-height: 1.4;
    color: #444;
}

.address-info {
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.address-info p {
    margin: 0.25rem 0;
    color: #666;
}

.address-info .distance {
    font-size: 0.8rem;
    color: #888;
}

/* Animation for annotation appearance */
.custom-annotation {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update existing media queries */
@media (max-width: 768px) {
    .filter-buttons {
        gap: 0.25rem;
    }
    
    .filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .custom-annotation.detailed {
        max-width: 250px;
    }
}