/* Shared BASE pin-card appearance for every farmer entry and popup. */
.farmer-result {
    grid-template-columns: 42px 1fr;
    align-items: start;
    gap: 9px;
    padding: 10px;
    border-color: #d6e1da;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(22, 79, 59, .04);
}

.farmer-result:hover,
.farmer-result:focus {
    border-color: #18864d;
    box-shadow: 0 5px 14px rgba(22, 79, 59, .10);
}

.farmer-result b {
    margin-top: 4px;
    color: #17352c;
    font-size: 10px;
    line-height: 1.3;
}

.farmer-result small {
    margin-top: 3px;
    font-size: 8px;
}

.pin-card-copy { min-width: 0; }

.pin-card-badge {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #bfe2c8;
    border-radius: 8px;
    background: #e3f4e8;
    color: #08783d;
    text-align: center;
    font-size: 6px;
    line-height: 1.05;
    font-weight: 900;
}

.pin-card-role {
    display: inline-block !important;
    margin: 0 !important;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8f4ff;
    color: #1164b8 !important;
    font-size: 7px !important;
    font-weight: 800;
    line-height: 1.2;
}

.pin-card-coordinates {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #3f6a58 !important;
}

.pin-card-popup { padding: 2px; }

.pin-card-heading {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: start;
    gap: 9px;
}

.pin-card-popup img { margin-top: 10px; }
.pin-card-popup strong { margin-top: 4px; font-size: 12px; line-height: 1.25; }
.pin-card-popup small { margin-top: 4px; }
.pin-card-code { display: block; margin-top: 8px; color: #17633f; font-size: 9px; font-weight: 800; }
.pin-card-popup a { padding: 6px 9px; border-radius: 5px; background: #e3f4e8; font-size: 9px; }

/* Map hierarchy: compact red farmer pins and dominant branded organisation pins. */
.network-marker {
    position: relative;
    display: grid;
    place-items: center;
    color: #fff;
    filter: drop-shadow(0 5px 5px rgba(30, 25, 20, .35));
}

.network-marker.farmer-map-pin {
    width: 42px;
    height: 42px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #e12822;
}

.network-marker.farmer-map-pin span {
    transform: rotate(45deg);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.network-marker.organisation {
    width: 78px;
    height: 78px;
    border: 7px solid #146fd1;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #ffd31a;
    z-index: 5;
}

.network-marker.organisation::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #f8fbf7;
}

.network-marker.organisation .organisation-label {
    position: absolute;
    top: -25px;
    left: 28px;
    z-index: 3;
    min-width: 34px;
    padding: 4px 7px;
    border-radius: 999px;
    transform: rotate(45deg);
    background: #fff;
    color: #1164b8;
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 2px 5px rgba(0,0,0,.18);
}

.network-marker.organisation .organisation-logo-image {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transform: rotate(45deg);
    background-image: url('/farmer-map/brands/organisation-logo-sprite.png');
    background-repeat: no-repeat;
    background-size: 1920px 1080px;
    box-shadow: inset 0 0 0 1px rgba(19, 51, 38, .18);
}

.network-marker.organisation-sa .organisation-logo-image { background-position: -1548px -641px; }
.network-marker.organisation-ad .organisation-logo-image { background-position: -1032px -646px; }
.network-marker.organisation-hub .organisation-logo-image { background-position: -965px -476px; }

.network-marker.organisation-ad {
    border-color: #f27616;
    background: #fff;
}

.network-marker.organisation-ad .organisation-label { color: #c45200; }

.network-marker.organisation-sa {
    border-color: #7927d8;
    background: #ffd31a;
}

.network-marker.organisation-sa .organisation-label { color: #6c25c8; }

.network-marker.organisation-hub {
    border-color: #116bd0;
    background: #ffd31a;
}
