/**
 * Custom Map Styles
 * Additional styles for the map and related components
 */

/* Map container */
#map {
    height: 500px;
    width: 100%;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Loading indicator */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.map-loading-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map info window */
.map-info-window {
    min-width: 200px;
    max-width: 300px;
}

.map-info-window h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
}

.map-info-window .category-badge {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e5e5e5;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 8px;
}

.map-info-window .info-item {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.map-info-window .info-item i {
    margin-right: 8px;
    color: #4a89dc;
    width: 16px;
    text-align: center;
}

.map-info-window .info-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.map-info-window .directions-btn {
    display: inline-block;
    padding: 5px 10px;
    background-color: #4a89dc;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}

.map-info-window .directions-btn:hover {
    background-color: #3a79cc;
}

/* Location list */
.location-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.location-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.location-item:hover {
    background-color: #f5f5f5;
}

.location-item.selected {
    background-color: #e5f0ff;
    border-left: 3px solid #4a89dc;
}

.location-item h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.location-item p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.location-item .category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: #e5e5e5;
    font-size: 12px;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #999;
}

/* Map fallback content */
.map-error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.map-error-message {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 80%;
}

/* Loading state for UI elements */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #4a89dc;
    animation: spin 0.8s linear infinite;
} 