.skyeti-member-map {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Ensure Leaflet container fills parent */
.skyeti-member-map .leaflet-container {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
}

@media (max-width: 767px) {
    .skyeti-member-map {
        height: 25vh !important;
        min-height: 25vh !important;
        max-height: 50vh !important;
        overflow: hidden !important;
        display: block !important;
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 0 !important;
    }
    
    .skyeti-member-map .leaflet-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        line-height: 1 !important;
    }
    
    /* Ensure Leaflet panes also fill container */
    .skyeti-member-map .leaflet-map-pane,
    .skyeti-member-map .leaflet-tile-pane,
    .skyeti-member-map .leaflet-overlay-pane,
    .skyeti-member-map .leaflet-shadow-pane,
    .skyeti-member-map .leaflet-marker-pane,
    .skyeti-member-map .leaflet-tooltip-pane,
    .skyeti-member-map .leaflet-popup-pane {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* Remove spacing from Leaflet controls */
    .skyeti-member-map .leaflet-control {
        margin: 0 !important;
    }
    
    /* Ensure tile images fill properly */
    .skyeti-member-map .leaflet-tile {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Loading indicator */
.skyeti-member-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: inherit;
}

.skyeti-member-map-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(90, 61, 107, 0.2);
    border-top-color: #5A3D6B;
    border-radius: 50%;
    animation: skyeti-map-spin 1s linear infinite;
    margin-bottom: 15px;
}

.skyeti-member-map-loading-text {
    color: #5A3D6B;
    font-size: 14px;
    font-weight: 500;
}

@keyframes skyeti-map-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ensure border-radius works with Leaflet map tiles */
.skyeti-member-map[style*="border-radius"] .leaflet-container,
.skyeti-member-map[style*="border-radius"] .leaflet-container .leaflet-tile-container img {
    border-radius: inherit;
}

/* Remove any default spacing from Leaflet elements */
.skyeti-member-map .leaflet-container * {
    box-sizing: border-box;
}

.skyeti-member-map .leaflet-tile-container,
.skyeti-member-map .leaflet-pane,
.skyeti-member-map .leaflet-map-pane,
.skyeti-member-map .leaflet-control-container,
.skyeti-member-map .leaflet-top,
.skyeti-member-map .leaflet-bottom,
.skyeti-member-map .leaflet-left,
.skyeti-member-map .leaflet-right {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure all Leaflet panes fill the container */
.skyeti-member-map .leaflet-map-pane canvas,
.skyeti-member-map .leaflet-map-pane svg,
.skyeti-member-map .leaflet-tile-pane,
.skyeti-member-map .leaflet-overlay-pane,
.skyeti-member-map .leaflet-shadow-pane,
.skyeti-member-map .leaflet-marker-pane,
.skyeti-member-map .leaflet-tooltip-pane,
.skyeti-member-map .leaflet-popup-pane {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.skyeti-member-div-icon {
    background: transparent;
    border: none;
}

.skyeti-member-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: #5A3D6B;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skyeti-member-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure SVG markers render crisp and sharp */
.leaflet-marker-icon img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* For SVG markers, use smooth rendering */
.leaflet-marker-icon[src$=".svg"],
.leaflet-marker-icon[src$=".svg"] img {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Default pointer marker with custom color for guest users */
.skyeti-pointer-div-icon {
    background: transparent;
    border: none;
}

.skyeti-pointer-marker {
    width: 25px;
    height: 41px;
    position: relative;
    cursor: default;
}

/* Pointer shape (pin/teardrop) */
.skyeti-pointer-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: #5A3D6B;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Pointer point (sharp bottom) */
.skyeti-pointer-marker::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #5A3D6B;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 0;
}

/* Legacy bone marker (kept for backward compatibility) */
.skyeti-member-marker--bone {
    width: 40px;
    height: 48px;
    border-radius: 50% 50% 50% 0;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: visible;
    background: #8B4BA8;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    position: relative;
}

.skyeti-member-marker--bone svg {
    transform: rotate(45deg);
    width: 24px;
    height: 10px;
    flex-shrink: 0;
}

.skyeti-member-div-icon--bone {
    background: transparent;
    border: none;
}

.skyeti-member-popup {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 220px;
}

.skyeti-member-popup__avatar {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.skyeti-member-popup__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.skyeti-member-popup__name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

.skyeti-member-popup__address {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.skyeti-member-popup__link {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    background: #5A3D6B;
    color: #fff !important;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.skyeti-member-popup__link:hover,
.skyeti-member-popup__link:focus {
    background: #452952;
    color: #fff;
}

.skyeti-member-profile__hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.skyeti-member-profile__content {
    padding-bottom: 40px;
}

.skyeti-member-profile__details {
    padding: 24px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.skyeti-member-profile__info {
    margin-bottom: 28px;
}

.skyeti-member-profile__info-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 600;
    color: #2a1e32;
}

.skyeti-member-profile__info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.skyeti-member-profile__info-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(90, 61, 107, 0.12);
}

.skyeti-member-profile__info-item:last-child {
    border-bottom: none;
}

.skyeti-member-profile__info-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #5a3d6b;
}

.skyeti-member-profile__info-value {
    flex: 1 1 auto;
    color: #2a1e32;
}

.skyeti-member-profile__map {
    margin-top: 32px;
}

.skyeti-member-profile__map-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #2a1e32;
}

.skyeti-member-profile__map-address {
    margin: 0 0 18px;
    color: #5a3d6b;
    font-weight: 500;
}

.skyeti-member-profile__map-empty {
    margin: 0;
    color: #666;
}

/* Marker cluster custom colors */
.marker-cluster {
    background-color: rgba(90, 61, 107, 0.4) !important;
}

.marker-cluster div {
    background-color: #5A3D6B !important;
    color: #fff;
}

.marker-cluster-small {
    background-color: rgba(90, 61, 107, 0.4) !important;
}

.marker-cluster-small div {
    background-color: #5A3D6B !important;
}

.marker-cluster-medium {
    background-color: rgba(90, 61, 107, 0.35) !important;
}

.marker-cluster-medium div {
    background-color: #5A3D6B !important;
}

.marker-cluster-large {
    background-color: rgba(90, 61, 107, 0.3) !important;
}

.marker-cluster-large div {
    background-color: #5A3D6B !important;
}

@media (max-width: 767px) {
    .skyeti-member-profile__details {
        padding: 20px;
    }

    .skyeti-member-profile__info-label {
        flex: 0 0 100%;
    }
}
