/* TRADEL browse-map marker redesign. Loaded after browse-map.css. */

.custom-cluster-wrapper,
.custom-cluster-wrapper.leaflet-div-icon {
    background: transparent !important;
    border: 0 !important;
}

.custom-cluster {
    width: 100%;
    height: 100%;
    border: 1.5px solid #141914;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #e97b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 11px rgba(16, 24, 18, 0.18);
    transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.custom-cluster-wrapper:hover .custom-cluster {
    background: #e97b1b;
    color: #111;
    box-shadow: 0 5px 13px rgba(70, 37, 9, 0.22);
}

.listing-marker-icon {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    isolation: isolate;
}

.leaflet-marker-icon.listing-marker-icon--private {
    margin-left: -30px !important;
    margin-top: -30px !important;
}

.leaflet-marker-icon.listing-marker-icon--business {
    margin-left: -26px !important;
    margin-top: -44px !important;
}

.listing-marker-icon--has-label {
    z-index: 1000 !important;
}

.listing-marker-shell {
    --direction-fill: #ffffff;
    position: relative;
    width: 60px;
    height: 60px;
    overflow: visible;
    pointer-events: none;
    isolation: isolate;
}

.listing-marker-shell--business {
    --direction-fill: #b9d79b;
    width: 48px;
    height: 54px;
}

.listing-marker-shell--active,
.listing-marker-shell--related {
    --direction-fill: #e97b1b;
}

.listing-map-marker {
    --marker-fill: #ffffff;
    --marker-border: #151915;
    position: absolute;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--marker-fill);
    border: 1.5px solid var(--marker-border);
    box-shadow: 0 4px 10px rgba(16, 24, 18, 0.20);
    transition: box-shadow 0.14s ease, background-color 0.14s ease;
}

.listing-map-marker--private {
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.listing-map-marker--business {
    --marker-fill: #b9d79b;
    --marker-border: #ffffff;
    top: 3px;
    width: 34px;
    height: 38px;
    border-radius: 17px 17px 13px 13px;
    transform: translateX(-50%);
}

.listing-map-marker--business::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    z-index: -1;
    width: 12px;
    height: 12px;
    background: var(--marker-fill);
    border-right: 1.5px solid var(--marker-border);
    border-bottom: 1.5px solid var(--marker-border);
    border-radius: 0 0 3px 0;
    transform: translateX(-50%) rotate(45deg);
}

.listing-map-marker__icon {
    position: relative;
    z-index: 3;
    width: 21px;
    height: 21px;
    display: block;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
    transform: none !important;
    transition: none !important;
    user-select: none;
}

.listing-map-marker--business .listing-map-marker__icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    transform: translateY(-1px) !important;
}

.listing-marker-icon:hover .listing-map-marker {
    box-shadow: 0 5px 12px rgba(16, 24, 18, 0.23);
}

.listing-map-marker--active,
.listing-map-marker--related {
    --marker-fill: #e97b1b;
    --marker-border: #16120f;
}

.listing-map-marker--business.listing-map-marker--active,
.listing-map-marker--business.listing-map-marker--related {
    --marker-border: #ffffff;
}

.listing-map-marker--active {
    box-shadow:
        0 5px 13px rgba(89, 44, 8, 0.27),
        0 0 0 2px rgba(255, 255, 255, 0.70);
}

.listing-map-marker--related {
    box-shadow:
        0 4px 11px rgba(89, 44, 8, 0.23),
        0 0 0 1px rgba(255, 255, 255, 0.64);
}

.listing-marker-annotation {
    position: absolute;
    pointer-events: none;
}

.listing-marker-annotation--label {
    top: -8px;
    left: 50%;
    z-index: 30 !important;
    min-width: 29px;
    max-width: 96px;
    min-height: 19px;
    padding: 4px 8px 3px;
    overflow: hidden;
    border: 1px solid #151915;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: #151915;
    box-shadow: 0 3px 8px rgba(16, 24, 18, 0.16);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.045em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
}

.listing-marker-shell--active .listing-marker-annotation--label,
.listing-marker-shell--related .listing-marker-annotation--label {
    background: rgba(233, 123, 27, 0.98);
}

.listing-marker-annotation--direction {
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 18px;
    height: 20px;
    background: #151915;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform:
        translate(-50%, -50%)
        rotate(var(--marker-direction-angle))
        translateY(-19px);
    transform-origin: 50% 50%;
}

.listing-marker-annotation--direction::after {
    content: '';
    position: absolute;
    inset: 1.6px 1.8px 2px;
    background: var(--direction-fill);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.listing-location-connection,
.tradel-marker-connection-overlay {
    display: none !important;
}

.listing-singleton-cluster {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;
    width: 36px;
    height: 36px;
    border: 1.5px solid #141914;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #141914;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 11px rgba(16, 24, 18, 0.18);
}

body.map-zoom-world .listing-singleton-cluster,
body.map-zoom-continent .listing-singleton-cluster {
    display: flex;
}

body.map-zoom-world .listing-map-marker,
body.map-zoom-world .listing-marker-annotation,
body.map-zoom-continent .listing-map-marker,
body.map-zoom-continent .listing-marker-annotation {
    visibility: hidden;
}

@media (max-width: 700px) {
    .listing-map-marker--private {
        width: 38px;
        height: 38px;
    }

    .listing-marker-shell--business {
        width: 46px;
        height: 52px;
    }

    .listing-map-marker--business {
        width: 32px;
        height: 36px;
        border-radius: 16px 16px 12px 12px;
    }

    .listing-map-marker__icon {
        width: 20px;
        height: 20px;
    }

    .listing-map-marker--business .listing-map-marker__icon {
        width: 13px;
        height: 13px;
    }

    .listing-marker-annotation--direction {
        width: 17px;
        height: 19px;
        transform:
            translate(-50%, -50%)
            rotate(var(--marker-direction-angle))
            translateY(-18px);
    }
}
