/* =============================================
   City Map Elementor — Frontend Styles
   ============================================= */

/* ---- List Wrapper ---- */
.cme-list-wrap {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

/* ---- Search ---- */
.cme-search-wrap {
    padding: 14px 14px 10px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
}

.cme-search-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cme-search {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid #e0e0e0;
    border-radius: 30px;
    font-size: 13.5px;
    color: #444;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cme-search::placeholder { color: #bbb; }

/* ---- City List ---- */
.cme-city-list {
    overflow-y: auto;
    padding: 6px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: #e8e8e8 transparent;
}

.cme-city-list::-webkit-scrollbar { width: 4px; }
.cme-city-list::-webkit-scrollbar-thumb {
    background: #e8e8e8;
    border-radius: 4px;
}

/* ---- Each Item ---- */
.cme-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}

.cme-item:hover {
    background: #fff8e6;
    border-left-color: #f0a500;
}

.cme-item.cme-active {
    background: #fff3cc;
    border-left-color: #f0a500;
}

/* ---- Icon Box ---- */
.cme-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cme-item-icon i,
.cme-item-icon svg {
    font-size: 13px;
    width: 13px;
    height: 13px;
    color: #aaa;
    fill: #aaa;
    transition: color 0.15s, fill 0.15s;
}

.cme-item:hover .cme-item-icon {
    background: #f0a500;
}

.cme-item:hover .cme-item-icon i,
.cme-item:hover .cme-item-icon svg {
    color: #fff;
    fill: #fff;
}

.cme-item.cme-active .cme-item-icon {
    background: #f0a500;
}

.cme-item.cme-active .cme-item-icon i,
.cme-item.cme-active .cme-item-icon svg {
    color: #fff;
    fill: #fff;
}

/* ---- Label ---- */
.cme-item-label {
    font-size: 14px;
    color: #333;
    transition: color 0.15s;
    flex: 1;
    line-height: 1.3;
}

.cme-item.cme-active .cme-item-label {
    color: #c47d00;
    font-weight: 600;
}

/* ---- Map Container ---- */
.cme-map-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #e8eaf0;
}

.cme-map-container .leaflet-container {
    border-radius: 12px;
}

/* ---- Map Hint ---- */
.cme-map-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 13px;
    color: #666;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 2px 14px rgba(0,0,0,0.12);
    white-space: nowrap;
    transition: opacity 0.4s ease;
}

/* ---- Leaflet Popup Override ---- */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    font-family: 'DM Sans', 'Segoe UI', sans-serif !important;
}

.leaflet-popup-tip-container { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cme-city-list {
        max-height: 220px !important;
    }

    .cme-item {
        padding: 9px 14px;
    }

    .cme-item-label {
        font-size: 13px;
    }

    .cme-map-container .leaflet-container {
        min-height: 280px;
    }
}
