/* Pins for the ward status map. See static/js/ward-map.js. */

/* The basemap is there for orientation only; the pins carry the meaning. */
.ward-basemap { filter: grayscale(.9) brightness(1.04) contrast(.92); }

.ward-pin-wrap { background: none; border: 0; }

.ward-pin {
    --pin: #8A9A8D;
    --pct: 0;
    --size: 40px;
    position: relative;
    width: var(--size);
    height: var(--size);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
    transition: transform .15s;
}
.leaflet-marker-icon:hover .ward-pin { transform: scale(1.12); }

/* The ring: the ward's colour, filled clockwise to the share collected. The
   unfilled part stays a pale wash of the same colour so a 10% ward and a 90%
   ward read at a glance. */
.ward-pin-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--pin) calc(var(--pct) * 1%), rgba(255, 255, 255, .55) 0);
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 2px #fff;
}
.ward-pin-face::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--pin);
}
.ward-pin-no {
    position: relative;
    color: #fff;
    font-weight: 700;
    font-size: calc(var(--size) * .42);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

/* Done: a small white tick at the shoulder, on top of the full ring. */
.ward-pin-tick {
    position: absolute;
    top: -3px; right: -3px;
    width: calc(var(--size) * .42);
    height: calc(var(--size) * .42);
    border-radius: 50%;
    background: #fff;
    color: var(--pin);
    display: grid; place-items: center;
    box-shadow: 0 0 0 1.5px var(--pin);
}
.ward-pin-tick svg { width: 70%; height: 70%; }

.ward-pin.is-partial .ward-pin-no { color: #1b1300; }
.ward-pin.is-no_round .ward-pin-face { background: rgba(255, 255, 255, .55); }
.ward-pin.is-no_round .ward-pin-face::before { background: #fff; border: 2px dashed #8A9A8D; inset: 3px; }
.ward-pin.is-no_round .ward-pin-no { color: #5a6a5d; }

.ward-pin-tail {
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: var(--pin);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.ward-pin.is-no_round .ward-pin-tail { background: #8A9A8D; }

.leaflet-popup-content { font-family: var(--dscc-font, inherit); margin: 10px 12px; }
.pop-ward { font-weight: 700; font-size: .95rem; }
.pop-zone { font-size: .75rem; color: #6a756c; }
.pop-fig  { font-variant-numeric: tabular-nums; margin-top: .35rem; font-size: .8125rem; }
