html {
    background: #FFFFFF;
}


.background {
    background: #FFFFFF;
}

.header {
    background: #E50914;
}


.logo-center {
    width: 50%;
    margin-top: 10%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #4087D1;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #37ff21;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "загрузка");
}


/* reset */
* {
    box-sizing: border-box;
}


.fixed {
    height: 0;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
}

/* keyframes */
@keyframes fidgetspin {
    0% {
        transform: scale(0.7) rotate(0);
    }
    100% {
        transform: scale(0.7) rotate(1440deg);
    }
}

@keyframes circlemzoom {
    0% {
        transform: scale(0.6);
    }
    50% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.6);
    }
}


@keyframes fidgetcolor1 {
    25% {
        border-color: #F08080;
    }
    50% {
        border-color: #40E0D0;
    }
    75% {
        border-color: #4682B4;
    }
    100% {
        border-color: #778899;
    }
}


/* container :: loader */
#loader {
    flex-direction: column;
    display: flex;
    place-content: normal;
    align-items: normal;
}

/* mask */
.loader-mask {
    background: #fafafa;
    z-index: 1000;
    opacity: 0;
}

/* loader open */
#loader[data-loadervisible="true"] {
    height: 100%;
    width: 100%;
}

#loader[data-loadervisible="true"] .loader-mask {
    height: 100%;
    width: 100%;
    transition: opacity 0.6s;
    opacity: 1;
}

/* fidget */
.loaderShadow { /* remove this if it cause performance issue */

    filter: drop-shadow(10px 10px 7px rgba(0, 0, 0, .2));
    position: relative;
    z-index: 1001;
}

.loader {
    height: 192px;
    width: 192px;
    z-index: 1001;
    position: relative;
    animation: fidgetspin 2s cubic-bezier(0.07, 1.21, 0.72, 0.46) infinite;
    border-color: #0af;
}

.circle {
    height: 64px;
    width: 64px;
    border: 7px solid #b0b0b0;
    border-radius: 50%;
    position: absolute;
}

.circle:before {
    content: "";
    width: 64px;
    height: 64px;
    position: absolute;
    top: 19px;
    transform: rotate(47deg);
    left: 50px;
    border-radius: 50%;
    box-shadow: -8px 35px 0 -8px #b0b0b0;
}

.circle:nth-child(2) {
    top: 7px;
    left: 64px;
}

.circle:nth-child(3) {
    top: 94px;
    left: 14px;
    transform: rotate(240deg);
}

.circle:nth-child(4) {
    top: 94px;
    left: 114px;
    transform: rotate(-240deg);
}

.circle span {
    height: 42px;
    width: 42px;
    position: absolute;
    top: 4px;
    left: 4px;
    border: 11px solid #b0b0b0;
    border-radius: 50%;
    animation: fidgetcolor1 8s cubic-bezier(0.07, 1.21, 0.72, 0.46) infinite;
}

.circleM {
    height: 54px;
    width: 54px;
    position: absolute;
    top: 69px;
    left: 69px;
    z-index: 1;
    background: #fafafa;
    border-radius: 50%;
}

.circleM span {
    height: 44px;
    width: 44px;
    background: #b0b0b0;
    border-radius: 50%;
    display: block;
    margin: 5px;
    animation: circlemzoom 2s cubic-bezier(1, 0.45, 0.47, 0.7) infinite;
}


.object-center {
    object-position: center top;
}

.object-cover {
    object-fit: scale-down;
    aspect-ratio: auto !important;
}


/*RussianMap*/

.leaflet-container {
    top: -30px !important;
    height: calc(100% + 30px) !important;
}


.region-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #1a53ff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: bold;
    color: #1a53ff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

.region-tooltip:before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a53ff transparent transparent transparent;
}

.russia-map-container {
    width: 100%;
    height: 90vh;
    min-height: 500px;
    /*max-height: 800px;*/
    background-color: #f0f8ff;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    /*padding-top: 20px;*/
    padding-left: 400px;
    cursor: pointer;
}

.chart-container {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    opacity: 0.85;
    width: 350px;
    height: 250px;
}

    .chart-container:hover {
        opacity: 1;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
        transform: scale(1.02);
    }

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: move;
    user-select: none;
}

    .chart-header h4 {
        margin: 0;
        color: #333;
        font-weight: 600;
        font-size: 14px;
    }

.close-btn {
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.close-btn:hover {
    background: rgba(0,0,0,0.1);
}
#top-errors-chart {
    flex-grow: 1;
    width: 100% !important;
    height: calc(100% - 30px) !important;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.chart-header h4 {
    margin: 0;
    color:#d1c8c8;
    font-weight: 900;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

#elevator-modes-chart-container {
    left: 20px;
    top: 20px;
    width: 350px;
    height: 250px;
}

#top-errors-chart-container {
    left: 20px;
    top: 340px;
    width: 350px;
    height: 250px;
}



#elevator-count-region {
    display: none;
}

.elevator-count-center {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    text-align: center;
    transition: all 0.3s ease;
    /*pointer-events: none;*/
    max-width: 90%;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.elevator-count-label {
    padding: 5px 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    color: #cccccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #d1e0ff;
    backdrop-filter: blur(4px);
    margin: 2px 0;
    white-space: nowrap;
    max-width: 100%;
    pointer-events: auto; /* Разрешаем события мыши */
    cursor: pointer;
}
.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    pointer-events: none; /* Чтобы клики проходили сквозь фон к контейнеру */
}

.leaflet-container {
    background: transparent !important;
}

.russia-map-container > * {
      cursor: default;
}
