/* Leaflet Custom Styles - Clean Professional Design */

/* Custom Price Marker */
.custom-price-marker {
    background: transparent !important;
    border: none !important;
    transition: transform 0.2s ease;
}

.custom-price-marker:hover {
    transform: scale(1.1);
    z-index: 2000 !important;
}

.price-marker-wrapper {
    position: relative;
    display: inline-block;
}

.price-marker-content {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    border: 3px solid white;
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.price-marker-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.price-marker-content::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #1d4ed8;
}

/* Simple Dot Marker (when zoomed out) */
.simple-dot-marker {
    background: transparent !important;
    border: none !important;
    transition: transform 0.2s ease;
}

.simple-dot-marker:hover {
    transform: scale(1.2);
    z-index: 2000 !important;
}

.simple-dot-marker-content {
    width: 12px;
    height: 12px;
    background-color: #2563eb;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.simple-dot-marker-content:hover {
    width: 14px;
    height: 14px;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.6);
}

/* Property Detail Marker - Fixed and Clean */
.property-marker {
    background: transparent !important;
    border: none !important;
    text-align: center;
}

.property-marker-pin {
    width: 40px;
    height: 40px;
    background-color: #2563eb;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 4px solid white;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.property-marker-pin::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #2563eb;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.property-marker-pin::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Property Edit Marker - Fixed and Clean */
.property-edit-marker {
    background: transparent !important;
    border: none !important;
    text-align: center;
}

.property-edit-marker-pin {
    width: 40px;
    height: 40px;
    background-color: #007bff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 4px solid white;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.property-edit-marker-pin::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #007bff;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.property-edit-marker-pin::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Clean Professional Popup */
.custom-property-popup.leaflet-popup {
    z-index: 1000 !important;
    position: absolute;
}

.custom-property-popup .leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
    border: none;
    background: white;
    width: 300px !important;
    z-index: 1000;
    position: relative;
}

.custom-property-popup .leaflet-popup-tip {
    z-index: 1001;
}

.custom-property-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: auto !important;
}

.custom-property-popup .leaflet-popup-tip {
    background: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Property Card - Clean Design */
.property-card {
    width: 300px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.property-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

.property-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

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

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

/* Image Placeholder */
.property-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    position: relative;
}

.placeholder-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.placeholder-icon-wrapper i {
    font-size: 28px;
    color: #6b7280;
}

.placeholder-pattern {
    display: none;
}

/* Price in Card Body */
.property-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    margin: 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.5px;
}

/* Card Body */
.property-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
}

.property-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-title a:hover {
    color: #2563eb;
}

.property-card-location {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-card-location i {
    color: #2563eb;
    font-size: 12px;
    flex-shrink: 0;
}

.property-card-location span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button */
.property-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    margin-top: 4px;
}

.property-card-btn,
.property-card-btn * {
    color: white !important;
}

.property-card-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.property-card-btn:hover,
.property-card-btn:hover * {
    color: white !important;
}

.property-card-btn i {
    font-size: 11px;
    color: white !important;
    transition: transform 0.3s ease;
}

.property-card-btn:hover i {
    transform: translateX(3px);
    color: white !important;
}

/* Marker Cluster */
.marker-cluster-container {
    background: transparent !important;
    border: none !important;
}

.marker-cluster {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    border: 3px solid white;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.marker-cluster:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.marker-cluster-small {
    width: 40px;
    height: 40px;
    font-size: 13px;
}

.marker-cluster-medium {
    width: 50px;
    height: 50px;
    font-size: 16px;
}

.marker-cluster-large {
    width: 60px;
    height: 60px;
    font-size: 18px;
}

/* Leaflet Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background-color: white !important;
    color: #333 !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    transition: all 0.2s;
    font-weight: 600;
}

.leaflet-control-zoom a:hover {
    background-color: #2563eb !important;
    color: white !important;
}

.leaflet-control-zoom-in {
    margin-bottom: 2px !important;
}

/* Popup Animation */
.custom-property-popup .leaflet-popup-content-wrapper {
    animation: popupFadeIn 0.3s ease-out;
}

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

/* Close Button */
.custom-property-popup .leaflet-popup-close-button {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    top: 8px;
    right: 8px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-property-popup .leaflet-popup-close-button:hover {
    background: #2563eb;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .property-card {
        width: 280px;
    }
    
    .property-card-image {
        height: 180px;
    }
    
    .property-card-body {
        padding: 14px;
    }
    
    .custom-property-popup .leaflet-popup-content-wrapper {
        width: 280px !important;
    }
    
    .price-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Map Container */
#map,
#map-prop-detail,
#map-edit-prop {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Legacy Support */
.property-popup {
    padding: 8px;
    text-align: center;
}

.property-popup strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.property-popup small {
    color: #666;
}

/* Nearby Places POI Markers */
.poi-marker {
    background: transparent !important;
    border: none !important;
    text-align: center;
}

.poi-marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.poi-marker-pin i {
    transform: rotate(45deg);
    color: white !important;
}

.poi-popup {
    padding: 8px;
    text-align: center;
}

.poi-popup strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 14px;
}

.poi-popup small {
    color: #666;
    font-size: 12px;
}

/* Nearby Places List Styles */
.nearby-places-list .nearby-place-item {
    transition: all 0.3s ease;
}

.nearby-places-list .nearby-place-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
