/* Navigation surfaces follow the shell palette and keep the existing page gutters. */
body .vc-rail,
body .vc-chat-dock,
body .vc-side-menu,
body:not(.welcome) #velchat-menu.vc-menu {
    background: var(--vc-panel, #191a21) !important;
    color: var(--vc-text, #f4f3f9);
    border: 1px solid var(--vc-border, #343640);
}
body .vc-rail {
    bottom: auto;
    height: auto;
    max-height: calc(100vh - 94px);
    margin: 18px 12px;
    width: 226px;
    border-radius: 16px;
}
body .vc-rail .sidebar_innr {
    padding: 8px;
    gap: 3px;
    height: auto;
    overflow: auto;
    scrollbar-width: thin;
}
body .vc-rail .sidebar_innr > .btn {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 46px;
    margin: 0;
    padding: 8px 12px;
    gap: 12px;
    line-height: 1.35;
    font-size: 14px;
    font-weight: 550;
    letter-spacing: normal;
    color: var(--vc-muted, #b4b4c3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    text-align: start;
}
body .vc-rail .sidebar_innr > .btn svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
}
body .vc-rail .sidebar_innr > .btn svg path { fill: currentColor; }
body .vc-rail .sidebar_innr > .btn span {
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
body .vc-rail .sidebar_innr > .vc-menu-more {
    position: relative;
    margin-top: 8px;
}
.vc-rail .vc-menu-more::after {
    content: "";
    position: absolute;
    inset: -7px 4px auto;
    height: 1px;
    background: var(--vc-border, #343640);
}
body .vc-rail .sidebar_innr > .btn:hover,
body .vc-menu .tag_navbar_top_side_all_sec > a:hover,
body .vc-side-menu .tag_sidebar_section > a:hover {
    color: var(--vc-text, #f4f3f9);
    background: var(--vc-raised, #22232c);
}
body .vc-rail .sidebar_innr > .btn[aria-current],
body .vc-menu .tag_navbar_top_side_all_sec > a[aria-current],
body .vc-side-menu .tag_sidebar_section > a[aria-current] {
    color: var(--vc-accent, #c5afff);
    background: var(--vc-accent-bg, #31283f);
}
body .vc-rail .sidebar_innr > .btn[aria-current] {
    border-color: rgba(197,175,255,.19);
}
body .vc-rail .sidebar_innr > .btn[aria-current]::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-inline-start: auto;
    flex: 0 0 5px;
    border-radius: 100%;
    background: currentColor;
}
body .vc-menu :focus-visible,
body .vc-side-menu :focus-visible,
body .vc-rail :focus-visible,
body .vc-chat-dock :focus-visible {
    outline: 2px solid var(--vc-accent, #c5afff) !important;
    outline-offset: -2px;
}
body .vc-menu {
    width: min(400px, calc(100vw - 24px));
    border-radius: 16px;
    overflow: hidden;
    visibility: hidden;
    transform: none;
    transition: opacity .14s ease;
    will-change: auto;
    box-shadow: 0 14px 46px rgba(0,0,0,.32);
}
body.side_open .vc-menu { visibility: visible; }
.vc-menu .tag_navbar_top_side_all_arrow { display: none; }
.vc-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 8px 12px 8px 18px;
    border-bottom: 1px solid var(--vc-border, #343640);
}
.vc-menu-head h2 {
    margin: 0;
    font-family: inherit;
    font-size: 19px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--vc-text, #f4f3f9);
}
.vc-menu-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: var(--vc-raised, #22232c);
    color: var(--vc-text, #f4f3f9);
}
.vc-menu-close:hover { color: var(--vc-accent, #c5afff); }
body .vc-menu .sidebar_innr {
    padding: 2px 12px 15px;
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    height: auto;
    overscroll-behavior: contain;
}
body .vc-menu .tag_navbar_top_side_all_heading,
body .vc-side-menu .tag_sidebar_head {
    color: var(--vc-muted, #b4b4c3);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: .045em;
    text-transform: none;
}
body .vc-menu .tag_navbar_top_side_all_heading { margin: 16px 8px 6px; }
body .vc-menu .tag_navbar_top_side_all_sec {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}
body .vc-menu .tag_navbar_top_side_all_sec > a,
body .vc-side-menu .tag_sidebar_section > a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 44px;
    border-radius: 9px;
    padding: 8px 9px;
    box-shadow: none;
    color: var(--vc-text, #f4f3f9);
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    font-size: 14px;
    font-weight: 500;
}
body .vc-menu .tag_navbar_top_side_all_sec > a svg,
body .vc-side-menu .tag_sidebar_section > a svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    color: var(--vc-muted, #b4b4c3);
}
.vc-side-menu > .vc-menu-head { display: none; }
body .vc-side-menu .tag_sidebar_head {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    border: 0;
    background: none;
}
.vc-side-menu .tag_sidebar_head::before { display: none; }
body .vc-side-menu .tag_sidebar_section > a {
    width: 100%;
    height: auto;
    margin: 0;
}
body .vc-side-menu .sidebar_innr { overscroll-behavior-y: contain; }
body .vc-side-menu .tag_sidebar_section_prnt { padding: 6px 12px; }

/* A compact, scrollable contact dock stays within the reserved chat gutter. */
body .chat-container.vc-chat-dock,
body.tag_header_top_p .vc-chat-dock {
    width: 62px;
    bottom: auto;
    height: auto;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    margin: 18px 13px;
    padding: 8px;
    gap: 4px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
body .vc-chat-dock .tag_chat_side_btn,
body .vc-chat-dock .recipient-chat-user > .user-info,
body .vc-chat-dock .vc-resume-chat {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    line-height: 1;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--vc-muted, #b4b4c3);
    box-shadow: none;
}
body .vc-chat-dock .tag_chat_side_btn:hover,
body .vc-chat-dock .vc-resume-chat:hover,
body .vc-chat-dock .show > .tag_chat_side_btn {
    background: var(--vc-accent-bg, #31283f);
    color: var(--vc-accent, #c5afff);
}
.vc-chat-dock .vc-resume-chat svg,
.vc-chat-dock .tag_chat_side_btn svg { width: 21px; height: 21px; }
.vc-chat-dock .online-content-toggler {
    flex: 0 1 auto;
    min-height: 0;
    margin: 0 -3px;
    padding: 0 3px;
    scrollbar-width: thin;
}
.vc-chat-dock .online-content-toggler:not(:has(.recipient-chat-user, .chat-opacity.active)) { display: none; }
.vc-chat-dock .recipient-chat-user { margin: 5px 0; }
body .vc-chat-dock .recipient-chat-user > .user-info,
body .vc-chat-dock .recipient-chat-user > .user-info img {
    border-radius: 50%;
}
body .vc-chat-dock .recipient-chat-user > .user-info img {
    width: 40px;
    height: 40px;
}
body .vc-chat-dock .chat-opacity {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
}
.vc-chat-dock .chat-opacity.active ~ div { display: none; }
.vc-chat-dock [hidden] { display: none !important; }
.vc-chat-dock .recipient-chat-user:focus-within > .dropdown-menu { display: block; }
body .vc-chat-dock .wow_chat_search,
body .vc-chat-dock .wow_chat_search.show {
    position: relative;
    inset: auto;
    width: auto;
    padding-top: 5px;
    border-radius: 0;
    border-top: 1px solid var(--vc-border, #343640);
    box-shadow: none;
    background: transparent;
}
body .vc-chat-dock .wow_chat_search.show > .tag_chat_side_btn { border-radius: 11px; }
body .vc-chat-dock .wow_chat_search .dropdown-menu {
    inset: auto;
    inset-inline-end: calc(100% + 13px);
    top: 0;
    width: min(238px, 50vw);
    min-width: 0;
    height: auto;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--vc-border, #343640);
}
body .vc-chat-dock .wow_chat_search input {
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
}
body .vc-chat-dock .wow_chat_search p { margin: 0; }
body .vc-chat-dock .wow_chat_search p:not(:empty) {
    padding: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--vc-muted, #b4b4c3);
}
@media (min-width: 1240px) and (max-width: 1500px) {
    body .vc-rail { width: 182px; }
    body .vc-rail ~ .tag_content.tag_header_top_m:not(.tag_content_n_margin) { margin-inline-start: 206px; }
    body .vc-rail ~ .tag_content.tag_header_top_m .tag_show_fnd_bottom { inset-inline-start: 206px; }
    body .vc-rail .sidebar_innr > .btn:hover span,
    body .vc-rail .sidebar_innr > .btn span {
        position: static;
        transform: none;
        visibility: visible;
        opacity: 1;
        background: transparent;
        color: inherit;
        line-height: inherit;
    }
}
@media (min-width: 993px) and (max-width: 1239px) {
    body .vc-rail { width: 60px; margin-inline: 5px; }
    body .vc-rail .sidebar_innr { padding: 7px; }
    body .vc-rail .sidebar_innr > .btn {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    body .vc-rail .sidebar_innr > .btn:hover span,
    body .vc-rail .sidebar_innr > .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
        visibility: visible;
        opacity: 1;
        transform: none;
    }
    body .vc-rail .sidebar_innr > .btn[aria-current]::after { display: none; }
}
@media (max-width: 1150px) {
    body .chat-container.vc-chat-dock { margin-inline: 4px; }
    body .vc-side-menu { visibility: hidden; }
    body.side_open .vc-side-menu { visibility: visible; }
    .vc-side-menu > .vc-menu-head { display: flex; }
    body .vc-side-menu .sidebar_innr { height: calc(100% - 62px); }
    body .vc-side-menu .tag_sidebar_head { display: none; }
}
@media (max-width: 768px) {
    body #velchat-menu.vc-menu {
        top: 0;
        bottom: auto;
        left: auto;
        right: auto;
        inset-inline-start: 0;
        width: min(380px, calc(100vw - 24px));
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        padding: 0 0 env(safe-area-inset-bottom);
        border-radius: 0;
        border-block: 0;
        border-inline-start: 0;
    }
    body.side_open #velchat-menu.vc-menu { padding-top: 0; transform: none; }
    .vc-menu .vc-menu-head { padding-top: max(8px, env(safe-area-inset-top)); }
    body .vc-menu .sidebar_innr { flex: 1; min-height: 0; max-height: none; }
    body .vc-menu .tag_navbar_top_side_all_sec { grid-template-columns: 1fr; gap: 1px; }
    body .vc-menu .tag_navbar_top_side_all_sec a svg { margin: 0; }
    body .vc-menu .tag_navbar_top_side_all_heading { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    body .vc-menu, body .vc-side-menu, body .tag_side_backdrop { transition: none !important; }
}

body #velchat-menu[hidden] { display: none !important; }
