body.salesmap-modal-open {
    overflow: hidden;
}

.salesmap-container {
    width: 100%;
    position: relative;
    margin: 20px 0;
    z-index: 1;
}

#salesmap-public {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    z-index: 1;
    position: relative;
    transition: box-shadow 0.3s ease;
}

#salesmap-public.map-active {
    box-shadow: 0 0 0 4px #4CAF50;
}

.salesmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.salesmap-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.salesmap-overlay-message {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
    padding: 20px;
    user-select: none;
}

.leaflet-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
}

.leaflet-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.8);
}

.salesmap-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.salesmap-modal.show {
    opacity: 1;
}

.salesmap-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.salesmap-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
    padding: 0;
    width: 32px;
    height: 32px;
}

.salesmap-modal-close:hover,
.salesmap-modal-close:focus {
    color: #f0f0f0;
    outline: none;
}

.salesmap-modal-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.salesmap-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.salesmap-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.salesmap-property-section {
    margin-bottom: 40px;
}

.salesmap-property-section:last-child {
    margin-bottom: 0;
}

.salesmap-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.salesmap-section-title::before {
    content: '';
    display: none;
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-right: 12px;
    border-radius: 2px;
}

.salesmap-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.salesmap-property-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.salesmap-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.salesmap-property-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.salesmap-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.salesmap-property-info {
    padding: 15px;
}

.salesmap-property-type-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

.salesmap-property-type {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.salesmap-property-details {
    margin-bottom: 12px;
}

.salesmap-property-detail-price {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.salesmap-price-highlight {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.salesmap-property-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.salesmap-property-label {
    color: #666;
    font-weight: 500;
}

.salesmap-property-value {
    color: #333;
    font-weight: 600;
}

.salesmap-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.salesmap-badge-own {
    background-color: #2196f3;
    color: white;
}

@media screen and (max-width: 768px) {
    .salesmap-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .salesmap-modal-header {
        padding: 15px 20px;
    }

    .salesmap-modal-header h2 {
        font-size: 20px;
    }

    .salesmap-modal-body {
        padding: 20px 15px;
    }

    .salesmap-property-section {
        margin-bottom: 30px;
    }

    .salesmap-section-title {
        font-size: 18px;
    }

    .salesmap-section-title::before {
        width: 3px;
        height: 20px;
        margin-right: 10px;
    }

    .salesmap-properties-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .salesmap-property-image {
        height: 180px;
    }

    .salesmap-price-highlight {
        font-size: 18px;
    }

    .salesmap-modal-close {
        font-size: 28px;
        top: 12px;
        right: 15px;
    }

    #salesmap-public {
        height: 400px !important;
    }

    .salesmap-overlay-message {
        font-size: 16px;
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .salesmap-modal-content {
        margin: 5% auto;
        max-height: 90vh;
    }

    .salesmap-modal-header {
        padding: 12px 15px;
    }

    .salesmap-modal-header h2 {
        font-size: 18px;
    }

    .salesmap-modal-body {
        padding: 15px;
    }

    .salesmap-property-section {
        margin-bottom: 25px;
    }

    .salesmap-section-title {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .salesmap-section-title::before {
        width: 3px;
        height: 18px;
        margin-right: 8px;
    }

    .salesmap-property-detail {
        font-size: 13px;
    }

    .salesmap-price-highlight {
        font-size: 16px;
    }

    .salesmap-modal-close {
        font-size: 26px;
        top: 10px;
        right: 12px;
    }

    #salesmap-public {
        height: 350px !important;
    }

    .salesmap-overlay-message {
        font-size: 14px;
        padding: 12px;
    }
}

.leaflet-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    z-index: 1 !important;
}

.leaflet-control-zoom {
    z-index: 2 !important;
}

.leaflet-control-attribution {
    display: none !important;
}

#salesmap-public .leaflet-interactive {
    outline: none !important;
}

#salesmap-public path {
    outline: none !important;
}

#salesmap-public svg {
    outline: none !important;
}
