#bdgg-mobile-bottom-nav,
#bdgg-mobile-bottom-nav * {
    box-sizing: border-box;
}

#bdgg-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: block;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bdgg-mbn-bg, #fff);
    border-top: 2px solid #f5b400;
    border-radius: 17px 17px 0 0;
    box-shadow: 0 -5px 24px rgba(15, 23, 42, 0.10);
    -webkit-tap-highlight-color: transparent;
}

body.bdgg-mbn-active {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}

/*
 * BD Game Ghor Android app only.
 * The app exposes window.AndroidApp (the same marker used by BDGG App Banner).
 * The WebView already keeps the page above the Android system-navigation area,
 * so do not add a second safe-area inset for the normal/gesture-navigation case.
 * Chrome and normal browsers never receive this class and keep the default rule.
 */
body.bdgg-mbn-android-app #bdgg-mobile-bottom-nav {
    padding-bottom: 2px !important;
}

body.bdgg-mbn-active.bdgg-mbn-android-app {
    padding-bottom: 74px !important;
}

/*
 * App + unusually large bottom inset (the tested 3-button-navigation case):
 * keep the tuned 8px breathing space instead of the full reported inset.
 */
body.bdgg-mbn-android-app.bdgg-mbn-app-large-inset #bdgg-mobile-bottom-nav {
    padding-bottom: 8px !important;
}

body.bdgg-mbn-active.bdgg-mbn-android-app.bdgg-mbn-app-large-inset {
    padding-bottom: 80px !important;
}

.bdgg-mbn-inner {
    min-height: 68px;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 760px;
    margin: 0 auto;
    padding: 5px 5px 3px;
}

.bdgg-mbn-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 60px;
    padding: 6px 2px 3px;
    color: var(--bdgg-mbn-text, #667085);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    line-height: 1.1;
    font-weight: 500;
    text-align: center;
    transition: color .18s ease, transform .18s ease;
}

.bdgg-mbn-item:hover,
.bdgg-mbn-item:focus,
.bdgg-mbn-item:active,
.bdgg-mbn-item.is-active {
    color: var(--bdgg-mbn-active, #111);
    text-decoration: none !important;
}

.bdgg-mbn-icon-wrap {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.bdgg-mbn-icon-wrap svg {
    display: block;
    width: 26px;
    height: 26px;
}

.bdgg-mbn-icon-wrap .dashicons {
    display: block;
    width: 26px;
    height: 26px;
    font-size: 26px;
    line-height: 26px;
}

.bdgg-mbn-avatar {
    width: 28px !important;
    height: 28px !important;
    max-width: none !important;
    border-radius: 999px !important;
    object-fit: cover;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid currentColor;
}

.bdgg-mbn-initial-avatar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.bdgg-mbn-label {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 26px;
    padding: 0 1px;
    line-height: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*
 * Reserve the same two-line label area for every menu item. This keeps all
 * icons on one horizontal line even when Reward Points / Refer & Earn wrap.
 */
.bdgg-mbn-item-points .bdgg-mbn-label,
.bdgg-mbn-item-refer .bdgg-mbn-label {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bdgg-mbn-item.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 22px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 99px;
    background: #f5b400;
    opacity: 1;
}

/* Optional raised/featured style */
.bdgg-mbn-item.is-featured {
    padding-top: 0;
}

.bdgg-mbn-item.is-featured .bdgg-mbn-icon-wrap {
    width: 60px;
    height: 60px;
    margin-top: -30px;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    border: 4px solid var(--bdgg-mbn-bg, #fff);
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}

.bdgg-mbn-item.is-featured .bdgg-mbn-icon-wrap svg {
    width: 30px;
    height: 30px;
}

.bdgg-mbn-item.is-featured .bdgg-mbn-label {
    margin-top: 0;
    font-weight: 500;
}

.bdgg-mbn-item.is-featured.is-active::after {
    display: none;
}

.bdgg-mbn-item-add_money.is-featured:not(.is-active) .bdgg-mbn-label {
    color: var(--bdgg-mbn-text, #667085);
}

.bdgg-mbn-item-add_money.is-featured.is-active .bdgg-mbn-label {
    color: var(--bdgg-mbn-active, #111);
}

@media (max-width: 389px) {
    .bdgg-mbn-inner {
        min-height: 66px;
        padding-left: 2px;
        padding-right: 2px;
    }
    .bdgg-mbn-item {
        min-height: 58px;
        font-size: 10.4px;
        gap: 2px;
        padding-left: 1px;
        padding-right: 1px;
    }
    .bdgg-mbn-label {
        height: 24px;
        line-height: 12px;
    }
    .bdgg-mbn-icon-wrap,
    .bdgg-mbn-icon-wrap svg,
    .bdgg-mbn-icon-wrap .dashicons {
        width: 24px;
        height: 24px;
        font-size: 24px;
        line-height: 24px;
    }
    .bdgg-mbn-avatar {
        width: 25px !important;
        height: 25px !important;
    }
}
