/* Map Styles for Golf Manors */

/* Map Container */
.golf-manors-map {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.golf-manors-map.full-height {
    height: 600px;
}

.golf-manors-map.large {
    height: 500px;
}

/* Custom Marker Styles */
.golf-course-marker {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.golf-course-marker:hover {
    transform: scale(1.1);
}

.property-marker {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.property-marker:hover {
    transform: scale(1.1);
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.map-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.popup-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.golf-course-popup .popup-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.property-popup .popup-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    padding-right: 8px;
}

.popup-rating {
    font-size: 12px;
    color: #fbbf24;
}

.popup-price {
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.popup-content {
    padding: 16px;
    background: white;
}

.popup-location {
    margin: 0 0 8px 0;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-location i {
    color: #16a34a;
}

.popup-detail {
    margin: 4px 0;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-detail i {
    color: #16a34a;
    width: 14px;
}

.popup-details {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    font-size: 13px;
    color: #6b7280;
}

.popup-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.popup-details i {
    color: #16a34a;
}

.popup-feature {
    margin: 8px 0 0 0;
    color: #16a34a;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-actions {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

.popup-btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    flex: 1;
}

.popup-btn-primary {
    background: #16a34a;
    color: white;
}

.popup-btn-primary:hover {
    background: #15803d;
    color: white;
    text-decoration: none;
}

.popup-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.popup-btn-secondary:hover {
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

/* Search Control Styles */
.leaflet-control-search {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    overflow: hidden;
}

.map-search-input {
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    width: 200px;
}

.map-search-input::placeholder {
    color: #9ca3af;
}

.map-search-btn {
    background: #16a34a;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-search-btn:hover {
    background: #15803d;
}

/* Cluster Styles */
.marker-cluster-small {
    background-color: rgba(22, 163, 74, 0.6);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.marker-cluster-small div {
    background-color: rgba(22, 163, 74, 0.8);
    border-radius: 50%;
    color: white;
}

.marker-cluster-medium {
    background-color: rgba(22, 163, 74, 0.6);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.marker-cluster-medium div {
    background-color: rgba(22, 163, 74, 0.8);
    border-radius: 50%;
    color: white;
}

.marker-cluster-large {
    background-color: rgba(22, 163, 74, 0.6);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.marker-cluster-large div {
    background-color: rgba(22, 163, 74, 0.8);
    border-radius: 50%;
    color: white;
}

/* Map Loading State */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f9fafb;
    color: #6b7280;
    font-size: 16px;
}

.map-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .leaflet-popup-content {
        width: 250px !important;
    }
    
    .map-search-input {
        width: 150px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-details {
        flex-direction: column;
        gap: 6px;
    }
}

/* Map Controls Positioning */
.leaflet-top.leaflet-right {
    top: 20px;
    right: 20px;
}

.leaflet-control-zoom {
    margin-bottom: 10px;
}

/* Custom Attribution */
.leaflet-control-attribution {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.9);
}

/* Map Legend */
.map-legend {
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 12px;
    max-width: 200px;
}

.map-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    color: #6b7280;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

.legend-marker.golf-course {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.legend-marker.property {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.legend-marker.golf-community {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.legend-marker.golf-destination {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Golf Community Marker */
.golf-community-marker {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.golf-community-marker:hover {
    transform: scale(1.1);
}

/* Golf Destination Marker */
.golf-destination-marker {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.golf-destination-marker:hover {
    transform: scale(1.1);
}

/* Golf Community Popup */
.golf-community-popup .popup-header {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Golf Destination Popup */
.golf-destination-popup .popup-header {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Additional popup styles */
.popup-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

.popup-status {
    margin-top: 8px;
    font-size: 12px;
    color: #16a34a;
    font-weight: 500;
}