/**
 * Local Directory Map Styles - Modern Design
 */

/* Hero layout with side-by-side map */
.ld-hero-content-flex.ld-hero-with-map {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: flex-start;
}

.ld-hero-map-sidebar {
    position: sticky;
    top: 100px;
}

/* Modern map container */
.ld-business-map {
    position: relative;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 240px;
}

.ld-business-map.leaflet-container {
    width: 100% !important;
    height: 100% !important;
}
.ld-business-map.ld-map-compact {
    height: 280px !important;
    width: 100% !important;
}

/* Map tiles styling */
.ld-business-map .leaflet-container {
    background: #f9f9f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}


.ld-map-no-data {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.ld-map-info-text {
    margin-top: 10px;
    color: #555;
    text-align: center;
    font-size: 13px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    padding: 10px 14px;
}

.ld-map-no-data p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Leaflet popup customization - Modern style */
.ld-marker-popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0;
}

.ld-marker-popup .leaflet-popup-content {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ld-popup-content {
    padding: 16px;
    font-size: 14px;
}

.ld-popup-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 0;
}

.ld-popup-content h4 a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ld-popup-content h4 a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.ld-popup-rating {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ld-popup-rating .rating-stars {
    color: #f39c12;
    font-weight: 600;
    font-size: 14px;
}

.ld-popup-content p {
    margin: 8px 0;
    padding: 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.ld-popup-content p i {
    width: 16px;
    text-align: center;
    color: #0066cc;
    flex-shrink: 0;
    font-size: 12px;
}

.ld-popup-content p a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ld-popup-content p a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.ld-popup-link {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.ld-popup-link a.ld-view-details {
    display: inline-block;
    padding: 8px 14px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s ease;
    margin: 0;
    border: none;
    cursor: pointer;
}

.ld-popup-link a.ld-view-details:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Pin marker styling */
.ld-custom-marker-pin {
    width: 30px;
    height: 36px;
    background: linear-gradient(160deg, #1e90ff 0%, #0d6efd 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ld-custom-marker-dot {
    background: #fff;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.85;
}

.ld-custom-marker:hover .ld-custom-marker-pin {
    transform: rotate(-45deg) scale(1.12);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6);
}

.leaflet-marker-icon {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.leaflet-marker-shadow {
    display: none;
}

/* Popup tail */
.ld-marker-popup .leaflet-popup-tip {
    background: #ffffff;
    border: none;
}

/* Leaflet control styling */
.ld-business-map .leaflet-control-zoom {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.ld-business-map .leaflet-control-zoom a {
    background: #fff;
    color: #333;
    border: none;
    box-shadow: none;
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ld-business-map .leaflet-control-zoom a:hover {
    background: #0066cc;
    color: #fff;
}

.ld-business-map .leaflet-control-zoom a:first-child {
    border-radius: 8px 8px 0 0;
}

.ld-business-map .leaflet-control-zoom a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .ld-hero-content-flex.ld-hero-with-map {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ld-hero-map-sidebar {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    .ld-business-map {
        min-height: 350px;
    }

    .ld-business-map.ld-map-compact {
        height: 350px !important;
    }

    .ld-popup-content {
        padding: 12px;
    }

    .ld-popup-content h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .ld-popup-content p {
        font-size: 12px;
        margin: 6px 0;
    }

    .ld-marker-popup .leaflet-popup-content-wrapper {
        max-width: 250px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ld-marker-popup .leaflet-popup-content-wrapper {
        background: #2a2a2a;
        border-color: transparent;
        color: #ddd;
    }

    .ld-popup-content {
        color: #ddd;
    }

    .ld-popup-content h4 {
        color: #fff;
    }

    .ld-popup-content p {
        color: #bbb;
    }

    .ld-popup-content h4 a,
    .ld-popup-content p a {
        color: #5ba3ff;
    }

    .ld-popup-content h4 a:hover,
    .ld-popup-content p a:hover {
        color: #7cb3ff;
    }

    .ld-marker-popup .leaflet-popup-tip {
        background: #2a2a2a;
    }

    .ld-business-map .leaflet-control-zoom a {
        background: #3a3a3a;
        color: #ddd;
    }

    .ld-business-map .leaflet-control-zoom a:hover {
        background: #0066cc;
        color: #fff;
    }
}
