@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --FontSize1: 12px;
    --FontSize2: 13px;
    --FontSize3: 14px;
    --FontSize4: 15px;
    --FontSize5: 16px;
    --FontSize6: 22px;

    --C0: #9a77c9;
    --C1: #7c7c7c;
    --C2: #c5ba59;
    --C3: #a14a2e;
    --C4: #779953;
    --C5: #537299;
    --C6: #bb4444;
    --C7: #539974;
    --C8: #537299;
}

@media (prefers-color-scheme: light) {
    :root {
        /* PrimaryColor */
        --PrimaryColor: #28a55a;
        --PrimaryColor: #f2bd53;
        --PrimaryColorText: #2e2e2e;
        /* BGColor */
        --ColorThemes0: #fbfbfb;
        --ColorThemes1: #f3f3f3;
        --ColorThemes2: #dbdbd1;
        /* TextColor */
        --ColorThemes3: #313131;

        --ColorAnimation: linear-gradient(90deg, #f3f3f3, #efefef, #f3f3f3);

        --shadow-l1: 0px 2px 4px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);
        --border-radius: 15px;


        --CardAnimation: linear-gradient(to right, #fbfbfb 0%, #fbfbfb 30%, #d8d8d8 45%, #d8d8d8 50%, #fbfbfb 60%, #fbfbfb 100%);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        /* PrimaryColor */
        --PrimaryColor: #28a55a;
        --PrimaryColor: #cb9e44;
        --PrimaryColorText: #2e2e2e;
        /* BGColor */
        --ColorThemes0: #1c1c19;
        --ColorThemes1: #21221d;
        --ColorThemes2: #525151;
        /* TextColor */
        --ColorThemes3: #f3f3f3;

        --ColorAnimation: linear-gradient(90deg, #21221d, #242520, #21221d);

        --shadow-l1: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04);
        --border-radius: 15px;



        --CardAnimation: linear-gradient(to right, #1c1c19 0%, #1c1c19 30%, #252525 45%, #252525 50%, #1c1c19 60%, #1c1c19 100%);
    }
}

* {
    border: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    font-weight: 400;
    outline: none;
    -webkit-text-size-adjust: 100%;
}

*:disabled {
    opacity: 0.6 !important;
    cursor: no-drop !important;
}

@media (min-width: 800px) {
    * {
        scroll-snap-type: none !important;
    }
}

@media (pointer:fine) {
    ::-webkit-scrollbar {
        width: 7px;
        height: 7px;
        background-color: #f9f9fd;
        border-radius: var(--border-radius);
        background: 0;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--PrimaryColor);
        border-radius: var(--border-radius);
    }

    ::-webkit-scrollbar-track {
        background: 0;
        border: 0;
        border-radius: var(--border-radius);
        background-color: transparent;
        border: 0;
        margin-bottom: 10px;
        margin-top: 10px;
    }
}

a,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
    text-decoration: none;
    font-size: var(--FontSize3);
    font-weight: 700;
    cursor: pointer;
}

body {
    background-color: var(--ColorThemes2);
    color: var(--ColorThemes3);
    /* transition: .3s ease; */
}

/* Стили для анимации обновления страници свайпом */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    appearance: none;
    background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23F2BD53%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E);
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 0.65rem auto;
    font-size: var(--FontSize2);
}

details summary::-webkit-details-marker,
details summary::marker {
    display: none;
    content: "";
}

.hold-button {
    user-select: none;
}


.custom-checkbox {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-checkbox {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-checkbox+label {
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.custom-checkbox+label::before {
    content: '';
    display: inline-block;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    flex-grow: 0;
    border: 1px solid #adb5bd;
    border-radius: calc(var(--border-radius) - 5px);
    margin-right: 0.5em;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
}

.custom-checkbox:checked+label::before {
    border-color: var(--PrimaryColor);
    background-color: var(--PrimaryColor);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-checkbox:not(:disabled):not(:checked)+label:hover::before {
    border-color: var(--PrimaryColor);
}

.custom-checkbox:not(:disabled):active+label::before {
    background-color: var(--PrimaryColor);
    border-color: var(--PrimaryColor);
}

.custom-checkbox:focus:not(:checked)+label::before {
    border-color: var(--PrimaryColor);
}

.custom-checkbox:disabled+label::before {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: no-drop;
}



body.modal-open {
    overflow: hidden;
}

/* Банер з прохання встановлення PWA */
#blur-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    z-index: 9998;
}

.pwa-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pwa-overlay>.popup {
    background: var(--ColorThemes0);
    padding: 24px 32px;
    border-radius: var(--border-radius);
    max-width: 90%;
    width: 320px;
    text-align: center;
    font-family: sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pwa-overlay>.popup h2 {
    margin-bottom: 12px;
    color: var(--ColorThemes3);
    opacity: 0.8;
}

.pwa-overlay>.popup p {
    margin-bottom: 10px;
    color: var(--ColorThemes3);
    opacity: 0.6;
}

.pwa-overlay>.popup ol {
    text-align: justify;
    font-size: var(--FontSize4);
    margin-bottom: 10px;
    max-width: 290px;
}

.pwa-overlay>.popup li {
    list-style-type: none;
    font-size: var(--FontSize3);
}

.pwa-overlay>.popup li span {
    vertical-align: middle;
    display: inline-block;
    width: 22px;
    height: 22px;
}

.pwa-overlay>.popup li span svg {
    fill: var(--PrimaryColor);
}

.pwa-overlay>.popup>div {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pwa-overlay>.popup>div>button {
    padding: 8px 16px;
    border: none;
    border-radius: calc(var(--border-radius) - 8px);
    cursor: pointer;
    font-size: var(--FontSize3);
}

#pwa-install-button {
    background-color: var(--PrimaryColor);
    color: var(--PrimaryColorText);
}

#pwa-close-button,
#pwa-ios-close-button {
    background-color: #ccc;
    color: #333;
}

.pwa-hidden {
    display: none;
}

@media (max-width: 450px) {
    .pwa-overlay>.popup {
        padding: 17px 10px;
    }

    .pwa-overlay>.popup h2 {
        font-size: 22px;
    }

    .pwa-overlay>.popup p {
        font-size: var(--FontSize4);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}




#swipe_updater {
    position: absolute;
    top: 0px;
    width: 100%;
}

#swipe_block {
    width: calc(100% - 252px);
    margin-left: 252px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

#swipe_icon {
    width: 20px;
    fill: var(--ColorThemes3);
    transform: rotate(0deg);
    position: absolute;
    margin-top: -45px;
    top: -45px;
    background: var(--ColorThemes2);
    border: 2px solid var(--ColorThemes3);
    border-radius: 50%;
    padding: 10px;
    display: flex;
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height 0ms 400ms, opacity 400ms 0ms;
}

#swipe_icon[data-state="active"] {
    height: 20px;
    opacity: 1;
    transition: height 0ms 0ms, opacity 400ms 0ms;
}

@media (max-width: 1100px) {
    #swipe_block {
        width: calc(100% - 122px);
        margin-left: 122px;
    }
}

@media (max-width: 700px) {
    #swipe_block {
        width: 100%;
        margin-left: 0;
    }
}




/* Уведомление и кнопка обновления приложения */
#update_banner {
    height: 55px;
    transition: .3s ease;
}

#update_banner .content {
    margin: 0 auto;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#update_banner .headline {
    font-weight: 800;
    font-size: var(--FontSize4);
    color: var(--PrimaryColorText);
    font-family: 'Roboto', sans-serif;
    margin-bottom: 5px;
    opacity: 0.9;
}

#update_banner .subhead {
    font-size: var(--FontSize2);
    text-align: center;
    color: var(--PrimaryColorText);
    font-family: 'Roboto', sans-serif;
}

#update_banner[data-state="noupdate"] {
    display: none;
}

#update_banner[data-state="updateavailable"] {
    display: flex;
    cursor: pointer;
    background-color: var(--PrimaryColor);
    color: var(--PrimaryColorText);
    transition: .3s ease;
    opacity: 0.95;
    z-index: 9999;
    position: fixed;
    width: 350px;
    margin: 10px;
    padding: 5px;
    border-radius: var(--border-radius);
    right: 0;
}

#update_banner_icon {
    display: none;
}

#update_banner_icon svg {
    padding: 0px 50px;
    width: 25px;
    margin: -4px;
    fill: var(--PrimaryColorText);
}

@media (max-width: 700px) {
    #update_banner[data-state="updateavailable"] {
        width: calc(100% - 30px);
    }
}

/* Стили для меню */
#navigation {
    position: fixed;
    width: 230px;
    height: calc(100vh - 60px);
    min-height: 510px;
    background: var(--ColorThemes2);
    padding: 36px 10px;
    -webkit-transition: width .2s ease 0s;
    -o-transition: width .2s ease 0s;
    transition: width .2s ease 0s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#navigation>nav {
    display: flex;
    flex-direction: column;
    height: 290px;
    align-items: center;
    justify-content: flex-start;
}

#navigation>nav>li {
    width: 180px;
    height: 50px;
    list-style-type: none;
    position: relative;
    -webkit-transition: all .2s ease 0s;
    -o-transition: all .2s ease 0s;
    transition: all .2s ease 0s;
    z-index: 1;
    margin: 5px;
}

#navigation>nav>li>div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    height: 50px;
    padding: 0 10px;
    border-radius: var(--border-radius);
    -webkit-transition: all .2s ease 0s;
    -o-transition: all .2s ease 0s;
    transition: all .2s ease 0s;
    opacity: 0.8;
    cursor: pointer;
    border: 2px;
    border: 2px solid var(--ColorThemes2);
    overflow: hidden;
}

#navigation>nav>li>div[data-state="active"] {
    background: var(--ColorThemes3);
    border: 2px solid var(--ColorThemes3);
    box-shadow: var(--shadow-l1);
}

#navigation>nav>li:has(div[data-state="active"]) {
    z-index: 10;
}

#navigation>nav>li>div>svg {
    width: 25px;
    height: 25px;
    min-width: 25px;
    min-height: 25px;
    fill: var(--ColorThemes3);
}

#navigation>nav>li>div[data-state="active"] svg {
    fill: var(--ColorThemes2);
}

#navigation>nav>li>div>b {
    margin-left: 15px;
    font-size: var(--FontSize3);
    font-weight: 300;
    color: var(--ColorThemes3);
    white-space: nowrap;
}

#navigation>nav>li>div[data-state="active"] b {
    color: var(--ColorThemes2);
}

#navigation>nav>li>a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 2px;
}


@media (hover: hover) {
    #navigation>nav>li:hover {
        transform: scale(1.01);
    }

    #navigation>nav>li:hover>div {
        border: 2px solid var(--ColorThemes3);
    }
}

@media (max-width: 1100px) {
    #navigation {
        width: 100px;
    }

    #navigation>nav>li {
        width: 50px;
    }

    #navigation>nav>li>div {
        width: 30px;
        justify-content: center;
    }

    #navigation>nav>li>div>b {
        display: none;
    }
}

#app {
    background: var(--ColorThemes0);
    position: absolute;
    margin-top: 40px;
    margin-left: 250px;
    padding: 5px;
    width: calc(100% - 250px - 10px);
    min-height: calc(100% - 50px);
    border-radius: 20px 0 0 0;
    -webkit-transition: all .2sease 0s;
    -o-transition: all .2s ease 0s;
    transition: all .2sease 0s;
    box-shadow: var(--shadow-l1);
    display: flex;
}

@media (max-width: 1100px) {
    #app {
        margin-left: 120px;
        width: calc(100% - 130px);
    }
}

@media (max-width: 700px),
(max-height: 540px) {
    body {
        background: var(--ColorThemes0);
    }

    #navigation {
        width: 100%;
        height: 60px;
        min-height: 60px;
        padding: 0;
        z-index: 9991;
        bottom: -1px;
        border: 0;
        margin: 0;
        box-shadow: 0px 24px 32px rgba(0, 0, 0, .09), 0px 16px 24px rgba(0, 0, 0, .09), 0px 4px 8px rgba(0, 0, 0, .09), 0px 0px 1px rgba(0, 0, 0, .09);
    }

    #navigation>nav {
        display: flex;
        flex-direction: row;
        height: 100%;
        justify-content: space-around;
        align-items: center;
    }

    #navigation>nav>li {
        width: 40px;
        height: 40px;
    }

    #navigation>nav>li:hover {
        transform: scale(1.0);
    }

    #navigation>nav>li:hover>div {
        border: 0;
        box-shadow: none;
    }

    #navigation>nav>li>div {
        width: 100%;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        border: 0;
        box-shadow: none;
    }

    #navigation>nav>li>div>span {
        display: none;
    }

    #navigation>nav>li>div[data-state="active"] {
        background: 0;
        border: 0;
        box-shadow: none;
    }

    #navigation>nav>li>div[data-state="active"]>svg {
        fill: var(--PrimaryColor);
    }

    #navigation>nav>li>button {
        display: none;
    }

    #navigation[data-state="ios"] {
        height: 70px;
    }

    #navigation[data-state="ios"]>nav {
        align-items: flex-start;
    }

    #app {
        margin-left: 0px;
        width: 100%;
        border-radius: 0;
        padding: 0;
        margin-top: 0;
        padding-bottom: 80px;
        height: auto;
    }
}

.leaflet-popup-content {
    margin: 8px 10px !important;
    padding: 0 !important;
}

.leaflet-popup-content>.map_dell {
    border-radius: 10px;
    padding: 5px 10px;
    width: 100%;
    margin-top: 10px;
    background: #C14D4D;
    color: #fff;
}

.leaflet-popup>a {
    display: none !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--ColorThemes0) !important;
    color: var(--ColorThemes3) !important;
}

.leaflet_drop {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leaflet_drop>div {
    background: #C14D4D;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin: -3px 0 0 -3px;
}

.leaflet_drop>span {
    font-size: var(--FontSize1);
    opacity: 0.8;
    margin-bottom: 10px;
}

.leaflet-pm-tooltip {
    display: none !important;
}

.tooltip-hidden {
    display: none;
}