﻿.connectStatsMap {
    touch-action: pan-y pinch-zoom;
    position: relative;

    --zoom-scale: 1;
}

.connectStatsMap .nbox-ab {
    position: relative;
}
.connectStatsMap .stmap {
    width: 1300px;
    height: 646px;
    position: relative;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.connectStatsMap.ready .stmap {
    opacity: 1;
}
.connectStatsMap .stmapA {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.connectStatsMap .stmapB {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.connectStatsMap .stmapA > img {
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.connectStatsMap .stmapA > img.map-main {
    width: 100%;
    height: 100%;
}
.connectStatsMap .stmapA > img.mapoverlay.map {
    position: absolute;
    left: -8%;
    top: -3.405573%;
    width: 115.615385%;
    height: 122.445820%;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
    opacity: 0.3;
    z-index: -1;
}
.connectStatsMap .stmapA > img.mapoverlay.red {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
    opacity: 1;
    z-index: -1;
    outline: calc(1px / var(--zoom-scale)) solid rgba(255, 0, 0, 0.5);
}
.connectStatsMap .stmapA > .stmap-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connectStatsMap .stscroll {
    padding: 5px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.connectStatsMap.ready .stscroll {
    opacity: 1;
}
.connectStatsMap.stscroll-hidden .stscroll {
    visibility: hidden;
    pointer-events: none;
}
.connectStatsMap .stscroll > .stbar {
    width: 100%;
    max-width: 210px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    margin: 0 auto;
    padding: 3px 4px;
}
.connectStatsMap .stscroll > .stbar > .in {
    position: relative;
    width: 100%;
    height: 2px;
}
.connectStatsMap .stscroll > .stbar > .in > button {
    border: 0 none;
    outline: 0 none;
    cursor: pointer;
    padding: 0;
    margin: 0;

    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}
.connectStatsMap .stscroll > .stbar > .in > button::before {
    content: "";
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: -3px;
    right: -3px;
    /* background-color: rgba(255, 255, 255, 0.5); */
}

.stm-country {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.stm-star {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
}

@media (pointer: coarse) {
    .stm-star::before {
        pointer-events: auto;
    }
    .stm-star::before,
    .stm-star::after {
        transform-origin: center;
    }
    .stm-star.v1::before,
    .stm-star.v1::after {
        transform: scale(1.2);
    }
    .stm-star.v2::before,
    .stm-star.v2::after {
        transform: scale(1.15);
    }
    .stm-star.v3::before,
    .stm-star.v3::after {
        transform: scale(1.1);
    }
}

.star-in-country {
    position: absolute;
    pointer-events: none;
    display: none !important;
}
.star-in-country.v1 {
    top: 10px;
    left: -17px;
}
.star-in-country.v2 {
    top: 11px;
    left: -17px;
}
.star-in-country.v3 {
    top: 10px;
    left: -18px;
}

.star-in-button {
    position: relative;
}

.star-in-button.v1::before,
.star-in-button.v1::after {
    margin-left: 12px;
    margin-top: 12px;
}
.star-in-button.v2::before,
.star-in-button.v2::after {
    margin-left: 12px;
    margin-top: 12px;
}
.star-in-button.v3::before,
.star-in-button.v3::after {
    margin-left: 8px;
    margin-top: 8px;
}

.stm-star.v1 {
    width: 6px;
    height: 6px;
    margin-left: -3px;
    margin-top: -3px;
}
.stm-star.v2 {
    width: 8px;
    height: 8px;
    margin-left: -4px;
    margin-top: -4px;
}
.stm-star.v3 {
    width: 15px;
    height: 15px;
    margin-left: -7px;
    margin-top: -7px;
    margin-left: -7.5px;
    margin-top: -7.5px;
}
.stm-star.v1::before,
.stm-star.v1::after {
    display: block;
    position: absolute;
    width: 43px;
    height: 43px;
    content: "";
    top: -18.5px;
    left: -18.5px;
    pointer-events: none;

    background-image: url('/theme/images/map/star-1x.png');
    background-repeat: no-repeat;
    background-size: 43px 43px;
    background-image: url('/theme/images/map/star-1x.svg');
}
.stm-star.v2::before,
.stm-star.v2::after {
    display: block;
    position: absolute;
    width: 56px;
    height: 55px;
    content: "";
    top: -24px;
    left: -24px;
    pointer-events: none;

    background-image: url('/theme/images/map/star-2x.png');
    background-repeat: no-repeat;
    background-size: 56px 55px;
    background-image: url('/theme/images/map/star-2x.svg');
}
.stm-star.v3::before,
.stm-star.v3::after {
    display: block;
    position: absolute;
    width: 61px;
    height: 61px;
    content: "";
    top: -23px;
    left: -23px;
    pointer-events: none;

    background-image: url('/theme/images/map/star-3x.png');
    background-repeat: no-repeat;
    background-size: 61px 61px;
    background-image: url('/theme/images/map/star-3x.svg');
}

.stm-star.v1::after,
.stm-star.v2::after,
.stm-star.v3::after {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.stm-star.v1::after {
    background-image: url('/theme/images/map/star-1xov.png');
}
.stm-star.v2::after {
    background-image: url('/theme/images/map/star-2xov.png');
}
.stm-star.v3::after {
    background-image: url('/theme/images/map/star-3xov.png');
}

.stm-star.v1:hover::after,
.stm-star.v2:hover::after,
.stm-star.v3:hover::after {
    opacity: 1;
}

.stmap-info {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 205px;
    width: 100%;
    background-color: #0072EB;
    border-radius: var(--box-radius);
    padding: 25px 15px 17px 16px;

    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    user-select: none;

    color: #FFFFFF;
    font-size: 0.875rem;
    line-height: 1.25rem;

    display: grid;
    grid-template-areas:
        'flag flag'
        'country country'
        'connections count1'
        'miracles count2';
}
.stmap-info.active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease;
    cursor: pointer;
}
.stmap-info > .flag {
    grid-area: flag;
    place-self: end end;
    margin-bottom: -4px;
}
.stmap-info > .country {
    grid-area: country;
    place-self: end end;
    font-size: 0.8125rem;
    margin-bottom: -1px;
    font-weight: 700;
    position: relative;
}
.stmap-info > .cc {
    grid-area: connections;
    place-self: end start;
}
.stmap-info > .c {
    grid-area: count1;
    place-self: end end;
    font-size: 0.8125rem;
    margin-bottom: -1px;
}
.stmap-info > .mm {
    grid-area: miracles;
    place-self: end start;
}
.stmap-info > .m {
    grid-area: count2;
    place-self: end end;
    font-size: 0.8125rem;
    margin-bottom: -1px;
}

