/* ── Member Map ────────────────────────────────────────────────── */
.fso-member-map-wrap {
    display: flex;
    height: 680px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* ── Sidebar ── */
.fso-map-sidebar {
    width: 336px;
    min-width: 336px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #f0f0f0;
    z-index: 10;
}

.fso-map-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f5f5f5;
    flex-shrink: 0;
}

.fso-map-current-state {
    font-family: 'Oswald', sans-serif;
    font-size: 26px;
    font-weight: 500;
    color: #040101;
    flex: 1;
    line-height: 1.1;
}

.fso-map-reset-state {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.fso-map-reset-state:hover {
    color: #CA3434;
}

/* ── Member list ── */
.fso-map-member-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 12px;
}

.fso-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #999;
    font-size: 14px;
    font-family: 'PT Sans', sans-serif;
}

.fso-map-member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background 0.15s;
}

.fso-map-member-card:last-child {
    border-bottom: none;
}

.fso-map-member-card:hover {
    opacity: 0.8;
}

.fso-map-member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e8e8e8;
    object-fit: cover;
    flex-shrink: 0;
}

.fso-map-member-info {
    flex: 1;
    min-width: 0;
}

.fso-map-member-name {
    font-family: 'PT Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #040101;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.fso-map-member-meta {
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    color: #4c4c4c;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
    margin-top: 2px;
}

.fso-map-member-meta-sep {
    width: 1px;
    height: 12px;
    background: #e6e6e6;
    flex-shrink: 0;
}

.fso-map-no-members {
    padding: 24px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-family: 'PT Sans', sans-serif;
}

.fso-map-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px 14px;
    flex-shrink: 0;
}

.fso-page-prev,
.fso-page-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    color: #4c4c4c;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.fso-page-prev:hover:not(:disabled),
.fso-page-next:hover:not(:disabled) {
    border-color: #CA3434;
    color: #CA3434;
}

.fso-page-prev:disabled,
.fso-page-next:disabled {
    opacity: 0.3;
    cursor: default;
}

.fso-page-info {
    font-family: 'PT Sans', sans-serif;
    font-size: 13px;
    color: #999;
    min-width: 40px;
    text-align: center;
}

/* ── Map main area ── */
.fso-map-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

.fso-map-title {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: #040101;
    padding: 16px 20px 10px;
    flex-shrink: 0;
}

#fso-leaflet-map {
    flex: 1;
    min-height: 0;
    z-index: 1;
}

/* ── Filters bar ── */
.fso-map-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid #e6e6e6;
    flex-shrink: 0;
}

.fso-map-filter-field {
    position: relative;
    display: flex;
    align-items: center;
}

.fso-filter-search {
    gap: 8px;
    flex: 1;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 0 10px;
    height: 40px;
}

.fso-filter-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'PT Sans', sans-serif;
    font-size: 15px;
    color: #4c4c4c;
}

.fso-filter-search input::placeholder {
    color: #bbb;
}

.fso-map-filter-field select {
    height: 40px;
    min-width: 160px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 0 28px 0 10px;
    font-family: 'PT Sans', sans-serif;
    font-size: 15px;
    color: #4c4c4c;
    background: #fff url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='-1 -1 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%234C4C4C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

.fso-map-filter-field label {
    position: absolute;
    bottom: -18px;
    left: 10px;
    font-size: 11px;
    color: #999;
    font-family: 'PT Sans', sans-serif;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Leaflet overrides ── */
.leaflet-container {
    background: #f6f6f6;
    font-family: 'PT Sans', sans-serif;
}

.leaflet-control-attribution {
    display: none !important;
}

/* Custom cluster marker */
.fso-cluster-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #CA3434;
    color: #fff;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(202, 52, 52, 0.4);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.fso-cluster-marker:hover,
.fso-cluster-marker.active {
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(202, 52, 52, 0.55);
}

/* Individual pin marker (zoomed in) */
.fso-pin-marker {
    width: 14px;
    height: 14px;
    background: #CA3434;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(202, 52, 52, 0.5);
    cursor: pointer;
    transition: transform 0.15s;
}

.fso-pin-marker:hover {
    transform: scale(1.3);
}

/* Leaflet popup */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.fso-popup-header {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #040101;
    padding: 12px 14px 8px;
    border-bottom: 1px solid #f5f5f5;
}

.fso-popup-member {
    display: flex;
    flex-direction: column;
    min-width: 220px;
}

.fso-popup-member-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
}

.fso-popup-member-header:hover {
    background: #fafafa;
}

.fso-popup-member-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fso-popup-member-name {
    font-size: 13px;
    font-family: 'PT Sans', sans-serif;
    color: #040101;
    font-weight: 600;
}

.fso-popup-member-city {
    font-size: 12px;
    font-family: 'PT Sans', sans-serif;
    color: #4c4c4c;
    margin-top: 2px;
}

.fso-popup-section {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.fso-popup-label {
    font-size: 10px;
    font-family: 'PT Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 5px;
}

.fso-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fso-popup-tags span {
    font-size: 11px;
    font-family: 'PT Sans', sans-serif;
    background: #f5f5f5;
    color: #333;
    border-radius: 3px;
    padding: 2px 7px;
    white-space: nowrap;
}

.fso-popup-contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
}

.fso-popup-contacts a {
    color: #CA3434;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.15s;
}

.fso-popup-contacts a:hover {
    opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    .fso-member-map-wrap {
        flex-direction: column;
        height: auto;
    }

    .fso-map-sidebar {
        width: 100%;
        min-width: unset;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    #fso-leaflet-map {
        height: 400px;
    }

    .fso-map-filters {
        flex-wrap: wrap;
    }

    .fso-filter-search {
        width: 100%;
    }
}
