* {
    box-sizing: border-box;
}

:root {
    --yes: #ff030180;
    --no: #00520180;
    --abstain: #a4e7a5CC;
    --dnp: #d4f8d6CC;
}

body {
    margin: 0;
    padding: 0;

    width: 720px;
    height: 720px;

    display: flex;
    justify-content: center;

    overflow: hidden;

    font-family: 'Segoe UI', sans-serif;
}

.bw {
    filter: grayscale(100%);
}

/* =========================================
   MAP
========================================= */

#map {
    position: relative;

    width: 720px;
    height: 720px;
}

#map::after {
    content: '';

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(255, 227, 149, 0);

    z-index: 999;

    pointer-events: none;
}

/* =========================================
   HEADER
========================================= */

#header-container {
    position: absolute;

    top: 3vh;
    left: 3vh;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    z-index: 3000;
}

/* =========================================
   LOGO
========================================= */

#pushpins-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;

    width: 200px;

    overflow: visible;

    margin-bottom: 1vh;
    left: 3vh;
}

#pushpins-container img {
    display: block;

    width: 120px;

    opacity: 1;

    transform: rotate(0deg);
    transform-origin: center center;
}

/* =========================================
   TITLE + SUBTITLE
========================================= */

#header-text {
    display: flex;
    flex-direction: column;
}

#title-map {
    margin: 0;

    color: black;

    font-family: 'Segoe UI';
    font-size: 24px;
    font-weight: bold;
    line-height: 0.95;
}

#subtitle-map {
    margin-top: 1vh;

    width: 42vh;

    color: black;

    font-family: 'Segoe UI';
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================
   LEGEND
========================================= */

.layer-list {
    position: absolute;

    top: 22vh;
    left: 5vh;

    width: 30vh;

    z-index: 1000;
}

.legend-item {
    position: relative;

    margin-bottom: 0.5vh;
}

.layer-list-text {
    position: absolute;

    top: 0.1vh;
    left: 5vh;

    width: 30vh;

    color: black;

    font-family: 'Segoe UI';
    font-size: 12px;
}

/* =========================================
   POPUP
========================================= */

.maplibregl-popup {
    opacity: 1;
}

.maplibregl-popup-content {
    padding: 6px 12px;

    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;

    border-radius: 0 !important;
    box-shadow: none !important;

    white-space: nowrap;

    pointer-events: none;

    font-family: 'Segoe UI';
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.maplibregl-popup-close-button {
    color: white;
}

/* =========================================
   POPUP TRIANGLE
========================================= */

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
    border-top-color: rgba(0, 0, 0, 0.5) !important;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
    border-bottom-color: rgba(0, 0, 0, 0.5) !important;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: rgba(0, 0, 0, 0.5) !important;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: rgba(0, 0, 0, 0.5) !important;
}

/* =========================================
   SCALE BAR
========================================= */

.maplibregl-ctrl-scale {
    position: relative;

    height: 20px;
    padding: 0;

    margin-bottom: 2vh !important;
    margin-left: 3vh !important;

    background: transparent !important;

    border: none !important;
    border-bottom: 2px solid black !important;

    box-shadow: none !important;

    color: black;

    text-align: center;

    font-family: 'Segoe UI';
    font-size: 11px;
    line-height: 60px;
}

/* SCALE DIVISIONS */

.maplibregl-ctrl-scale::before {
    content: '';

    position: absolute;

    bottom: -2px;
    left: 0;

    width: 100%;
    height: 8px;

    background-image: linear-gradient(to right,
            black 0,
            black 2px,
            transparent 2px,
            transparent 20%);

    background-size: 20% 100%;
    background-repeat: repeat-x;
}

/* SCALE END DIVISION */

.maplibregl-ctrl-scale::after {
    content: '';

    position: absolute;

    right: 0;
    bottom: -2px;

    width: 2px;
    height: 8px;

    background: black;
}

/* =========================================
   PARTYLIST
========================================= */

.grid-section {
    position: absolute;

    top: 46vh;
    left: 10vh;

    width: 156px;

    z-index: 1000;
}

.partylist-title {
    margin-bottom: 1vh;

    color: rgb(85, 85, 85);

    text-align: center;

    font-family: 'Segoe UI';
    font-size: 16px;
    font-weight: bold;
}

.grid {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.cell {
    position: relative;

    display: flex;
    align-items: flex-end;

    width: 12px;
    height: 12px;
    padding: 5px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        filter 0.15s ease;
}

.cell.yes {
    background: var(--yes);
}

.cell.no {
    background: var(--no);
}

.cell.abstain {
    background: var(--abstain);
}

.cell.dnp {
    background: var(--dnp);
}

/* =========================================
   TOOLTIP
========================================= */

.tooltip {
    position: fixed;

    padding: 6px 12px;

    background: rgba(0, 0, 0, 0.5);
    color: white;

    white-space: nowrap;

    pointer-events: none;

    opacity: 0;

    z-index: 9999;

    transition: opacity 0.1s;

    font-family: 'Segoe UI';
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =========================================
   DIVIDER
========================================= */

.divider {
    width: 60px;
    height: 3px;

    margin: 1rem 0;

    background: var(--yes);
}