/* Kinkgram — mobile sidebar drawer (uses existing Clean TopMenu; no second bar) */

body.kgm-drawer-open {
    overflow: hidden;
}

body.is-moments-fs-open #kgm-backdrop,
body.is-moments-fs-open #kgm-header,
body:has(#moments-fs.is-open) #kgm-backdrop,
body:has(#moments-fs.is-open) #kgm-header {
    display: none !important;
}

.kgm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.kgm-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kgm-header {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1093;
    background: var(--hh-background-color-main, var(--background-color-main, #1a1a1a));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    padding: 8px 12px 10px;
}

.kgm-header.is-open {
    display: block;
}

.kgm-header__handle {
    width: 36px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
}

.kgm-header__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.kgm-header__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hh-text-color-highlight, #fff);
}

.kgm-header__subtitle {
    display: none;
    margin-top: 2px;
    font-size: 12px;
    color: var(--hh-text-color-secondary, #9a9a9a);
}

.kgm-header__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.layout-nav-container.kgm-nav-open,
.layout-sidebar-container.kgm-side-open {
    display: block !important;
    float: none !important;
    box-shadow: none !important;
}

.layout-nav-container.kgm-nav-open .panel,
.layout-sidebar-container.kgm-side-open .panel {
    margin-bottom: 10px;
}

.dropdown-menu > li.kgm-page-sidebar-li {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4px;
    padding-top: 4px;
}

/*
 * Only while Clean’s own bottom TopMenu is active (sm / ≤575.98px).
 * Do not force the bar between 576–767 — that fought Clean’s header TopMenu.
 * Keep Clean’s 50px icon targets; only ensure <i> is not font-size:0.
 */
@media (max-width: 575.98px) {
    #top-menu-nav > li > a > i {
        font-size: 20px !important;
    }

    #top-menu-nav.hide-menu-item-texts > li > a {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        padding: 0 !important;
    }

    #top-menu-nav.hide-menu-item-texts > li > a > i {
        font-size: 20px !important;
        line-height: 50px !important;
    }
}

/* Panel only with Clean bottom bar */
@media (min-width: 576px) {
    #kgm-backdrop,
    #kgm-header,
    #kgm-mais-li,
    #kgm-panel-li,
    .kgm-page-sidebar-li {
        display: none !important;
    }
}
