@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

/* ── Wrapper ─────────────────────────────────────────────── */
.edm-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0d1117;
    border-radius: 4px;
    font-family: 'Barlow', sans-serif;
}

/* ── Map ─────────────────────────────────────────────────── */
#edm-map {
    width: 100%;
    height: 100%;
}

/* Dark tile override */
.edm-wrap .leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(1.1) saturate(0.3);
}

/* ── Pulse marker ────────────────────────────────────────── */
.edm-marker {
    position: relative;
    cursor: pointer;
}

.edm-marker-dot {
    width: 12px;
    height: 12px;
    background: #e8855a;
    border-radius: 50%;
    border: 2px solid rgba(232,133,90,0.4);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    transition: transform 0.2s, background 0.2s;
}

.edm-marker-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(232,133,90,0.5);
    animation: edm-pulse 2s ease-out infinite;
}

.edm-marker-ring2 {
    animation-delay: 0.7s;
}

.edm-marker:hover .edm-marker-dot,
.edm-marker.active .edm-marker-dot {
    background: #f5a07a;
    transform: translate(-50%,-50%) scale(1.4);
}

@keyframes edm-pulse {
    0%   { transform: translate(-50%,-50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(2.2); opacity: 0; }
}

/* ── Popup card ──────────────────────────────────────────── */
.edm-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 340px;
    background: rgba(22, 27, 34, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 28px 28px 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    animation: edm-fadein 0.22s ease;
}

@keyframes edm-fadein {
    from { opacity: 0; transform: translate(-50%,-50%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}

.edm-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    transition: color 0.15s;
}
.edm-popup-close:hover { color: #e8855a; }

/* Header */
.edm-popup-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.edm-popup-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(232,133,90,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8855a;
}

.edm-popup-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.1;
}

.edm-popup-city {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.edm-popup-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin-bottom: 16px;
}

/* Body rows */
.edm-popup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.edm-popup-row {
    display: flex;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.4;
}

.edm-popup-key {
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    min-width: 80px;
    font-weight: 500;
}

.edm-popup-val {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.edm-popup-val a {
    color: #e8855a;
    text-decoration: none;
}
.edm-popup-val a:hover { text-decoration: underline; }

/* CTA button */
.edm-popup-btn {
    display: block;
    text-align: center;
    background: #e8855a;
    color: #1a0f08;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 13px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.18s, transform 0.15s;
}
.edm-popup-btn:hover {
    background: #f5a07a;
    transform: translateY(-1px);
    color: #1a0f08;
}
.edm-popup-btn.edm-no-maps {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    pointer-events: none;
    cursor: default;
}

/* Leaflet attribution dark */
.edm-wrap .leaflet-control-attribution {
    background: rgba(0,0,0,0.5) !important;
    color: rgba(255,255,255,0.3) !important;
    font-size: 10px;
}
.edm-wrap .leaflet-control-attribution a { color: rgba(255,255,255,0.4) !important; }

/* Zoom controls dark */
.edm-wrap .leaflet-bar a {
    background: rgba(22,27,34,0.9) !important;
    color: rgba(255,255,255,0.6) !important;
    border-color: rgba(255,255,255,0.1) !important;
}
.edm-wrap .leaflet-bar a:hover {
    background: rgba(40,48,58,0.95) !important;
    color: #e8855a !important;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .edm-popup {
        width: calc(100vw - 32px);
        padding: 22px 20px 20px;
        top: auto;
        bottom: 16px;
        left: 16px;
        transform: none;
    }

    @keyframes edm-fadein {
        from { opacity: 0; transform: translateY(12px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}
