/* .wlf-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.wlf-popup-box {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    padding: 25px;
    position: relative;
}

.wlf-popup-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

.wlf-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wlf-location-item {
    text-align: center;
    cursor: pointer;
}

.wlf-location-item img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}
.wlf-clear-btn {
    background: #f44336;
    color: #fff;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 4px;
}
.wlf-location-item.active {
    border: 2px solid #2271b1;
    background: #f0f6ff;
    transform: scale(1.03);
}

.wlf-location-item.active span {
    font-weight: 600;
    color: #2271b1;
} */




/* Overlay */
.wlf-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-y: auto; /* Scroll if popup content taller than screen */
}

/* Popup Box */
.wlf-popup-box {
    background: #fff;
    width: 100%;
    max-width: 820px;
    min-width: 320px; /* small screens */
    max-height: 90vh; /* prevent vertical overflow */
    border-radius: 12px;
    padding: 22px;
    position: relative;

    overflow-y: auto; /* Scroll inside if content exceeds height */
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: wlfFadeUp 0.3s ease;
}

/* Smooth animation */
@keyframes wlfFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.wlf-popup-close {
    position: sticky;
    top: 0;
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #444;
    z-index: 10;
    line-height: 1;
}
.wlf-popup-close:hover {
    color: #000;
    transform: scale(1.1);
}

/* Header */
.wlf-popup-header {
    /* width: 80%; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    background: #fff;
    padding-bottom: 10px;
    z-index: 10;
}

/* Title */
.wlf-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Actions */
.wlf-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Grid */
.wlf-location-grid {
     display: grid;
    grid-template-columns: repeat(5,1fr);
    /* width: 80%; */
    list-style: none;
    padding: 0;
    margin: 0;
    
}

/* Location Card */
.wlf-location-item {
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #fafafa;
}
.wlf-location-item:hover {
    transform: translateY(-3px);
    background: #f2f6ff;
}

/* Image */
.wlf-location-item img {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

/* Label */
.wlf-location-item span {
    font-size: 14px;
    display: block;
}

/* Active */
.wlf-location-item.active {
    border: 2px solid #2271b1;
    background: #eef5ff;
    transform: scale(1.05);
}
.wlf-location-item.active span {
    font-weight: 600;
    color: #2271b1;
}

/* Clear Button */
.wlf-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f7fa;
    color: #444;
    border: 1px solid #dce1e8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.wlf-clear-btn:hover {
    background: #eef3ff;
    border-color: #2271b1;
    color: #2271b1;
    transform: translateY(-1px);
}
.wlf-clear-btn:active {
    transform: scale(0.97);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .wlf-popup-overlay {
    justify-content: unset;
    padding: 0px;
   
}

.wlf-popup-box {
    width: 80%;          /* 85% of viewport width */
    min-width: 320px;     /* optional: minimum width for small screens */
    max-height: 80vh;     /* max height 80% of viewport height */
    padding: 20px;        /* fixed padding, so width calculation is consistent */
    border-radius: 15px;
    margin: 0 10px 0 10px;
    overflow: hidden;     /* cut off anything beyond the box */
    box-sizing: border-box; /* include padding in width/height */
}
    .wlf-location-grid {
          display: grid;
        grid-template-columns: repeat(3,1fr);
    }

    .wlf-location-item img {
        width: 60px;
        height: 60px;
    }

    .wlf-popup-close {
        font-size: 30px;
        padding: 4px 8px;
    }

    .wlf-popup-title {
        font-size: 16px;
    }

    .wlf-popup-actions {
        gap: 5px;
    }

    .wlf-popup-header {
        gap: 4px;
    }
}
