.murmfed-map {
    width: 100%;
    min-height: 400px;
    --murmfed-accent: #2b7a78;
}

/* On wide screens, let the map use the available space instead of staying boxed inside the centred
   content column (these pages are full-width with no sidebar). The WRAPPER does the breakout: its
   negative side-margins expand it to the viewport width (independent of the column, so no
   breakpoint jumps and no feedback loop), and an inner padding keeps a small gutter. The MAP then
   simply centres inside it with `margin: auto`, capped — monotonic and stable.
   Two hard rules learned the hard way: (1) never put `transform`/`position` offsets on the Leaflet
   container — it breaks panning and resize redraw; (2) keep the column-relative math off the map
   element itself. The map only ever uses `margin: auto` + `max-width` here. */
/* Let the map use the available screen width. A full-width wrapper breaks it out of the centred
   content column; the map centres inside it with margin:auto, capped at 1600px. Deliberately NO
   media query, so the width is one smooth continuous function — min(100vw, 1600px): edge-to-edge on
   narrow screens, capped and centred on wide ones. A breakpoint here caused a visible size jump
   while resizing, and gated the full-width behaviour off on narrow displays. Verified across
   500–1800px: offset-from-centre = 0 and no horizontal overflow at every width.
   Two hard rules, learned the hard way:
   (1) Never put transform/position offsets on the Leaflet container — it breaks panning and the
       redraw on resize.
   (2) These no-sidebar pages need #left-area forced full width: Divi's higher-specificity sidebar
       rule (.et_right_sidebar #left-area) otherwise keeps a ~59px right gutter that makes the
       content box — and the breakout centred on it — sit ~30px off-centre. */
#left-area {
    width: 100% !important;
    padding-right: 0 !important;
}
.murmfed-map-wrap {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.murmfed-map-wrap .murmfed-map {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Divi draws a 1px vertical divider via `#main-content .container:before`, pinned at the
   sidebar boundary. The map pages run full-width with no sidebar, so it just floats across the
   content. Hide it — the same fix the profile pages use. This stylesheet only loads on pages
   that contain the map, so the rule stays scoped to them. */
#main-content .container:before {
    display: none !important;
}

.murmfed-map .leaflet-popup-content {
    margin: 13px 16px;
    font-size: 14px;
    line-height: 1.45;
}

.murmfed-popup {
    width: 216px;
    max-width: 100%;
}

/* Fixed-height box keeps every popup the same size whether it shows a logo or the
   letter placeholder, and never collapses when a broken image is removed. */
.murmfed-popup__media {
    position: relative;
    height: 120px;
    background: #f5f7f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* The logo overlays the letter placeholder and is opaque (its own background), so once it loads
   it fully hides the letter; until then (or forever, if the URL is dead) the letter shows. */
.murmfed-popup__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    background: #f5f7f5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.murmfed-popup__img.is-loaded {
    opacity: 1;
}

.murmfed-popup__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--murmfed-accent);
    opacity: 0.65;
}

.murmfed-popup__name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    color: #101828;
}

.murmfed-popup__loc {
    margin-top: 2px;
    font-size: 12.5px;
    color: #667085;
}

.murmfed-popup__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 9px;
}

.murmfed-popup__link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--murmfed-accent);
    text-decoration: none;
}

.murmfed-popup__link:hover {
    text-decoration: underline;
}

/* Accent-coloured teardrop pins (SVG uses currentColor, set from --murmfed-accent). */
.murmfed-map .murmfed-pin {
    color: var(--murmfed-accent);
    background: transparent;
    border: 0;
}

.murmfed-map .murmfed-pin svg {
    display: block;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
}

/* Circular pin head: the org logo when it loads, else the initial-letter placeholder (the
   same style as the directory cards and popups). The pin root is Leaflet-positioned, so the
   absolutely-positioned head sits over the pin's circular top. */
.murmfed-map .murmfed-pin__head {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f7f5;
    border: 2px solid #fff;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.murmfed-map .murmfed-pin__letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--murmfed-accent);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

/* Avatar image (members map). cover is right here: avatars are centred square photos that
   fill the circle cleanly. Opaque disc hides the letter while loading. */
.murmfed-map .murmfed-pin__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f5f7f5;
}


/* Cluster circles use the accent (overrides markercluster's default green/yellow/orange). */
.murmfed-map .marker-cluster-small,
.murmfed-map .marker-cluster-medium,
.murmfed-map .marker-cluster-large {
    background: color-mix(in srgb, var(--murmfed-accent), transparent 70%);
}

.murmfed-map .marker-cluster-small div,
.murmfed-map .marker-cluster-medium div,
.murmfed-map .marker-cluster-large div {
    background: var(--murmfed-accent);
    color: #fff;
    font-weight: 700;
}

.murmfed-node__fields {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
}

.murmfed-node__fields dt {
    font-weight: 600;
}

.murmfed-node__fields dd {
    margin: 0;
}
