#pvmap-visitor-popup {
    --popup-petrol: #103f49;
    --popup-band: #145762;
    --popup-sage: #c3d6c7;
    --popup-outline: #88aaa8;
    position: fixed;
    z-index: 9996;
    bottom: 24px;
    left: 28px;
    width: 424px;
    max-width: calc(100% - 56px);
    max-height: calc(100dvh - 48px);
    padding: 17px 21px 18px;
    overflow: auto;
    box-sizing: border-box;
    border: 1px solid #397078;
    border-radius: 18px;
    background: var(--popup-petrol);
    color: #fff;
    box-shadow: 0 12px 28px #103f493b;
    font: 14px/1.4 Arial, system-ui, sans-serif;
}

#pvmap-visitor-popup[hidden] {
    display: none !important;
}

#pvmap-visitor-popup-title {
    margin: 0;
    padding-right: 23px;
    color: #fff;
    font: 700 23px/1.2 Arial, system-ui, sans-serif;
    letter-spacing: normal;
}

#pvmap-visitor-popup .pvmap-popup-description {
    margin: 8px 0 12px;
    color: #d4e6e1;
    font-size: 12.5px;
    line-height: 1.35;
}

#pvmap-visitor-popup .pvmap-popup-close {
    position: absolute;
    top: 4px;
    right: 5px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
}

#pvmap-visitor-popup .pvmap-popup-close:hover,
#pvmap-visitor-popup .pvmap-popup-actions a:not(.pvmap-popup-find):hover {
    background: var(--popup-band);
}

#pvmap-visitor-popup .pvmap-popup-close span {
    position: relative;
    width: 14px;
    height: 14px;
}

.pvmap-popup-close span::before,
.pvmap-popup-close span::after {
    position: absolute;
    top: 6px;
    left: 0;
    width: 14px;
    height: 1.6px;
    border-radius: 1px;
    background: currentColor;
    content: '';
    transform: rotate(45deg);
}

.pvmap-popup-close span::after {
    transform: rotate(-45deg);
}

#pvmap-visitor-popup .pvmap-popup-count {
    display: flex;
    align-items: center;
    min-height: 41px;
    padding: 6px 14px;
    gap: 9px;
    border-radius: 10px;
    background: var(--popup-band);
    color: #e3efeb;
    font-weight: 700;
}

#pvmap-visitor-popup .pvmap-popup-count strong {
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.pvmap-popup-building {
    position: relative;
    width: 12px;
    height: 15px;
    flex: 0 0 12px;
    border: 1px solid currentColor;
    border-radius: 2px;
}

.pvmap-popup-building::before,
.pvmap-popup-building::after {
    position: absolute;
    width: 2px;
    border-radius: 0.4px;
    background: currentColor;
    content: '';
}

.pvmap-popup-building::before {
    top: 3px;
    left: 2px;
    height: 2px;
    box-shadow: 4px 0 currentColor, 0 4px currentColor, 4px 4px currentColor;
}

.pvmap-popup-building::after {
    bottom: 0;
    left: 4px;
    height: 3px;
}

#pvmap-visitor-popup .pvmap-popup-actions {
    display: grid;
    grid-template-columns: minmax(0, 43fr) minmax(0, 55fr);
    gap: 8px;
    margin-top: 10px;
}

#pvmap-visitor-popup .pvmap-popup-actions a {
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid var(--popup-outline);
    border-radius: 11px;
    color: #fff;
    font: 700 13.5px/1.16 Arial, system-ui, sans-serif;
    text-align: center;
    text-decoration: none;
}

#pvmap-visitor-popup .pvmap-popup-actions .pvmap-popup-find {
    border-color: var(--popup-sage);
    background: var(--popup-sage);
    color: var(--popup-petrol);
}

#pvmap-visitor-popup .pvmap-popup-actions .pvmap-popup-find:hover {
    border-color: #adc9b7;
    background: #adc9b7;
}

#pvmap-visitor-popup :is(a, button):focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.pvmap-popup-search {
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.pvmap-popup-search::before,
.pvmap-popup-search::after {
    position: absolute;
    content: '';
}

.pvmap-popup-search::before {
    top: 0;
    left: 0;
    width: 11px;
    height: 11px;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.pvmap-popup-search::after {
    top: 9px;
    left: 9px;
    width: 8px;
    height: 1.7px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: 1px center;
}

@media (max-width: 600px) {
    #pvmap-visitor-popup {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        padding: 10px 13px calc(12px + env(safe-area-inset-bottom, 0px));
        border-radius: 16px 16px 0 0;
    }

    #pvmap-visitor-popup-title {
        padding-right: 30px;
        font-size: clamp(17px, 5.5vw, 20px);
    }

    #pvmap-visitor-popup .pvmap-popup-description {
        margin: 5px 0 8px;
        font-size: 11px;
    }

    #pvmap-visitor-popup .pvmap-popup-close {
        top: 0;
        right: 2px;
    }

    #pvmap-visitor-popup .pvmap-popup-count {
        min-height: 36px;
        padding: 5px 11px;
        gap: 7px;
        border-radius: 8px;
        font-size: 12.5px;
    }

    #pvmap-visitor-popup .pvmap-popup-count strong {
        font-size: 19px;
    }

    #pvmap-visitor-popup .pvmap-popup-actions {
        gap: 7px;
        margin-top: 8px;
    }

    #pvmap-visitor-popup .pvmap-popup-actions a {
        min-height: 44px;
        padding: 5px 4px;
        gap: 6px;
        border-radius: 9px;
        font-size: clamp(11px, 3.35vw, 13px);
    }

    #pvmap-visitor-popup :is(.pvmap-popup-close span, .pvmap-popup-search) {
        transform: scale(0.85);
    }
}
