/* ------------------------------
   FitVibe Bottom Menu (Premium)
-------------------------------- */
:root {
    --fv-primary: var(--main-primary-color, #325DE6);
    --fv-primary-hover: #1739a6;
    --fv-bg: #f3f5fb;
    --fv-text: #111827;
    --fv-muted: #4b5563;
    --fv-border: #D5D9E7;
    --fv-pill: #EEF2FF;
    --fv-shadow: 0 20px 50px rgba(15,23,42,0.08);
}

/* wrapper */
.bottom-user-menu {
    display: none;
}

/* items layout */
.bottom-user-menu > .fv-nav-item {
    position: relative;
    display: grid;
    align-content: center;
    justify-content: center;
    gap: 4px;
    grid-auto-rows: 30px 18px;
    font-size: var(--fs-xxs);
    color: rgba(75,85,99,.85);
    border-radius: 18px;
    padding: 8px 10px 6px 10px;
    transition: transform .15s ease, background .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* icons size */
.bottom-user-menu > .fv-nav-item svg, .bottom-user-menu > .fv-nav-item img {
    margin: 0 auto;
    width: 26px;
    height: 26px;
}

/* fix special icons */
.bottom-user-menu .fv-nav-item svg.search {
    width: 40px;
    height: 32px;
    top: 0;
    position: relative;
}

.bottom-user-menu .fv-nav-item svg.user {
    height: 28px;
}

/* icon strokes default */
.bottom-user-menu > .fv-nav-item svg * {
    stroke: rgba(75,85,99,.65);
    transition: stroke .15s ease, fill .15s ease;
}

/* hover (desktop) */
@media (hover: hover) {
    .bottom-user-menu > .fv-nav-item:hover {
        background: rgba(238,242,255,.9);
        transform: translateY(-1px);
        color: var(--fv-primary);
    }

    .bottom-user-menu > .fv-nav-item:hover svg * {
        stroke: var(--fv-primary);
    }
}

/* Active state: color + subtle bg, no dot */
.bottom-user-menu > .fv-nav-item.is-active {
    background: rgba(238,242,255,.95);
    color: var(--fv-primary);
}

.bottom-user-menu > .fv-nav-item.is-active svg * {
    stroke: var(--fv-primary);
}

/* Badge (FitVibe) */
.bottom-user-menu .fv-nav-badge {
    position: absolute;
    top: 6px;
    right: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    background: var(--fv-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(50,93,230,.25);
    border: 2px solid rgba(255,255,255,.95);
}
.bottom-user-menu img.no-image {
    border-radius: 50px;
}
.bottom-user-menu > .fv-nav-item:active {
    transform: translateY(0);
    background: rgba(225,232,254,.85);
    /* #E1E8FE vibe */
}

.basic-m-header .right-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fv-top-bell.fv-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(213,217,231,.8);
    box-shadow: 0 20px 50px rgba(15,23,42,0.08);
}




@media (max-width: 768px) {
    #fvBottomNav.bottom-user-menu {
        /* Auto height: content decides, safe-area adds below */
        height: auto;
        width: 100%;
        max-width: 100%;
        /* Content padding only — safe-area goes below content via ::after */
        padding: 10px 12px 4px 12px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 12px #0f172a0d;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        /* Stretch, not center — items fill height, content centered inside each item.
           Prevents vertical shift when padding/height recalculates during iOS scroll */
        align-items: stretch;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        /* visible, not hidden — prevents clipping during iOS Chrome repaint */
        overflow: visible;
        box-sizing: border-box;
        /* Stable GPU layer: backface-visibility is safer than translateZ(0) on iOS Chrome */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Safe-area spacer: rendered BELOW the flex items, not mixed into padding.
       This prevents env() recalculation from shifting content position. */
    #fvBottomNav.bottom-user-menu::after {
        content: '';
        display: block;
        width: 100%;
        height: env(safe-area-inset-bottom, 0px);
        flex-shrink: 0;
    }

    #fvBottomNav .fv-nav-item {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        padding: 4px 3px 2px 3px;
        border-radius: 18px;
        display: grid;
        justify-items: center;
        /* Reset base grid-auto-rows (was 30px 18px — too rigid for mobile,
           caused items to overflow the container and get clipped) */
        grid-auto-rows: auto;
        align-content: center;
        gap: 2px;
    }

    /* labels: controlled wrap ώστε να μην ανοίγει το nav πιο πλατύ από το viewport */
    #fvBottomNav .fv-nav-item > span {
        font-size: 11px;
        line-height: 13px;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
        max-width: 100%;
        display: block;
    }

    /* icons */
    #fvBottomNav .fv-nav-item svg, #fvBottomNav .fv-nav-item img {
        width: 20px;
        height: 20px;
    }

    /* fitcoins number να μη “φουσκώνει” */
    #fvBottomNav .showFitcoinPacket > span {
        font-variant-numeric: tabular-nums;
        letter-spacing: -.2px;
    }

    /* floating bell button */
    #fvBottomNav .fv-bottom-bell {
        position: absolute;
        right: 12px;
        top: -18px;
        width: 44px;
        height: 44px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid #d5d9e7cc;
        box-shadow: 0 18px 40px #0f172a1f;
        display: grid;
        place-items: center;
        padding: 0;
        cursor: pointer;
    }

    #fvBottomNav .fv-bottom-bell svg {
        width: 20px;
        height: 20px;
    }

    #fvBottomNav .fv-bottom-bell .fv-icon-btn__badge {
        position: absolute;
        top: 6px;
        right: 6px;
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        border-radius: 999px;
        font-size: 11px;
        line-height: 18px;
        background: #325DE6;
        color: #fff;
        box-shadow: 0 10px 22px #325de640;
        border: 2px solid #fffffff2;
    }

    /* Each item takes equal width so spacing is always even (3 or 5 items) */
    #fvBottomNav.bottom-user-menu > .fv-nav-item {
    }

    /* Prevent page content from hiding behind the fixed bottom nav */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}
