/* Mapbox-inspired Property Popup Styles */

/* Custom property marker styles */
.property-marker {
    background: #3B82F6;
    border: 3px solid white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
}

.property-marker:hover {
    transform: scale(1.1);
    background: #2563EB;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.property-marker.selected {
    background: #10B981;
    transform: scale(1.2);
    z-index: 1000;
}

/* Enhanced popup container */
.property-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 320px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.property-popup:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
}

/* Property image container */
.popup-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popup-image:hover {
    transform: scale(1.05);
}

/* Price badge */
.popup-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #059669;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Property type badge */
.popup-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Golf view indicator */
.popup-golf-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

/* Popup content */
.popup-content {
    padding: 16px;
}

.popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.popup-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.popup-location i {
    color: #EF4444;
    font-size: 12px;
}

/* Property details grid */
.popup-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
}

.popup-detail-item {
    text-align: center;
}

.popup-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
    display: block;
}

.popup-detail-label {
    font-size: 11px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Amenities list */
.popup-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.popup-amenity {
    background: #EBF8FF;
    color: #3182CE;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Action buttons */
.popup-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.popup-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.popup-btn-primary {
    background: #3B82F6;
    color: white;
}

.popup-btn-primary:hover {
    background: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.popup-btn-secondary {
    background: #F3F4F6;
    color: #4B5563;
}

.popup-btn-secondary:hover {
    background: #E5E7EB;
}

/* Sidebar property card enhancement */
.map-property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.map-property-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.map-property-card.active {
    border-color: #3B82F6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.map-property-card .card-image {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.map-property-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.map-property-card:hover .card-image img {
    transform: scale(1.05);
}

.map-property-card .card-content {
    padding: 12px;
}

.map-property-card .card-price {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 4px;
}

.map-property-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-property-card .card-details {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #6B7280;
}

.map-property-card .card-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.map-property-card .card-detail i {
    font-size: 12px;
}

/* Loading state for popup */
.popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6B7280;
}

.popup-loading i {
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-popup {
        max-width: 280px;
    }
    
    .popup-image-container {
        height: 140px;
    }
    
    .popup-title {
        font-size: 16px;
    }
    
    .popup-details {
        padding: 8px;
    }
}

/* Map hover effect */
.leaflet-marker-icon.property-marker-icon {
    transition: all 0.2s ease;
}

.leaflet-marker-icon.property-marker-icon:hover {
    z-index: 10000 !important;
}

/* Custom scrollbar for property list */
.property-list-container::-webkit-scrollbar {
    width: 6px;
}

.property-list-container::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.property-list-container::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 3px;
}

.property-list-container::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}