/* ── Layout ─────────────────────────────────────────────────────────── */

.module-project-map {
    background: #e7eaf9;
    padding: 20px;
}

#project-map-wrapper {
    position: relative;
}

.module-project-map .project-list-grid-wrapper {
    height: 100%;
}

.module-project-map .pm-map,
.module-project-map #map {
    height: 100%;
    min-height: 500px;
    position: relative;
}

/* ── Project list ───────────────────────────────────────────────────── */

.module-project-map .project-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: auto;
    transition: max-height 0.3s;
}

.module-project-map .project-item {
    text-decoration: none;
    font-style: normal;
    color: initial;
    background: white;
    padding: 10px;
}

.module-project-map .project-item.hidden {
    display: none;
}

.module-project-map .project-item img {
    max-width: 100%;
    aspect-ratio: 5/3;
}

.module-project-map .project-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    row-gap: 5px;
    color: #80849d;
}

.module-project-map .project-item-content .title {
    font-size: 1.4em;
    margin: 0.2em 0;
    text-transform: none;
    letter-spacing: 0;
    color: #00093b;
    line-height: 1.2;
}

.module-project-map .project-item-content .description {
    font-size: 0.85em;
    flex-grow: 2;
    margin: 0.3em 0 0.7em;
    line-height: 1.4;
}

.module-project-map .project-item-content a {
    display: block;
    padding-top: 12px;
    white-space: nowrap;
    color: #000e55;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 150ms;
    font-size: 0.78rem;
}

.module-project-map .project-item-content a:hover {
    color: #8598e3;
}

/* ── Type badge (shared between list items and map popups) ──────────── */

:root {
    --type-icon-size: 14px;
}

.module-project-map .address {
    margin: 0 0 5px;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8598e3;
    opacity: 0.65;
    display: flex;
    align-items: center;
    gap: 6px;
}

.module-project-map .view-toggler {
    border-radius: 4px;
}

.module-project-map .item-data .type,
.module-project-map .item-data .area,
.module-project-map .item-data .price-from,
.module-project-map .controls .type-toggler,
.module-project-map .view-toggler {
    background: #e7eaf9;
    display: flex;
    align-items: center;
    min-height: 25px;
    padding: 7px;
    margin: 0;
    border-radius: 2px;
    line-height: normal;
    font-family: avenir-lt-pro;
    border: none;
    outline: none;
}

.module-project-map .item-data .type::before,
.module-project-map .controls .type-toggler span,
.module-project-map .view-toggler span {
    width: 1.2rem;
    font-size: 12px;
    height: 1.2rem;
    background: #8598e3;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    color: #fff;
}

.module-project-map .view-toggler span {
    color: #000;
    background: none;
}

.module-project-map .project-item-content .icon-box {
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    display: grid;
    grid-template-columns: 22px 1fr;
}

.module-project-map .item-data[data-type="raekkehus"] .type::before {
    content: "R";
}
.module-project-map .item-data[data-type="ejerlejlighed"] .type::before {
    content: "L";
}
.module-project-map .item-data[data-type="villagrund"] .type::before {
    content: "B";
}
.module-project-map .item-data[data-type="faerdige_villaer"] .type::before {
    content: "V";
}

.module-project-map .item-data .fa-solid {
    width: var(--type-icon-size);
    margin-right: 6px;
    text-align: center;
}

/* ── Type filter controls ───────────────────────────────────────────── */

.module-project-map .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 99;
    transition:
        transform 0.4s,
        right 0.4s;
}

.module-project-map .controls .type-toggler {
    cursor: pointer;
}

.module-project-map .controls .type-toggler.disabled {
    filter: grayscale(0.8);
    color: #aaa;
}

.module-project-map .controls .type-toggler.disabled span {
    color: #eee;
}

/* ── View togglers (mobile only) ───────────────────────────────────── */

.module-project-map .pm-view-toggle {
    display: none;
    justify-content: center;
    column-gap: 25px;
    margin: 20px 0;
}

/* ── Cluster counter ────────────────────────────────────────────────── */

.module-project-map .cluster-counter {
    color: white;
    font-weight: 700;
    font-size: 23px;
}

/* ── Heading clearfix ───────────────────────────────────────────────── */

.module-project-map .heading::before,
.module-project-map .heading::after {
    content:'';
    clear: both;
    display: table;
}

/* ── Desktop (>= 1200px): two-column layout ─────────────────────────── */

@media screen and (min-width: 1200px) {
    .module-project-map {
        max-height: 1100px;
        height: 50vw;
    }

    #project-map-wrapper {
        height: 100%;
    }

    .module-project-map .project-list-grid-wrapper {
        display: flex;
        height: 100%;
    }

    .module-project-map .pm-panel {
        flex: 0 0 40%;
        max-width: 40%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding-right: 20px;
    }

    .module-project-map .pm-map {
        flex: 1;
    }

    .module-project-map .project-list {
        overflow-y: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-project-map .controls {
        position: absolute;
        top: 10px;
        right: 30px;
    }

    #project-map-wrapper.list-view .controls {
        right: 40px;
    }
}

/* ── Tablet (668px – 1199px) ────────────────────────────────────────── */

@media screen and (min-width: 668px) and (max-width: 1199px) {
    .module-project-map .controls {
        position: absolute;
        right: 30px;
    }

    #project-map-wrapper.list-view .controls {
        right: 40px;
    }
}

.mapboxgl-map {
    overflow: hidden;
    position: relative;
    -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
}

.mapboxgl-canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.mapboxgl-map:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

.mapboxgl-canary {
    background-color: salmon;
}

.mapboxgl-canvas-container.mapboxgl-interactive,
.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass {
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer {
    cursor: pointer;
}

.mapboxgl-canvas-container.mapboxgl-interactive:active,
.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active {
    cursor: grabbing;
}

.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas {
    touch-action: pan-x pan-y;
}

.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,
.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas {
    touch-action: pinch-zoom;
}

.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan
    .mapboxgl-canvas {
    touch-action: none;
}

.mapboxgl-ctrl-top-left,
.mapboxgl-ctrl-top-right,
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-top,
.mapboxgl-ctrl-right,
.mapboxgl-ctrl-bottom,
.mapboxgl-ctrl-left {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}
.mapboxgl-ctrl-top-left {
    top: 0;
    left: 0;
}
.mapboxgl-ctrl-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}
.mapboxgl-ctrl-top-right {
    top: 0;
    right: 0;
}
.mapboxgl-ctrl-right {
    top: 50%;
    transform: translateY(-50%);
    right: 0;
}
.mapboxgl-ctrl-bottom-right {
    right: 0;
    bottom: 0;
}
.mapboxgl-ctrl-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.mapboxgl-ctrl-bottom-left {
    bottom: 0;
    left: 0;
}
.mapboxgl-ctrl-left {
    top: 50%;
    transform: translateY(-50%);
    left: 0;
}

.mapboxgl-ctrl {
    clear: both;
    pointer-events: auto;

    /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */
    transform: translate(0, 0);
}
.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
    margin: 10px 0 0 10px;
    float: left;
}
.mapboxgl-ctrl-top .mapboxgl-ctrl {
    margin: 10px 0;
    float: left;
}
.mapboxgl-ctrl-top-right .mapboxgl-ctrl {
    margin: 10px 10px 0 0;
    float: right;
}
.mapboxgl-ctrl-right .mapboxgl-ctrl {
    margin: 0 10px 10px 0;
    float: right;
}
.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl {
    margin: 0 10px 10px 0;
    float: right;
}
.mapboxgl-ctrl-bottom .mapboxgl-ctrl {
    margin: 10px 0;
    float: left;
}
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
    margin: 0 0 10px 10px;
    float: left;
}
.mapboxgl-ctrl-left .mapboxgl-ctrl {
    margin: 0 0 10px 10px;
    float: left;
}

.mapboxgl-ctrl-group {
    border-radius: 4px;
    background: #fff;
}

.mapboxgl-ctrl-group:not(:empty) {
    box-shadow: 0 0 0 2px rgb(0 0 0 / 10%);
}

@media (-ms-high-contrast: active) {
    .mapboxgl-ctrl-group:not(:empty) {
        box-shadow: 0 0 0 2px ButtonText;
    }
}

.mapboxgl-ctrl-group button {
    width: 29px;
    height: 29px;
    display: block;
    padding: 0;
    outline: none;
    border: 0;
    box-sizing: border-box;
    background-color: transparent;
    cursor: pointer;
    overflow: hidden;
}

.mapboxgl-ctrl-group button + button {
    border-top: 1px solid #ddd;
}

.mapboxgl-ctrl button .mapboxgl-ctrl-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
}

@media (-ms-high-contrast: active) {
    .mapboxgl-ctrl-icon {
        background-color: transparent;
    }

    .mapboxgl-ctrl-group button + button {
        border-top: 1px solid ButtonText;
    }
}

.mapboxgl-ctrl-attrib-button:focus,
.mapboxgl-ctrl-group button:focus {
    box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);
}

.mapboxgl-ctrl button:disabled {
    cursor: not-allowed;
}

.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon {
    opacity: 0.25;
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:%23333333;' d='m 7,9 c -0.554,0 -1,0.446 -1,1 0,0.554 0.446,1 1,1 l 6,0 c 0.554,0 1,-0.446 1,-1 0,-0.554 -0.446,-1 -1,-1 z'/%3E %3C/svg%3E");
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:%23333333;' d='M 10 6 C 9.446 6 9 6.4459904 9 7 L 9 9 L 7 9 C 6.446 9 6 9.446 6 10 C 6 10.554 6.446 11 7 11 L 9 11 L 9 13 C 9 13.55401 9.446 14 10 14 C 10.554 14 11 13.55401 11 13 L 11 11 L 13 11 C 13.554 11 14 10.554 14 10 C 14 9.446 13.554 9 13 9 L 11 9 L 11 7 C 11 6.4459904 10.554 6 10 6 z'/%3E %3C/svg%3E");
}

.mapboxgl-ctrl-group .reset-button {
    --color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:none;stroke:%23fff;stroke-width:1.5;stroke-linecap:round;stroke-miterlimit:10;' d='M2.14,6.45c0.38-1.5,1.35-2.86,2.79-3.7c2.86-1.67,6.54-0.7,8.21,2.16s0.7,6.54-2.16,8.21 c-2.45,1.43-5.51,0.93-7.38-1.05'/%3E %3Cpath style='stroke:%23fff;fill:%23fff' d='M0.86,4.78L4.3,5.91c0.15,0.05,0.19,0.23,0.07,0.34L1.63,8.78C1.52,8.89,1.33,8.82,1.3,8.67L0.6,5.01 C0.57,4.86,0.72,4.73,0.86,4.78z'/%3E  %3C/svg%3E");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: 6px center;
    width: auto;
    padding: 0 10px 0 31px;
    background-color: #00093b;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: avenir-lt-pro;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

.mapboxgl-ctrl-group .reset-button:hover {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:none;stroke:%2300093b;stroke-width:1.5;stroke-linecap:round;stroke-miterlimit:10;' d='M2.14,6.45c0.38-1.5,1.35-2.86,2.79-3.7c2.86-1.67,6.54-0.7,8.21,2.16s0.7,6.54-2.16,8.21 c-2.45,1.43-5.51,0.93-7.38-1.05'/%3E %3Cpath style='stroke:%2300093b;fill:%2300093b' d='M0.86,4.78L4.3,5.91c0.15,0.05,0.19,0.23,0.07,0.34L1.63,8.78C1.52,8.89,1.33,8.82,1.3,8.67L0.6,5.01 C0.57,4.86,0.72,4.73,0.86,4.78z'/%3E  %3C/svg%3E");
    color: #00093b;
    border-color: #00093b;
    background-color: white;
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass > .mapboxgl-ctrl-compass-arrow {
    width: 20px;
    height: 20px;
    margin: 5px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpolygon fill='%23333333' points='6,9 10,1 14,9'/%3E %3Cpolygon fill='%23CCCCCC' points='6,11 10,19 14,11 '/%3E %3C/svg%3E");
    background-repeat: no-repeat;
    display: inline-block;
}

.mapboxgl-ctrl-group button:first-child {
    border-radius: 4px 4px 0 0;
}

.mapboxgl-ctrl-group button:last-child {
    border-radius: 0 0 4px 4px;
}

.mapboxgl-ctrl-group button:only-child {
    border-radius: inherit;
}

.mapboxgl-ctrl button:not(:disabled, .reset-button):hover {
    background-color: rgb(0 0 0 / 5%);
}

.mapboxgl-ctrl-group button:focus:focus-visible {
    box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);
}

.mapboxgl-ctrl-group button:focus:not(:focus-visible) {
    box-shadow: none;
}

.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate);
}

.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate-disabled);
}

.mapboxgl-ctrl
    button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active
    .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate-active);
}

.mapboxgl-ctrl
    button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error
    .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate-active-error);
}

.mapboxgl-ctrl
    button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background
    .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate-background);
}

.mapboxgl-ctrl
    button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error
    .mapboxgl-ctrl-icon {
    background-image: svg-inline(ctrl-geolocate-background-error);
}

.mapboxgl-ctrl
    button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting
    .mapboxgl-ctrl-icon {
    animation: mapboxgl-spin 2s infinite linear;
}

@media (-ms-high-contrast: active) {
    .mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-white);
    }

    .mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-disabled-white);
    }

    .mapboxgl-ctrl
        button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active
        .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-active);
    }

    .mapboxgl-ctrl
        button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error
        .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-active-error);
    }

    .mapboxgl-ctrl
        button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background
        .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-background);
    }

    .mapboxgl-ctrl
        button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error
        .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-background-error);
    }
}

@media (-ms-high-contrast: black-on-white) {
    .mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-black);
    }

    .mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon {
        background-image: svg-inline(ctrl-geolocate-disabled-black);
    }
}

@keyframes mapboxgl-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media screen {
    .mapboxgl-ctrl-attrib.mapboxgl-compact {
        min-height: 20px;
        padding: 0;
        margin: 10px;
        position: relative;
        background-color: #fff;
        border-radius: 3px 12px 12px 3px;
    }

    .mapboxgl-ctrl-attrib-inner a {
        font-size: 10px;
        font-style: normal;
        margin-left: 10px;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact:hover {
        padding: 2px 24px 2px 4px;
        visibility: visible;
        margin-top: 6px;
    }

    .mapboxgl-ctrl-top-left > .mapboxgl-ctrl-attrib.mapboxgl-compact:hover,
    .mapboxgl-ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact:hover {
        padding: 2px 4px 2px 24px;
        border-radius: 12px 3px 3px 12px;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner {
        display: none;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner {
        display: block;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact::after {
        content: "";
        cursor: pointer;
        position: absolute;
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='%23333333' fill-rule='evenodd' d='M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0'/%3E %3C/svg%3E");
        background-color: rgba(255, 255, 255, 0.5);
        width: 24px;
        height: 24px;
        box-sizing: border-box;
        border-radius: 12px;
    }

    .mapboxgl-ctrl-bottom-right
        > .mapboxgl-ctrl-attrib.mapboxgl-compact::after {
        bottom: 0;
        right: 0;
    }

    .mapboxgl-ctrl-top-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after {
        top: 0;
        right: 0;
    }

    .mapboxgl-ctrl-top-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after {
        top: 0;
        left: 0;
    }

    .mapboxgl-ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after {
        bottom: 0;
        left: 0;
    }
}

.mapboxgl-ctrl-attrib a {
    color: rgb(0 0 0 / 75%);
    text-decoration: none;
}

.mapboxgl-ctrl-attrib a:hover {
    color: inherit;
    text-decoration: underline;
}

/* stylelint-disable-next-line selector-class-pattern */
.mapboxgl-ctrl-attrib .mapbox-improve-map {
    font-weight: bold;
    margin-left: 2px;
}

.mapboxgl-attrib-empty {
    display: none;
}

.mapboxgl-ctrl-scale {
    background-color: rgb(255 255 255 / 75%);
    font-size: 10px;
    border-width: medium 2px 2px;
    border-style: none solid solid;
    border-color: #333;
    padding: 0 5px;
    color: #333;
    box-sizing: border-box;
    white-space: nowrap;
}

.mapboxgl-popup {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    will-change: transform;
    pointer-events: none;
    z-index: 999;
}

.mapboxgl-popup-anchor-top,
.mapboxgl-popup-anchor-top-left,
.mapboxgl-popup-anchor-top-right {
    flex-direction: column;
}

.mapboxgl-popup-anchor-bottom,
.mapboxgl-popup-anchor-bottom-left,
.mapboxgl-popup-anchor-bottom-right {
    flex-direction: column-reverse;
}

.mapboxgl-popup-anchor-left {
    flex-direction: row;
}

.mapboxgl-popup-anchor-right {
    flex-direction: row-reverse;
}

.mapboxgl-popup-tip {
    width: 0;
    height: 0;
    border: 10px solid transparent;
    z-index: 1;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    align-self: center;
    border-top: none;
    border-bottom-color: #fff;
}

.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip {
    align-self: flex-start;
    border-top: none;
    border-left: none;
    border-bottom-color: #fff;
}

.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    align-self: flex-end;
    border-top: none;
    border-right: none;
    border-bottom-color: #fff;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    align-self: center;
    border-bottom: none;
    border-top-color: #fff;
}

.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip {
    align-self: flex-start;
    border-bottom: none;
    border-left: none;
    border-top-color: #fff;
}

.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    align-self: flex-end;
    border-bottom: none;
    border-right: none;
    border-top-color: #fff;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    align-self: center;
    border-left: none;
    border-right-color: #fff;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    align-self: center;
    border-right: none;
    border-left-color: #fff;
}

.mapboxgl-popup-close-button {
    position: absolute;
    right: 0;
    top: 0;
    border: 0;
    border-radius: 0 3px 0 0;
    cursor: pointer;
    background-color: white;
    width: 28px;
    height: 28px;
    font-size: 24px;
}

.mapboxgl-popup-close-button:hover {
    color: #0f6879;
}

.mapboxgl-popup-content {
    position: relative;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
    padding: 10px 10px 15px;
    pointer-events: auto;
    max-width: 300px;
    font-size: 18px;
}

.mapboxgl-popup-content img {
    max-width: 100%;
}

.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content {
    border-top-left-radius: 0;
}

.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content {
    border-top-right-radius: 0;
}

.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content {
    border-bottom-left-radius: 0;
}

.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content {
    border-bottom-right-radius: 0;
}

.mapboxgl-popup-track-pointer {
    display: none;
}

.mapboxgl-popup-track-pointer * {
    pointer-events: none;
    user-select: none;
}

.mapboxgl-map:hover .mapboxgl-popup-track-pointer {
    display: flex;
}

.mapboxgl-map:active .mapboxgl-popup-track-pointer {
    display: none;
}

.mapboxgl-marker {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    opacity: 1;
    transition: opacity 0.2s;
}

.mapboxgl-user-location-dot {
    background-color: #1da1f2;
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.mapboxgl-crosshair,
.mapboxgl-crosshair .mapboxgl-interactive,
.mapboxgl-crosshair .mapboxgl-interactive:active {
    cursor: crosshair;
}

.mapboxgl-boxzoom {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: #fff;
    border: 2px dotted #202020;
    opacity: 0.5;
}

@media print {
    /* stylelint-disable-next-line selector-class-pattern */
    .mapbox-improve-map {
        display: none;
    }
}

.mapboxgl-touch-pan-blocker,
.mapboxgl-scroll-zoom-blocker {
    color: #fff;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
        sans-serif;
    justify-content: center;
    text-align: center;
    position: absolute;
    display: flex;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease-in-out;
    transition-delay: 1s;
}

.mapboxgl-touch-pan-blocker-show,
.mapboxgl-scroll-zoom-blocker-show {
    opacity: 1;
    transition: opacity 0.1s ease-in-out;
}

.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,
.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page
    .mapboxgl-canvas {
    touch-action: pan-x pan-y;
}

/* ── Mobile (< 1200px): stacked, view-toggled layout ────────────────── */

@media screen and (max-width: 1199px) {
    .module-project-map .pm-view-toggle {
        display: flex;
    }

    #project-map-wrapper.map-view #projects,
    #project-map-wrapper.list-view #map {
        display: none;
    }

    #project-map-wrapper.map-view .controls {
        top: 10px;
    }

    #project-map-wrapper.list-view .controls {
        transform: translateY(20px);
    }

    .module-project-map .project-list {
        padding-top: 70px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none !important;
    }

    .module-project-map {
        max-height: none !important;
    }

    .module-project-map .view-toggler {
        background: white;
    }

    .module-project-map .controls .type-toggler {
        background: #fff;
    }
}

@media screen and (max-width: 1599px) {
    .module-project-map .project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 668px) {
    .module-project-map .project-list {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        padding-top: 20px;
    }

    .module-project-map .controls {
        margin-bottom: 20px;
    }

    .module-project-map .controls .type-toggler {
        width: calc(50% - 5px);
    }

    .module-project-map {
        padding-bottom: 0;
    }

    #project-map-wrapper.list-view .controls {
        transform: none;
    }

    .module-project-map .project-item-content {
        row-gap: 3px;
    }

    .module-project-map .project-item-content .title {
        margin: 0.1em 0;
        font-size: 1.3em;
        line-height: 1.2;
    }

    .module-project-map .project-item-content .icon-box,
    .module-project-map .item-data .type {
        font-size: 0.75rem;
        padding: 5px 7px;
    }

    .mapboxgl-map {
        overflow: visible;
    }
}
