/* Mobile off-canvas menu (<=767px). The drawer lives outside <header> so the
   homepage hero's stacking context, overflow and the old navbar transform
   cannot clip it. Desktop navigation is untouched. */

.vh-drawer,
.vh-drawer-backdrop {
    display: none;
}

@media (max-width: 767px) {
    /* the legacy Bootstrap collapse menu is replaced by the drawer */
    body .navbar-collapse {
        display: none !important;
    }

    body.vh-menu-open {
        overflow: hidden;
    }

    body.vh-menu-open #gdpr-cookie-message {
        visibility: hidden;
    }

    .vh-drawer-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 10001; /* above the cookie notice (9999) */
        background: rgba(0, 0, 0, 0.62);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    }

    body.vh-menu-open .vh-drawer-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.25s ease, visibility 0s;
    }

    .vh-drawer {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 86vw;
        max-width: 340px;
        z-index: 10002; /* above the backdrop; the modal (1050) hands off instantly */
        background: #0b0f14;
        color: #eef2f7;
        box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.28s;
        -webkit-overflow-scrolling: touch;
    }

    body.vh-menu-open .vh-drawer {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
    }

    .vh-drawer *,
    .vh-drawer *::before,
    .vh-drawer *::after {
        box-sizing: border-box;
    }

    .vh-drawer__head {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 8px 0 20px;
        background: #0b0f14;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .vh-drawer__title {
        color: #fff;
        font-family: 'Fira Sans', sans-serif;
        font-size: 16px;
        font-weight: 700;
    }

    .vh-drawer__close {
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: #fff;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .vh-drawer__close:hover,
    .vh-drawer__close:focus {
        background: rgba(255, 255, 255, 0.08);
        outline: 0;
    }

    .vh-drawer__close:focus-visible {
        outline: 2px solid #d9232e;
        outline-offset: -2px;
    }

    .vh-drawer__scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

.vh-drawer__nav {
    list-style: none;
    margin: 0;
    padding: 8px 0 24px;
}

.vh-drawer__nav > li {
    position: relative;
    display: block;
}

.vh-drawer__nav > li > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 52px 12px 20px;
    color: rgba(255, 255, 255, 0.88);
    font-family: 'Fira Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.vh-drawer__nav > li > a:hover,
.vh-drawer__nav > li > a:focus {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    outline: 0;
}

.vh-drawer__nav > li > a:focus-visible {
    outline: 2px solid #d9232e;
    outline-offset: -2px;
}

.vh-drawer__nav > li.active > a {
    background: rgba(217, 35, 46, 0.14);
    color: #fff;
    box-shadow: inset 3px 0 0 #d9232e;
}

/* Nested "Тип" menu: static, dark, indented accordion */
.vh-drawer__nav .dropdown-menu {
    position: static;
    float: none;
    display: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 4px 0;
    background: #0f191f;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
}

.vh-drawer__nav .dropdown.open > .dropdown-menu {
    display: block;
}

.vh-drawer__nav .dropdown-menu > li > a {
    display: block;
    padding: 11px 20px 11px 36px;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Fira Sans', sans-serif;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.vh-drawer__nav .dropdown-menu .dropdown-menu > li > a {
    padding-left: 52px;
}

.vh-drawer__nav .dropdown-menu > li > a:hover,
.vh-drawer__nav .dropdown-menu > li > a:focus {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    text-decoration: none;
    outline: 0;
}

/* caret moves to the right edge and rotates when open */
.vh-drawer__nav .dropdown-toggle {
    position: relative;
}

.vh-drawer__nav .dropdown-toggle .caret {
    position: absolute;
    right: 22px;
    top: 50%;
    margin: 0;
    border-top-color: currentColor;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.vh-drawer__nav .dropdown.open > .dropdown-toggle .caret {
    transform: translateY(-50%) rotate(180deg);
}

/* auth buttons: override the global .btn padding */
.vh-drawer__nav > li > a.btn {
    display: flex;
    justify-content: center;
    width: auto;
    min-height: 48px;
    margin: 12px 20px 0;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.vh-drawer__nav > li > a.btn:hover,
.vh-drawer__nav > li > a.btn:focus {
    border-color: #d9232e;
    background: #d9232e;
    color: #fff;
}

@media (min-width: 768px) {
    .vh-drawer,
    .vh-drawer-backdrop {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vh-drawer,
    .vh-drawer-backdrop {
        transition: none !important;
    }
}

/* the drawer must close without sliding when a modal takes over */
html.vh-drawer-instant .vh-drawer,
html.vh-drawer-instant .vh-drawer-backdrop {
    transition: none !important;
}