/**
 * LBL Forum — общий каркас: на ширине ≥901px шапка и сайдбар не «уезжают»,
 * вертикально крутится только центральная колонка (.forum-catalog / .forum-scroll-main).
 * Подключать после profile.css / profile-theme.
 */

body.lbl-forum-page .forum-side-nav .sidebar-menu {
    list-style: none;
}
body.lbl-forum-page .forum-side-nav .sidebar-menu li {
    list-style: none;
}

/* Ссылки в боковом меню — визуально как кнопки (в index часть пунктов — <a>) */
body.lbl-forum-page .forum-side-nav .sidebar-menu a {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: var(--profile-radius-sm, 12px);
    box-sizing: border-box;
}
body.lbl-forum-page .forum-side-nav .sidebar-menu a:hover {
    background: var(--primary-subtle, rgba(37, 99, 235, 0.12));
    color: var(--primary-color, #2563eb);
}
body.lbl-forum-page .forum-side-nav .sidebar-menu a.active,
body.lbl-forum-page .forum-side-nav .sidebar-menu button.active {
    background: var(--primary-subtle, rgba(37, 99, 235, 0.12));
    color: var(--primary-color, #2563eb);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Сетка «нав | контент» — нужна на всех страницах с forum-shell (не только index).
   В profile.css при max-width:968px глобально .profile-sidebar { display:none } —
   для форума переопределяем узким селектором.
   -------------------------------------------------------------------------- */
.forum-layout {
    position: relative;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
}

@media (min-width: 901px) {
    .forum-layout {
        flex-direction: row;
        align-items: stretch;
        gap: 20px;
    }
}

@media (min-width: 769px) {
    body.lbl-forum-page .forum-layout > .forum-side-nav.profile-sidebar {
        display: block !important;
    }
}

body.lbl-forum-page .forum-layout > .forum-side-nav.profile-sidebar {
    position: static;
    z-index: 2;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0 !important;
    flex: 0 0 auto;
    margin: 0;
    padding: 0 !important;
    height: auto !important;
    order: 0 !important;
    border-radius: var(--profile-radius-lg, 22px);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text-primary, #0f172a);
}

@media (max-width: 900px) {
    body.lbl-forum-page .forum-layout > .forum-side-nav.profile-sidebar {
        margin-bottom: 12px;
    }
}

/* Карточка меню (стекло) — без этого пункты «голые», как будто пропал CSS */
.forum-side-nav .sidebar-menu {
    margin: 0;
    padding: 12px;
    border-radius: var(--profile-radius-lg, 22px);
    border: 1px solid var(--liquid-border, rgba(255, 255, 255, 0.35));
    background: var(--liquid-bg, rgba(255, 255, 255, 0.18));
    backdrop-filter: var(--liquid-blur-sm, blur(16px) saturate(170%));
    -webkit-backdrop-filter: var(--liquid-blur-sm, blur(16px) saturate(170%));
    box-shadow: var(--liquid-shadow, 0 4px 20px rgba(31, 38, 135, 0.06));
}

.forum-side-nav .sidebar-menu button {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: inherit;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: var(--profile-radius-sm, 12px);
    box-sizing: border-box;
}

.forum-side-nav .sidebar-menu button:hover {
    background: var(--primary-subtle, rgba(37, 99, 235, 0.12));
    color: var(--primary-color, #2563eb);
}

@media (min-width: 901px) {
    html.lbl-forum-app {
        height: 100%;
    }
    html.lbl-forum-app body.lbl-forum-page {
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    body.lbl-forum-page.lbl-forum-app > main {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.lbl-forum-page.lbl-forum-app > main > .container {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.lbl-forum-page.lbl-forum-app .forum-layout {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        align-items: stretch !important;
    }
    body.lbl-forum-page.lbl-forum-app .forum-side-nav.profile-sidebar {
        position: relative !important;
        top: 0 !important;
        align-self: stretch;
        flex: 0 0 248px !important;
        width: 248px !important;
        max-width: 248px !important;
        max-height: none !important;
        height: auto !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    body.lbl-forum-page.lbl-forum-app .forum-catalog,
    body.lbl-forum-page.lbl-forum-app .forum-scroll-main {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}
