/*
 * Vir Nadzor — custom mobile menu panel (CWS Suite mobile menu, Menu panel: custom).
 * Pairs with cws-suite/menu-panel.php.
 *
 * Every rule is scoped under .mobile-menu-custom-panel (or, for the two
 * plugin-owned pieces restyled at the bottom, under a :has(.vn-mm) guard), so
 * nothing here can reach a menu that does not use this template. Link and
 * button rules sit at (0,2,0)+ so `.elementor-kit-31 a` / `button` (0,1,1)
 * cannot repaint them.
 */

.mobile-menu-custom-panel .vn-mm {
    --vnm-bg: #15181b;
    --vnm-bar: var(--e-global-color-5dce2357, #1d2125);
    --vnm-rule: var(--e-global-color-724f6d8c, #2a2f34);
    --vnm-line: #3a4046;
    --vnm-red: var(--e-global-color-381b1e1c, #e3262a);
    --vnm-red-hover: var(--e-global-color-26ce54c6, #f23a3e);
    --vnm-text: #c9cdd2;
    --vnm-muted: #8a9097;
    --vnm-faint: #6c737a;
    --vnm-font: var(--e-global-typography-5e5e718f-font-family, "Archivo"), system-ui, sans-serif;
    --vnm-mono: var(--e-global-typography-36682ab6-font-family, "IBM Plex Mono"), ui-monospace, monospace;
    --vnm-pad: 22px;
    --vnm-bar-pad: 16px;
    --vnm-item-size: 30px;
    --vnm-item-pad: 18px;

    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
    background-color: var(--vnm-bg);
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: #fff;
    font-family: var(--vnm-font);
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ */
/* Top bar — sits exactly over the site header (70px)                  */
/* ------------------------------------------------------------------ */

.mobile-menu-custom-panel .vn-mm__top {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px;
    padding: 0 var(--vnm-bar-pad);
    box-sizing: border-box;
    background: var(--vnm-bar);
    border-bottom: 1px solid var(--vnm-rule);
}

.mobile-menu-custom-panel .vn-mm__logo {
    display: flex;
    align-items: center;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.mobile-menu-custom-panel .vn-mm__logo img {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
}

.mobile-menu-custom-panel .vn-mm__logo-text {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Close — the header's burger square, filled red, bars crossed */
.mobile-menu-custom-panel .vn-mm__close,
.mobile-menu-custom-panel .vn-mm__close:hover,
.mobile-menu-custom-panel .vn-mm__close:focus {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    background: var(--vnm-red);
    color: #fff;
    border: 1px solid var(--vnm-line);
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 200ms;
}

.mobile-menu-custom-panel .vn-mm__close:hover {
    background: var(--vnm-red-hover);
}

.mobile-menu-custom-panel .vn-mm__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.mobile-menu-custom-panel .vn-mm__close-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    margin: -1px 0 0 -10px;
    background: #fff;
    transform: rotate(45deg);
}

.mobile-menu-custom-panel .vn-mm__close-bar + .vn-mm__close-bar {
    transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ */
/* Scroll area — label row + numbered items                            */
/* ------------------------------------------------------------------ */

.mobile-menu-custom-panel .vn-mm__scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 24px var(--vnm-pad) 8px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--vnm-line) transparent;
}

.mobile-menu-custom-panel .vn-mm__label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--vnm-rule);
    font-family: var(--vnm-mono);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--vnm-faint);
}

.mobile-menu-custom-panel .vn-mm__list,
.mobile-menu-custom-panel .vn-mm__subs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-menu-custom-panel .vn-mm__item {
    margin: 0;
    border-bottom: 1px solid var(--vnm-rule);
}

.mobile-menu-custom-panel .vn-mm__summary {
    display: block;
    list-style: none;
    cursor: pointer;
    outline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-custom-panel .vn-mm__summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-custom-panel .vn-mm__row {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: var(--vnm-item-pad) 0;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-custom-panel a.vn-mm__row:hover,
.mobile-menu-custom-panel a.vn-mm__row:focus {
    color: #fff;
    text-decoration: none;
}

.mobile-menu-custom-panel .vn-mm__num {
    flex: 0 0 22px;
    font-family: var(--vnm-mono);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    color: var(--vnm-red);
}

.mobile-menu-custom-panel .vn-mm__text {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--vnm-font);
    font-size: var(--vnm-item-size);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.8px;
    overflow-wrap: anywhere;
}

.mobile-menu-custom-panel .vn-mm__icon {
    flex: 0 0 auto;
    font-family: var(--vnm-mono);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: var(--vnm-muted);
    transition: transform 300ms, color 200ms;
}

.mobile-menu-custom-panel .vn-mm__group[open] .vn-mm__icon--plus {
    transform: rotate(45deg);
}

.mobile-menu-custom-panel a.vn-mm__row:hover .vn-mm__icon,
.mobile-menu-custom-panel .vn-mm__summary:hover .vn-mm__icon {
    color: #fff;
}

.mobile-menu-custom-panel .vn-mm__summary:focus-visible,
.mobile-menu-custom-panel a.vn-mm__row:focus-visible,
.mobile-menu-custom-panel .vn-mm__sub:focus-visible {
    outline: 2px solid var(--vnm-red);
    outline-offset: 2px;
}

/* Sub-items — inline accordion body */
.mobile-menu-custom-panel .vn-mm__subs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0 24px;
    padding: 0 0 18px 40px;
}

.mobile-menu-custom-panel .vn-mm__sub-item {
    margin: 0;
}

.mobile-menu-custom-panel .vn-mm__sub {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-family: var(--vnm-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--vnm-text);
    text-decoration: none;
    transition: color 200ms;
}

.mobile-menu-custom-panel .vn-mm__sub::before {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 1px;
    background: var(--vnm-red);
}

.mobile-menu-custom-panel .vn-mm__sub:hover,
.mobile-menu-custom-panel .vn-mm__sub:focus {
    color: #fff;
    text-decoration: none;
}

.mobile-menu-custom-panel .vn-mm__extra--top {
    margin-bottom: 20px;
}

/* ------------------------------------------------------------------ */
/* Footer — CTA + contact tiles                                        */
/* ------------------------------------------------------------------ */

.mobile-menu-custom-panel .vn-mm__foot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px var(--vnm-pad) calc(26px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: var(--vnm-bar);
    border-top: 2px solid var(--vnm-red);
}

.mobile-menu-custom-panel .vn-mm__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 16px;
    background: var(--vnm-red);
    color: #fff;
    font-family: var(--vnm-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 200ms;
}

.mobile-menu-custom-panel .vn-mm__cta:hover,
.mobile-menu-custom-panel .vn-mm__cta:focus {
    background: var(--vnm-red-hover);
    color: #fff;
    text-decoration: none;
}

.mobile-menu-custom-panel .vn-mm__contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.mobile-menu-custom-panel .vn-mm__contact {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--vnm-line);
    color: #fff;
    text-decoration: none;
    transition: border-color 200ms;
}

.mobile-menu-custom-panel .vn-mm__contact:hover,
.mobile-menu-custom-panel .vn-mm__contact:focus {
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}

.mobile-menu-custom-panel .vn-mm__contact-icon {
    flex: 0 0 22px;
    display: flex;
    line-height: 0;
}

.mobile-menu-custom-panel .vn-mm__contact-icon--phone {
    color: var(--vnm-red);
}

.mobile-menu-custom-panel .vn-mm__contact-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mobile-menu-custom-panel .vn-mm__contact-label {
    font-family: var(--vnm-mono);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--vnm-muted);
}

.mobile-menu-custom-panel .vn-mm__contact-value {
    font-family: var(--vnm-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.mobile-menu-custom-panel .vn-mm__cta:focus-visible,
.mobile-menu-custom-panel .vn-mm__contact:focus-visible,
.mobile-menu-custom-panel .vn-mm__logo:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Tablet                                                              */
/* ------------------------------------------------------------------ */

@media (min-width: 700px) {
    .mobile-menu-custom-panel .vn-mm {
        --vnm-pad: 48px;
        --vnm-bar-pad: 24px;
        --vnm-item-size: 52px;
        --vnm-item-pad: 26px;
    }

    .mobile-menu-custom-panel .vn-mm__logo img {
        width: 160px;
    }
}

/* Short viewports (landscape phones): let the footer scroll with the items */
@media (max-height: 560px) {
    .mobile-menu-custom-panel .vn-mm {
        height: auto;
    }

    .mobile-menu-custom-panel .vn-mm__scroll {
        flex: 0 0 auto;
        overflow: visible;
    }
}

/* ------------------------------------------------------------------ */
/* Plugin-owned pieces, restyled only while this template is in use    */
/* ------------------------------------------------------------------ */

/* The sliding shell: the design drops the panel in from the top with a fade
   instead of sliding it in from the side. The .active contract is untouched —
   only what .active looks like changes. Browsers without :has() keep the
   plugin's own slide. */
.mobile-menu-wrap.mobile-menu-wrap .mobile-menu-content.mobile-menu-content:has(> .mobile-menu-custom-panel > .vn-mm) {
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity 350ms, transform 450ms cubic-bezier(.2, .7, .2, 1), visibility 0s linear 450ms;
}

.mobile-menu-wrap.mobile-menu-wrap .mobile-menu-content.mobile-menu-content.active:has(> .mobile-menu-custom-panel > .vn-mm) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 350ms, transform 450ms cubic-bezier(.2, .7, .2, 1), visibility 0s;
}

/* The trigger in the header: a 46px outlined square with two bars. */
.mobile-menu-wrap.mobile-menu-wrap:has(.vn-mm) .mobile-menu-trigger .icon.open-menu {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    box-sizing: border-box;
    border: 1px solid #3a4046;
    background: transparent;
    cursor: pointer;
    transition: border-color 200ms;
}

.mobile-menu-wrap.mobile-menu-wrap:has(.vn-mm) .mobile-menu-trigger .icon.open-menu:hover {
    border-color: #fff;
}

.mobile-menu-wrap.mobile-menu-wrap:has(.vn-mm) .mobile-menu-trigger .icon.open-menu svg {
    display: none;
}

.mobile-menu-wrap.mobile-menu-wrap:has(.vn-mm) .mobile-menu-trigger .icon.open-menu::before,
.mobile-menu-wrap.mobile-menu-wrap:has(.vn-mm) .mobile-menu-trigger .icon.open-menu::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-wrap.mobile-menu-wrap .mobile-menu-content.mobile-menu-content:has(> .mobile-menu-custom-panel > .vn-mm),
    .mobile-menu-wrap.mobile-menu-wrap .mobile-menu-content.mobile-menu-content.active:has(> .mobile-menu-custom-panel > .vn-mm) {
        transform: none;
        transition: opacity 150ms, visibility 0s;
    }

    .mobile-menu-custom-panel .vn-mm__icon {
        transition: none;
    }
}
