/***** Wrapper *****/
.wrapper { display: block; }

@media (min-width: 768px) {
    .side-menu {
        max-height: calc(100vh - 1.5rem);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
}

@supports (height: 100dvh) {
    @media (min-width: 768px) {
        .side-menu {
            max-height: calc(100dvh - 1.5rem);
        }
    }
}

/***** Sidebar *****/
.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -255px;
    background: #333;
    color: #fff;
    transition: all .3s;
    box-shadow: 2px 0px 3px rgba(170 170 170, 0.5);
    text-align: left;
    z-index: 1040!important;
}

.sidebar-wrapper{
    margin-top: 45px;
}

.sidebar.active {
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 2px 0 24px rgba(0,0,0,.35);
}

@media (max-width: 767.98px) {
    .sidebar.active {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 80% !important;
        z-index: 999999 !important;
    }
}

.dismiss {
	width: 35px; height: 35px; position: absolute; top: 10px; right: 10px; transition: all .3s;
	background: #444; border-radius: 4px; text-align: center; line-height: 35px; cursor: pointer;
}

.dismiss:hover, .dismiss:focus { background: #555; color: #fff; }

.sidebar .logo { padding: 40px 20px; border-bottom: 1px solid #444; transition: all .3s; }

.sidebar .logo a {
	display: inline-block;
	width: 172px;
	height: 34px;
	background: url(../img/logo.png) left top no-repeat;
	border: 0;
	text-indent: -999999px;
}

.sidebar ul.menu-elements {
    /*border-bottom: 1px solid #444; */
    transition: all .3s;
    padding: 0 10px !important;
}

.sidebar ul li a {
	display: block; padding: 10px 10px;
	border: 0; color: #fff;
}
.sidebar ul li a:hover,
.sidebar ul li a:focus,
.sidebar ul li.active > a:hover,
.sidebar ul li.active > a:focus { outline: 0; background: rgba(255, 255, 255, .08); color: #d10054; }
.sidebar.light ul li a:hover,
.sidebar.light ul li a:focus,
.sidebar.light ul li.active > a:hover,
.sidebar.light ul li.active > a:focus { background: rgba(209,0,84, .08); color: #d10054; }
/* icon follows the text color on hover */
.sidebar ul li a:hover .ion-icon-wrapper,
.sidebar ul li a:hover ion-icon { color: #d10054 !important; }

.sidebar ul li a i { margin-right: 5px; }

.sidebar ul li.active > a, .sidebar ul li.active > a[aria-expanded="true"] {
	background: #444;
	color: #fff;
}

.sidebar ul ul a { background: #444; padding-left: 30px; font-size: 14px; }

.sidebar ul ul li.active > a { background: #555; }

.sidebar a[data-toggle="collapse"] {
    position: relative;
}

.sidebar .dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.sidebar .to-top { padding: 20px; text-align: center; }

.sidebar .dark-light-buttons { padding: 10px 20px 30px 20px; text-align: center; }

/* sidebar light */

.sidebar.light { background: #fff; color: #888; }

.sidebar.light .dismiss { background: #ddd; color: #888; }

.sidebar.light .dismiss:hover,
.sidebar.light .dismiss:focus { background: #ccc; color: #888; }

.sidebar.light .logo { border-color: #eee; }
.sidebar.light .logo a { background-image: url(../img/logo-dark.png); }

.sidebar.light ul.menu-elements { border-color: #eee; }

.sidebar.light ul li a { color: #888; }

.sidebar.light ul li a:hover,
.sidebar.light ul li a:focus,
.sidebar.light ul li.active > a:hover,
.sidebar.light ul li.active > a:focus { background: #ccc; color: #888; }

.sidebar.light ul li.active > a, .sidebar.light a[aria-expanded="true"] {
	background: #ddd;
	color: #888;
}

.sidebar.light ul ul a { background: #ddd; }

.sidebar.light ul ul li.active > a { background: #ccc; }

.sidebar.light a.btn-customized-3 { background: #ddd; color: #888; }

.sidebar.light a.btn-customized-3:hover,
.sidebar.light a.btn-customized-3:active,
.sidebar.light a.btn-customized-3:focus,
.sidebar.light a.btn-customized-3:active:focus,
.sidebar.light a.btn-customized-3.active:focus,
.sidebar.light a.btn-customized-3.btn.btn-primary:not(:disabled):not(.disabled):active,
.sidebar.light a.btn-customized-3.btn.btn-primary:not(:disabled):not(.disabled):active:focus {
	background: #ccc; color: #888;
}

.sidebar.light a.btn-customized-4.btn-customized-dark { background: #555; }
.sidebar.light a.btn-customized-4.btn-customized-light { background: #eee; }

.sidebar.light a.btn-customized-4.btn-customized-dark:hover,
.sidebar.light a.btn-customized-4.btn-customized-dark:active,
.sidebar.light a.btn-customized-4.btn-customized-dark:focus,
.sidebar.light a.btn-customized-4.btn-customized-dark:active:focus,
.sidebar.light a.btn-customized-4.btn-customized-dark.active:focus,
.sidebar.light a.btn-customized-4.btn-customized-dark.btn.btn-primary:not(:disabled):not(.disabled):active,
.sidebar.light a.btn-customized-4.btn-customized-dark.btn.btn-primary:not(:disabled):not(.disabled):active:focus {
	background: #ccc; color: #fff;
}

.sidebar.light a.btn-customized-4.btn-customized-light:hover,
.sidebar.light a.btn-customized-4.btn-customized-light:active,
.sidebar.light a.btn-customized-4.btn-customized-light:focus,
.sidebar.light a.btn-customized-4.btn-customized-light:active:focus,
.sidebar.light a.btn-customized-4.btn-customized-light.active:focus,
.sidebar.light a.btn-customized-4.btn-customized-light.btn.btn-primary:not(:disabled):not(.disabled):active,
.sidebar.light a.btn-customized-4.btn-customized-light.btn.btn-primary:not(:disabled):not(.disabled):active:focus {
	background: #ccc; color: #fff;
}


/***** Dark overlay *****/

.overlay {
    display: none; position: fixed; width: 100vw; height: 100vh;
    background: rgba(51, 51, 51, 0.7); z-index: 998; opacity: 0; transition: all .5s ease-in-out;
}

.overlay.active { display: block; opacity: 1; }


/***** Content *****/

.content { width: 100%; transition: all 0.3s; }


/***** Divider *****/

.divider-1 span { display: inline-block; width: 200px; border-bottom: 1px dotted #aaa; }


/***** Top content *****/

.top-content { width: 100%; padding: 60px 0 120px 0; }

.top-content h1 { padding-top: 60px; color: #fff; }
.top-content .description { margin: 30px 0 0 0; padding-bottom: 30px; }
.top-content .description p { color: #fff; color: rgba(255, 255, 255, 0.8); }
.top-content .description a { color: #fff; color: rgba(255, 255, 255, 0.8); border-color: #fff; border-color: rgba(255, 255, 255, 0.8); }
.top-content .description a:hover,
.top-content .description a:focus { color: #fff; color: rgba(255, 255, 255, 0.8); }

.menu-divider{
    border-bottom: 1px solid #444;
}

.sidebar.light .menu-divider{
    border-bottom: 1px solid  #eee;
}

.user-side-menu .side-menu-create-group {
    display: flex;
}

.user-side-menu .side-menu-create-main {
    border-bottom-left-radius: 999px !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 999px !important;
    border-top-right-radius: 0 !important;
    flex: 1 1 auto;
}

.user-side-menu .side-menu-create-toggle {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 999px !important;
    border-left: 1px solid rgba(255, 255, 255, .28);
    border-top-left-radius: 0 !important;
    border-top-right-radius: 999px !important;
    flex: 0 0 44px;
    padding-left: 0;
    padding-right: 0;
}

.user-side-menu .side-menu-create-dropdown {
    border-radius: 18px;
    border: 1px solid rgba(20, 19, 43, .08);
    box-shadow: none;
    min-width: 100%;
    overflow: hidden;
    padding: .45rem;
    transform-origin: bottom right;
}

.user-side-menu .side-menu-create-group.show .side-menu-create-dropdown.show {
    bottom: 100% !important;
    left: auto !important;
    margin-bottom: .45rem !important;
    margin-top: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
}

.user-side-menu .side-menu-create-dropdown .dropdown-item {
    border-radius: 14px;
    font-size: .875rem;
    font-weight: 600;
    gap: .7rem;
    margin: .1rem 0;
    padding: .6rem .65rem;
    transition: background-color .16s ease, color .16s ease;
}

.user-side-menu .side-menu-create-option-icon {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.user-side-menu .side-menu-create-option-label {
    line-height: 1.2;
}

.side-menu-theme-light .side-menu-create-dropdown {
    background: #f0f1f5;
    border-color: rgba(20, 19, 43, .12);
    box-shadow: 0 1.2rem 2.8rem rgba(20, 19, 43, .18), 0 .4rem 1rem rgba(20, 19, 43, .12);
}

.side-menu-theme-light .side-menu-create-dropdown .dropdown-item {
    color: #495057 !important;
}

.side-menu-theme-light .side-menu-create-option-icon {
    background: rgba(20, 19, 43, .06);
    color: #495057;
}

.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:hover,
.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:focus,
.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:active {
    background: rgba(20, 19, 43, .07);
    color: #495057 !important;
}

.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:hover .side-menu-create-option-icon,
.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:focus .side-menu-create-option-icon,
.side-menu-theme-light .side-menu-create-dropdown .dropdown-item:active .side-menu-create-option-icon {
    background: #495057;
    color: #fff;
}

.side-menu-theme-dark .side-menu-create-dropdown {
    background: #1a1622;
    border-color: rgba(255, 255, 255, .1);
    box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, .45), 0 .4rem 1rem rgba(0, 0, 0, .3);
}

.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item {
    color: rgba(255, 255, 255, .76) !important;
}

.side-menu-theme-dark .side-menu-create-option-icon {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .82);
}

.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:hover,
.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:focus,
.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:active {
    background: rgba(255, 255, 255, .10);
    color: #fff !important;
}

.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:hover .side-menu-create-option-icon,
.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:focus .side-menu-create-option-icon,
.side-menu-theme-dark .side-menu-create-dropdown .dropdown-item:active .side-menu-create-option-icon {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* Hide the custom scrollbar (mCustomScrollbar) in the More drawer */
.mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
.mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical {
    right: 0;
    margin: 0;
    width: 0;
}

/* ===== Layout rearrange: logo top, user card + footer FIXED at bottom (desktop) =====
   Sidebar fills the viewport; the nav list scrolls; the logo (top) and the user
   card + language/theme footer (bottom) stay put. ===== */
@media (min-width: 768px) {
    .side-menu.fx-glass-sidebar {
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: calc(100vh - 80px);
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
    }
    .side-menu.fx-glass-sidebar::-webkit-scrollbar { width: 0; display: none; }
    .side-menu.fx-glass-sidebar > .user-side-menu {
        flex: 1 1 auto;
        min-height: 0;
        overflow: visible;
        margin-bottom: 0;
    }
    .side-menu.fx-glass-sidebar .fx-brand-bottom,
    .side-menu.fx-glass-sidebar .fx-side-footer {
        flex: 0 0 auto;
    }
    .side-menu.fx-glass-sidebar .fx-brand-bottom { margin-top: 0; }
}

/* FansXpress logo (top of the sidebar) */
.fx-brand-logo { gap: 11px; color: inherit; padding: 4px 2px; text-decoration: none; flex: 0 0 auto; }
.fx-brand-logo-mark {
    position: relative;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ff5fae, #e6117f);
    box-shadow: 0 6px 16px rgba(230,17,127,.45); flex: none; overflow: hidden;
}
.fx-brand-logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-brand-logo-fallback { color: #fff; font-weight: 800; font-size: 20px; line-height: 1; }
/* FX logo shown directly — no badge/background/border, but keep the mark's fixed
   42x42 box so the 512px SVG is constrained (it was blowing up full-width). */
.fx-brand-logo-mark--fx {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    width: 42px;
    height: 42px;
    flex: none;
    overflow: hidden;
}
.fx-brand-logo-mark--fx .fx-brand-logo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.fx-brand-logo-text { font-size: 21px; font-weight: 800; letter-spacing: -.3px; color: inherit; }

/* Sidebar footer: language + theme toggle under the user card */
.fx-side-footer { gap: 8px; }
.fx-side-lang { flex: 1 1 auto; min-width: 0; position: relative; }
.fx-side-lang-btn {
    width: 100%; padding: 9px 12px; border-radius: 11px;
    background: rgba(128,128,128,.10); border: 1px solid rgba(128,128,128,.20);
    color: inherit; text-decoration: none; font-size: 13px; font-weight: 600;
}
.fx-side-lang-btn:hover { background: rgba(128,128,128,.16); }
/* Language menu opens UPWARD, full width. data-display="static" disables Popper
   (which was flipping it back down instantly), so CSS positions it entirely:
   absolute, pinned above the button, matching the button's full width. */
.fx-side-lang-menu {
    position: absolute !important;
    bottom: calc(100% + 70px) !important;  /* open UPWARD, clearing the CREATE button above the footer */
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100%;
    min-width: 100%;
    max-height: 40vh;
    overflow-y: auto;
    margin: 0 !important;
    z-index: 1080;                          /* float cleanly over CREATE */
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0,0,0,.30);
}
/* theme-aware surface (was Bootstrap white on the dark UI) */
body.fx-theme-dark .fx-side-lang-menu {
    background: #201b2b !important;
    border: 1px solid rgba(255,255,255,.10) !important;
}
body.fx-theme-light .fx-side-lang-menu {
    background: #f0f1f5 !important;
    border: 1px solid rgba(0,0,0,.12) !important;
}
.fx-side-lang-menu .dropdown-item {
    padding: 9px 14px;
    border-radius: 8px;
    color: inherit;
}
body.fx-theme-dark .fx-side-lang-menu .dropdown-item { color: #ececf2; }
body.fx-theme-dark .fx-side-lang-menu .dropdown-item:hover { background: rgba(255,255,255,.08); }
body.fx-theme-light .fx-side-lang-menu .dropdown-item:hover { background: rgba(0,0,0,.05); }
.fx-side-theme {
    width: 42px; height: 42px; border-radius: 11px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(128,128,128,.10); border: 1px solid rgba(128,128,128,.20);
    color: inherit; text-decoration: none;
}
.fx-side-theme:hover { background: rgba(128,128,128,.16); }

/* Remove the column padding so the sidebar sits edge-to-edge (no top/bottom gap) */
@media (min-width: 768px) {
    .fx-layout-sidebar { padding-top: 0 !important; padding-bottom: 0 !important; }
}

/* Left sidebar: right border matching the RIGHT sidebar's left border, no shadow.
   Light: #dadde1, Dark: #3a3b3c (same as .border-left / .suggestions-wrapper). */
.fx-glass-sidebar,
.fx-glass-sidebar.side-menu-theme-dark,
.fx-glass-sidebar.side-menu-theme-light,
body.fx-theme-light .fx-glass-sidebar,
body.fx-theme-light .fx-glass-sidebar.side-menu-theme-light {
    border-right: 1px solid #dadde1 !important;
    box-shadow: none !important;
}

/* Dark theme: transparent background (blend with page) but keep the matching right border. */
body.fx-theme-dark .fx-glass-sidebar,
body.fx-theme-dark .fx-glass-sidebar.side-menu-theme-dark,
.fx-glass-sidebar.side-menu-theme-dark {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-right: 1px solid #3a3b3c !important;
    box-shadow: none !important;
}

/* ===== Logo divider (top) + footer shadow (bottom) — full width ===== */
@media (min-width: 768px) {
    /* logo sits flush; a thin border under it, edge-to-edge */
    .fx-glass-sidebar .fx-brand-logo {
        padding: 14px 18px !important;
        margin: 0 -18px 0 -18px;        /* stretch past the sidebar's side padding */
        border-bottom: 1px solid rgba(128,128,128,.18);
        width: auto;
    }
    /* footer (language + theme) pinned bottom, full width, subtle top shadow */
    .fx-glass-sidebar .fx-side-footer {
        margin: 0 -18px 0 -18px;        /* full width */
        padding: 12px 18px;
        border-top: 1px solid rgba(128,128,128,.14);
        box-shadow: 0 -6px 16px rgba(0,0,0,.12);
    }
}

/* ===== Final sidebar corrections ===== */
@media (min-width: 768px) {
    /* kill the sidebar column's top padding so the logo sits at the very top */
    .fx-layout-sidebar { padding: 0 !important; }

    /* the border between the left sidebar and the content column (the line the
       user sees as the sidebar's right border) — remove it */
    .fx-layout-content.border-left { border-left: none !important; }

    /* hide the nav scrollbar (still scrollable) */
    .fx-glass-sidebar > .user-side-menu { scrollbar-width: none; -ms-overflow-style: none; }
    .fx-glass-sidebar > .user-side-menu::-webkit-scrollbar { width: 0; height: 0; display: none; }
}

/* ===== Slide-out (.sidebar / user-side-menu) — OnlyFans-style clean menu ===== */
/* width is 300px, so when hidden it must sit fully off-screen (-310px), otherwise
   the extra 45px (300-255) peeks out on the left. */
.sidebar { width: 240px; left: -250px; }
.sidebar .sidebar-wrapper { margin-top: 8px; padding: 0 4px; }

/* back button (dismiss) sits at the top-right of the avatar row */
.sidebar .dismiss { background: rgba(128,128,128,.18); color: inherit; border-radius: 10px; }
.sidebar.light .dismiss { background: rgba(0,0,0,.06); }

/* nav items: smaller, tighter, professional */
.sidebar ul.menu-elements li a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; font-size: 15px; font-weight: 600; border-radius: 10px;
}
.sidebar ul.menu-elements li a ion-icon,
.sidebar ul.menu-elements li a .ion-icon-wrapper { font-size: 20px; }
.sidebar ul.menu-elements li a:hover { background: rgba(209,0,84,.10); color: #d10054; }
.sidebar ul.menu-elements li.active > a { background: rgba(209,0,84,.14); color: #d10054; }

/* subtle group dividers, edge-to-edge */
.sidebar .menu-divider { border-bottom: 1px solid rgba(128,128,128,.16); margin: 8px 0; }

/* ===== Slide-out sidebar (ONLY when open/.active): flex column — fixed header on
   top, scrollable menu in the middle, fixed Log out at the bottom. Scoped to .active
   so the closed/hidden base state is never disturbed. (mCustomScrollbar removed in
   SideMenu.js so this native layout works and the back button stays clickable.) */
.sidebar.active {
    display: flex;
    flex-direction: column;
    overflow: hidden;                 /* only the middle scrolls */
}

/* Fixed header: avatar + username + back — never scrolls */
.sidebar.active > .fx-slide-top {
    flex: 0 0 auto;
    padding: 12px 12px 10px;
    /* Separates the fixed header from the scrolling list below it. The grey is
       given as an alpha so the one value reads correctly on both themes --
       it darkens a light panel and lightens a dark one, with no second rule
       and nothing to keep in sync. */
    border-bottom: 1px solid rgba(128, 128, 128, .16);
}
.sidebar .fx-slide-top .dismiss {
    cursor: pointer;
    pointer-events: auto;
    width: 40px; height: 40px;
    border-radius: 10px;
    flex: none;
}

/* Scrollable middle — the ONLY scroll region; smooth + thin scrollbar */
.sidebar.active > .fx-slide-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.sidebar.active > .fx-slide-scroll::-webkit-scrollbar { width: 8px; }
.sidebar.active > .fx-slide-scroll::-webkit-scrollbar-thumb {
    background: rgba(128,128,128,.4); border-radius: 8px;
}
.sidebar.active > .fx-slide-scroll::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,.6); }
.sidebar.active > .fx-slide-scroll::-webkit-scrollbar-track { background: transparent; }

/* Fixed bottom: Log out stays pinned */
.sidebar.active > .fx-slide-bottom {
    flex: 0 0 auto;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(128,128,128,.16);
}

/* Slide-out (More) menu: list padding + a little breathing room between items */
.sidebar ul.menu-elements { padding: 0 10px !important; }
.sidebar ul.menu-elements > li { padding: 5px 0; }

/* Nested submenu (e.g. Language -> English / Română): full width, just spacing +
   a little left indent on the link text (not the whole block) so it reads as a
   sub-item without losing width. */
.sidebar ul.menu-elements .collapse,
.sidebar ul.menu-elements .collapsing {
    padding-left: 0;
    margin-top: 4px;
}
.sidebar ul.menu-elements .collapse > li,
.sidebar ul.menu-elements .collapsing > li {
    padding: 3px 0;
}
.sidebar ul.menu-elements .collapse > li > a,
.sidebar ul.menu-elements .collapsing > li > a {
    padding: 9px 12px 9px 30px;
    border-radius: 10px;
}
