﻿.connectStatsMap {
    touch-action: pan-y;
    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 .stscrollspacer {
    height: 18px;
}
.connectStatsMap .stscroll {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    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: 160px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    margin: 0 auto;
    padding: 2px 3px;
    pointer-events: auto;
}
.connectStatsMap .stscroll > .stbar > .in {
    position: relative;
    width: 100%;
    height: 1px;
}
.connectStatsMap .stscroll > .stbar > .in > button {
    border: 0 none;
    outline: 0 none;
    cursor: pointer;
    padding: 0;
    margin: 0;

    width: 100%;
    height: 1px;
    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); */
}

/* Pārbauda, vai ekrāna pikseļu attiecība ir vismaz 2 (Retina, 4K u.c.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .connectStatsMap .stscroll > .stbar {
        height: 4px;
        padding: 1.75px 2.2px;
    }
    .connectStatsMap .stscroll > .stbar > .in,
    .connectStatsMap .stscroll > .stbar > .in > button {
        height: 0.5px;
    }
}

/* Ja vēlies atbalstīt arī ekrānus ar 3x attiecību (piemēram, jaunākos iPhone) */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .connectStatsMap .stscroll > .stbar {
        height: 4px;
        padding: 1.75px 2.2px;
    }
    .connectStatsMap .stscroll > .stbar > .in,
    .connectStatsMap .stscroll > .stbar > .in > button {
        height: 0.3333px;
    }
}

.connectStatsMap .stzoom {
    position: absolute;
    bottom: 0;
    left: calc(0px - min((max(100vw, 1340px) - 1340px) / 2, 120px));
    left: calc(0px - max(min((max(100vw, 1300px) - 1300px) / 2, 130px), 20px));
    width: 100vw;
    max-width: 1560px;
    /* border: 1px solid red; */

    padding: 0 30px;
    pointer-events: none;
}
.connectStatsMap .stzoom.stzoom-fixed {
    position: fixed;
    z-index: 20;
}
.connectStatsMap .stzoom > .currentzoom {
    position: absolute;
    bottom: 46px;
    right: 79px;
    width: auto;
    height: 20px;

    border: 0 none;
	outline: 0 none;
	background-color: transparent;

	font-size: 0.625rem !important;
	color: #868991;
	cursor: pointer;
    line-height: 2em;
    pointer-events: auto;

	padding: 0;
	margin: 0;
}
.connectStatsMap .stzoom > .currentzoom.is-default-zoom {
    display: none;
}
.connectStatsMap .stzoom > .btns {
    display: flex;
    width: 32px;
    margin: 0 0 0 auto;
    flex-direction: column;
    pointer-events: auto;
    padding-bottom: 40px;
}
.connectStatsMap .stzoom > .btns > button {
    display: block;
    width: 100%;
    height: 50%;

    border: 0 none;
	outline: 0 none;
	background-color: transparent;

	font-size: inherit;
	color: inherit;
	cursor: pointer;

	padding: 0;
	margin: 0;
}
.connectStatsMap .stzoom > .btns > button.inactive {
    cursor: default;
    opacity: 0.5;
}
.connectStatsMap .stzoom > .btns > button.zoom-in {
    width: 32px;
    height: 32px;
    background-image: url('/theme/images/map/zoombtn-plus2.png');
    background-repeat: no-repeat;
    background-size: 32px 32px;
    background-image: url('/theme/images/map/zoombtn-plus2.svg');
}
.connectStatsMap .stzoom > .btns > button.zoom-out {
    width: 32px;
    height: 32px;
    background-image: url('/theme/images/map/zoombtn-minus2.png');
    background-repeat: no-repeat;
    background-size: 22px 22px;
    background-position: 5px 5px;
    background-image: url('/theme/images/map/zoombtn-minus2.svg');
}
.connectStatsMap .stzoom > .btns > button.zoom-in:hover {
    background-image: url('/theme/images/map/zoombtn-plus-hover2.png');
    background-image: url('/theme/images/map/zoombtn-plus-hover2.svg');
}
.connectStatsMap .stzoom > .btns > button.zoom-out:hover {
    background-image: url('/theme/images/map/zoombtn-minus-hover2.png');
    background-image: url('/theme/images/map/zoombtn-minus-hover2.svg');
}

@media (max-width: 1560px) {
    .connectStatsMap .stzoom > .btns {
        margin-right: 12px;
    }
}
@media (max-width: 700px) {
    .connectStatsMap .stzoom > .btns {
        margin-right: -14px;
    }
    .connectStatsMap .stzoom > .currentzoom {
        right: 53px;
    }
}

.stm-country {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.stm-star {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
}

.connectStatsMap .stm-star,
.connectStatsMap .scrollbutton,
.connectStatsMap .zoom-in,
.connectStatsMap .zoom-out,
.connectStatsMap .zoom-reset {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* @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,
.star-in-country.v0 {
    top: 10px;
    left: -17px;
}
.star-in-country.v2 {
    top: 11px;
    left: -17px;
}
.star-in-country.v3 {
    top: 10px;
    left: -18px;
}

.isCalibrateArr2 {
    background-color: rgba(255, 0, 0, 0.5) !important;
}

.teststar {
    outline: 1px solid green;
}

.stm-star.v1,
.stm-star.v0 {
    --star-size: 7px;
    --star-offset: -4px;
    --ghost-offset: -29px;
    width: var(--star-size);
    height: var(--star-size);
    margin-left: var(--star-offset);
    margin-top: var(--star-offset);
}
.stm-star.v2 {
    --star-size: 9px;
    --star-offset: -5px;
    --ghost-offset: -28px;
    width: var(--star-size);
    height: var(--star-size);
    margin-left: var(--star-offset);
    margin-top: var(--star-offset);
}
.stm-star.v3 {
    --star-size: 15px;
    --star-offset: -8px;
    --ghost-offset: -25px;
    width: var(--star-size);
    height: var(--star-size);
    margin-left: var(--star-offset);
    margin-top: var(--star-offset);
}
.stm-star.v1::before,
.stm-star.v1::after,
.stm-star.v0::before,
.stm-star.v0::after,
.stm-star.v2::before,
.stm-star.v2::after,
.stm-star.v3::before,
.stm-star.v3::after {
    --ghost-size: 65px;
    display: block;
    position: absolute;
    width: var(--ghost-size);
    height: var(--ghost-size);
    content: "";
    top: var(--ghost-offset);
    left: var(--ghost-offset);
    pointer-events: none;

    background-repeat: no-repeat;
    background-size: var(--ghost-size) var(--ghost-size);
}
.stm-star.v1::before,
.stm-star.v0::before {
    background-image: url('/theme/images/map/star-1y.png');
    background-image: url('/theme/images/map/star-1y.svg');
}
.stm-star.v2::before {
    background-image: url('/theme/images/map/star-2y.png');
    background-image: url('/theme/images/map/star-2y.svg');
}
.stm-star.v3::before {
    background-image: url('/theme/images/map/star-3y.png');
    background-image: url('/theme/images/map/star-3y.svg');
}

.stm-star.v1::after,
.stm-star.v0::after {
    background-image: url('/theme/images/map/star-1yov.svg');
}
.stm-star.v2::after {
    background-image: url('/theme/images/map/star-2yov.svg');
}
.stm-star.v3::after {
    background-image: url('/theme/images/map/star-3yov.svg');
}

.stm-star.v1::after,
.stm-star.v0::after,
.stm-star.v2::after,
.stm-star.v3::after {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stm-star.v1:hover::after,
.stm-star.v0:hover::after,
.stm-star.v2:hover::after,
.stm-star.v3:hover::after {
    opacity: 1;
}

.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v1,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v0,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v2,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v3 {
    width: calc(var(--star-size) * var(--zoom-scale));
    height: calc(var(--star-size) * var(--zoom-scale));
    margin-left: calc(var(--star-offset) * var(--zoom-scale));
    margin-top: calc(var(--star-offset) * var(--zoom-scale));
}

.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v1::before,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v1::after,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v0::before,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v0::after,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v2::before,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v2::after,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v3::before,
.connectStatsMap.zoom-stars-with-map .stmap-stars .stm-star.v3::after {
    width: calc(var(--ghost-size) * var(--zoom-scale));
    height: calc(var(--ghost-size) * var(--zoom-scale));
    top: calc(var(--ghost-offset) * var(--zoom-scale));
    left: calc(var(--ghost-offset) * var(--zoom-scale));
    background-size: calc(var(--ghost-size) * var(--zoom-scale)) calc(var(--ghost-size) * var(--zoom-scale));
}

.stmap-info {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 204px;
    width: 100%;
    z-index: 30;
    background-color: rgba(24, 82, 152, 0.8);
    border-radius: var(--box-radius);
    padding: 18px 16px 20px 16px;

    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    user-select: none;

    color: #FFFFFF;
    font-size: 0.8125rem;
    line-height: 1rem;

    display: grid;
    grid-template-areas:
        'flag country country'
        'connections connections count1'
        'miracles miracles count2';
}
.stmap-info.stmap-info-tpl {
    display: none !important;
}
.stmap-info.stmap-info-tpl.testdesign {
    display: grid !important;
    opacity: 1 !important;
}
.stmap-info.iscity {
    grid-template-areas:
        'flag country country'
        'flag city city'
        'connections connections count1'
        'miracles miracles count2';
}
.stmap-info.active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease;
    cursor: pointer;
}
/* .stmap-info-close {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.65);
    font-size: 17px;
    line-height: 18px;
    text-align: center;
    border-radius: 3px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;

    display: none;
}
.stmap-info-close::before {
    content: '\00D7';
}
.stmap-info-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
} */
.stmap-info > .flag {
    grid-area: flag;
    place-self: start start;
    margin-top: 3px;
    margin-left: 1px;
}
.stmap-info > .country {
    grid-area: country;
    width: 140px;
    min-height: 52px;
    place-self: start end;
    font-size: 0.8125rem;
    text-align: right;
    padding-bottom: 20px;
    position: relative;
}
.stmap-info.iscity > .country {
    padding-bottom: 1px;
    min-height: auto;
}
.stmap-info > .city {
    display: none;
}
.stmap-info.iscity > .city {
    display: block;
    grid-area: city;
    width: 140px;
    place-self: start end;
    font-size: 0.875rem;
    line-height: 1.0625rem;
    font-weight: 700;
    text-align: right;
    padding-bottom: 18px;
    position: relative;
}
.stmap-info > .cc {
    grid-area: connections;
    place-self: end start;
    padding-bottom: 4px;
}
.stmap-info > .c {
    grid-area: count1;
    place-self: end end;
    font-size: 0.875rem;
    padding-bottom: 4px;
}
.stmap-info > .mm {
    grid-area: miracles;
    place-self: end start;
}
.stmap-info > .m {
    grid-area: count2;
    place-self: end end;
    font-size: 0.875rem;
}

