/* ===========================================
   WEEDS MAP PRO - Complete CSS v1.9.1
   =========================================== */

.weeds-map-scope { 
    position: relative; 
}

.weeds-map-shell { 
    position: relative; 
}

/* Map container base */
#weeds-map {
    position: relative;
    z-index: 1;
}


/* Controls - ABOVE everything on map */
.weeds-map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #10b981;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
    max-width: 200px;
    backdrop-filter: blur(10px);
}

.weeds-locate-btn {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #10b981;
    color: #10b981;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
    transition: all 0.2s;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.weeds-locate-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.7);
    transform: translateY(-2px);
}

.weeds-locate-btn:disabled,
.weeds-locate-btn.busy {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MODAL STYLING (z-index: 100000) ===== */
.wmodal.fullscreen { 
    position: fixed; 
    inset: 0; 
    z-index: 100000; 
    display: none; 
    align-items: center; 
    justify-content: center;
}

/* Black animated overlay - sits BETWEEN map and modal */
.wmodal.fullscreen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    animation: overlayFadeIn 0.4s ease forwards;
    z-index: 1;
}

@keyframes overlayFadeIn {
    0% {
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
    }
    100% {
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(12px);
    }
}

.wmodal.fullscreen.active { 
    display: flex; 
}

.wmodal-inner { 
    background: #fff; 
    width: 90%; 
    max-width: 800px;
    height: 90%; 
    max-height: 650px;
    border-radius: 20px; 
    position: relative; 
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

@keyframes modalSlideUp {
    0% { 
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wmodal-close-btn { 
    position: absolute; 
    top: 16px; 
    right: 16px; 
    width: 40px; 
    height: 40px; 
    border: 0; 
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: #fff; 
    font-size: 24px; 
    line-height: 1;
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 100;
    transition: all 0.2s;
}

.wmodal-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.wmodal-body { 
    padding: 32px;
    height: 100%;
    overflow-y: auto;
}

/* Smooth scrollbar for modal */
.wmodal-body::-webkit-scrollbar {
    width: 8px;
}

.wmodal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.wmodal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.wmodal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== LEGEND STYLING ===== */
.weeds-map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
text-align: center;
margin-bottom: 10px;
}

.weeds-map-legend > div {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
    color: #6ee7b7;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-dot.hot { background: #10b981; }
.legend-dot.pro { background: #6ee7b7; }
.legend-dot.promo { background: #059669; }
.legend-dot.event { background: #34d399; }
.legend-dot.normal { background: #064e3b; }

/* ===== MARKER ICON STYLING (FIXED) ===== */
.wm-icon-wrap {
    position: relative;
}

.wm-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    border: 2px solid #fff;
}

.wm-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Vendor logo/image */
.wm-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Fallback dot when no image */
.wm-icon .marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    z-index: 1;
}

/* Pulsing ring animation */
.wm-icon .ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: pulse 2s infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.6; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 0.1; 
    }
}

.wm-icon.hot {
    background: #10b981;
    color: #fff;
}

.wm-icon.promo {
    background: #059669;
    color: #fff;
}

.wm-icon.pro {
    background: #6ee7b7;
    color: #000;
}

.wm-icon.event {
    background: #34d399;
    color: #000;
}

.wm-icon.normal {
    background: #064e3b;
    color: #6ee7b7;
}

/* When marker has image, hide the dot */
.wm-icon.has-image .marker-dot {
    display: none;
}

/* ===== POPUP STYLING ===== */
.wm-popup {
    min-width: 240px;
}

.wm-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.wm-popup .addr {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.wm-popup .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0 12px 0;
}

.wm-popup .desc {
    margin: 8px 0;
    font-size: 13px;
    color: #475569;
}

.wm-popup .balance {
    display: block;
    margin: 8px 0;
    font-size: 12px;
    color: #059669;
    font-weight: 600;
}

.wm-popup .vendor-avatar {
    display: block;
    margin: 0 auto 12px;
}

.wm-popup .actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

/* ===== BADGE STYLING ===== */
.wm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
    line-height: 1.2;
}

.wm-badge.hot {
    background: #10b981;
    color: #fff;
}

.wm-badge.promo {
    background: #059669;
    color: #fff;
}

.wm-badge.pro {
    background: #6ee7b7;
    color: #000;
}

.wm-badge.event {
    background: #34d399;
    color: #000;
}

.wm-badge.normal {
    background: #064e3b;
    color: #6ee7b7;
}

/* ===== BUTTON STYLING ===== */
.wm-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.wm-btn:hover {
    background: #059669;
}

.wm-btn.outline {
    border: 2px solid #10b981;
    color: #10b981;
}

.wm-btn.outline:hover {
    background: #10b981;
    color: #fff;
}

.wm-btn.ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.wm-btn.ghost:hover {
    background: #f1f5f9;
    color: #334155;
}

/* ===== TOAST NOTIFICATIONS ===== */
.weeds-toast {
    background: rgba(16, 185, 129, 0.95);
        color: #000;
        border: 2px solid #6ee7b7;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.weeds-toast.fade {
    opacity: 0;
}

/* ===== LEAFLET POPUP OVERRIDES ===== */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .weeds-map-legend {
        bottom: 80px;
        left: 10px;
        padding: 10px;
        font-size: 11px;
    }

    .weeds-map-legend h4 {
        font-size: 12px;
        margin-bottom: 15px;
margin-top: 5px;
    }

    .weeds-locate-btn {
        top: 10px;
        right: 8px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .wmodal-inner {
        width: 95%;
        height: 95%;
        max-height: none;
    }

    .wmodal-body {
        padding: 20px;
    }

    .wm-popup .actions {
        flex-direction: column;
    }

    .wm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
.weeds-map-legend > div {
    margin: 2px 0;
}
    .weeds-map-legend {
        font-size: 10px;
        padding: 8px;
	bottom: 80px;
    }

    .legend-dot {
        width: 10px;
        height: 10px;
        margin-right: 6px;
    }

    .wm-icon {
        width: 36px;
        height: 36px;
    }
}

/* ===== ACCESSIBILITY ===== */
.wm-btn:focus,
.weeds-locate-btn:focus,
.wmodal-close-btn:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .wm-icon,
    .wm-btn,
    .weeds-locate-btn,
    .wmodal-close-btn {
        transition: none;
    }

    .wm-icon .ring {
        animation: none;
    }

    .wmodal.fullscreen,
    .wmodal-inner {
        animation: none;
    }
}


.weeds-street-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(45deg, transparent 45%, rgba(16, 185, 129, 0.6) 50%, transparent 55%);
    background-size: 400% 400%;
    animation: shimmerMove 6s ease-in-out infinite;
    z-index: 450;
}

@keyframes shimmerMove {
    0% {
        background-position: 100% 0%;
    }

    100% {
        background-position: 0% 100%;
    }
}

.weeds-map-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #0a0a0a 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

#weeds-street-alive {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 400 !important;
    display: block !important;
    background: rgba(0, 0, 0, 0.4) !important;
}