/*
    Шрифты
*/

/* cyrillic-ext */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans_ce.woff2) format('woff2');
    unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans_c.woff2) format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans_le.woff2) format('woff2');
    unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans_l.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

/*
    Общее
*/

html, body, #map {
    width: 100%; 
    height: 100%; 
    padding: 0; 
    margin: 0;
    font-family: 'Open Sans';
}

/*
    Боковая панель
*/

.drawer-content {
    min-height: 100vh;
    min-width: 210px;
    margin: 0;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.drawer-header {
    text-align: center;
    margin: 10px auto 20px;
}

.drawer-header img {
    width: 130px;
}

.drawer-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.drawer-buttons button {
    margin-top: 10px;
    text-align: left;
    font-size: 0.8em;
    height: 28px;
    background-color: rgb(255, 255, 255);
    border: 1.5px solid rgb(94, 179, 237);
    border-radius: 4px;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
}

.drawer-buttons button:hover {
    background-color: rgba(94, 179, 237, 0.4);
}

.drawer-buttons button:active {
    color: rgb(255, 255, 255);
    background-color: rgba(94, 179, 237, 0.8);
}

.drawer-buttons button[show="off"] {
    text-decoration: line-through;
    opacity: 0.5;
}

.drawer-footer {
    min-height: 150px;
    text-align: center;
}

.drawer-footer .charts {
    margin-bottom: 20px;
}

.drawer-footer .charts button {
    text-align: center;
    font-size: 0.9em;
    padding: 0px 15px;
    line-height: 36px;
    background-color: rgb(255, 255, 255);
    border: 1.5px solid rgb(94, 179, 237);
    border-radius: 4px;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.1));
}

.drawer-footer .charts button:hover {
    background-color: rgba(94, 179, 237, 0.4);
}

.drawer-footer .charts button:active {
    color: rgb(255, 255, 255);
    background-color: rgba(94, 179, 237, 0.8);
}

.drawer-footer .charts button img {
    height: 24px;
    width: 24px;
}

.drawer-footer .charts button:active img {
    filter: brightness(0) invert(100%);
}

.drawer-footer .total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 0.8em;
    margin-bottom: 20px;
}

.total div {
    width: 33%;
    padding: 0 3px;
    text-align: left;
}

.drawer-footer img {
    width: 20px;
    height: 20px;
    position: relative;
    top: 5px;
}

.drawer-footer span {
    margin-left: 5px;
}

.drawer-footer .copyright {
    font-size: 0.75em;
    line-height: 16px;
}

.drawer-footer .copyright a {
    color: rgb(40, 140, 200);
    text-decoration: none;
}

.drawer-footer .copyright .red {
    color: rgb(255, 0, 0);
    font-size: 1.2em;
}

/*
    Маркер на карте
*/

.icon-marker {
    position: absolute;
    left: -10px;
    top: -10px;
    background-color: rgb(94, 179, 237);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgb(255,255,255);
    direction: ltr;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
    z-index: 2;
}

.tooltip-container {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: -18px;
    left: 5px;
    transform: translateX(-5%) translateY(0);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-bottom-left-radius: 1000px;
    border-bottom-right-radius: 1000px;
    border-top-left-radius: 1000px;
    border-top-right-radius: 1000px;
    white-space: nowrap;
    transition: opacity 0.5s ease, transform 0.5s ease;
    font-size: 0.8em;
    line-height: 16px;
    z-index: 1;
}

#map[active-popup='false'] .ymaps3x0--marker:has(.icon-marker:hover) {
    z-index: 2!important;
}

#map[active-popup='false'] .ymaps3x0--marker:has(.icon-marker:hover) .tooltip-container {
    visibility: visible;
    opacity: 1;
    transform: translateX(0px) translateY(0);
}

/*
    Попап с информацией об объекте
*/

.popup {
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    font-weight: bold;
    max-width: 250px;
}

.popup-close {
    margin-left: auto;
    cursor: pointer;
    color: rgb(0, 0, 0);
    opacity: 0.4;
    font-size: 18px;
    text-decoration: none;
    background-color: transparent;
    border: none;
    padding: 0 0 5px 10px;
}

.popup-close:hover {
    opacity: 0.8;
}

.popup-content {
    padding: 5px 0;
    font-size: 0.8em;
    line-height: 1.5em;
}

.popup-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.8em;
    line-height: 1.2em;
    opacity: 0.7;
    max-width: 250px;
}

/*
    Кластер (объединение маркеров)
*/

.cluster-circle-content {
    position: absolute;
    background-color: rgb(40, 140, 200);
    border-radius: 50%;
    border: 2px solid rgb(255,255,255);
    direction: ltr;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
}
.circle-size-1 {
    left: -15px;
    top: -15px;
    width: 30px;
    height: 30px;
}
.circle-size-2 {
    left: -25px;
    top: -25px;
    width: 50px;
    height: 50px;
}

.circle-size-3 {
    left: -40px;
    top: -40px;
    width: 80px;
    height: 80px;
}


.cluster-circle-text {
    color: rgb(255,255,255);
    font-weight: bold;
    font-size: 0.9em;
    position: fixed;
    width: 100%;
    text-align: center;
    line-height: 30px;
}

.circle-size-2 .cluster-circle-text {
    font-size: 1.2em;
    line-height: 50px;
}

.circle-size-3 .cluster-circle-text {
    font-size: 1.6em;
    line-height: 80px;
}