/* MAXW1N — mobile shell (wallet bar, bottom nav, safe areas) */
:root {
    --mw-bottom-nav-h: 58px;
    --mw-wallet-bar-h: 52px;
}

.tg-float {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 80;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0088cc;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(0, 136, 204, 0.35);
}

.tg-float i {
    font-size: 32px;
    color: #fff !important;
}

.mw-mobile-wallet-bar {
    display: none;
}

.mw-bottom-nav {
    display: none;
}

.mw-drawer-account {
    padding: 12px 16px !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.35;
}

.mw-drawer-account strong {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mw-drawer-account span {
    font-size: 12px;
    opacity: 0.75;
}

@media (max-width: 768px) {
    :root {
        --mw-header-h: 60px;
    }

    #mainNav.mw-header {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        overflow: hidden;
    }

    .mw-header-inner {
        padding: 0 14px !important;
        gap: 8px;
        min-width: 0;
    }

    .mw-header-logo {
        min-width: 0;
        flex: 1;
    }

    .mw-header-logo .logo-top {
        height: 34px !important;
        max-height: 34px;
        max-width: 132px;
        width: auto;
        object-fit: contain;
    }

    .mw-header-actions {
        gap: 8px;
        min-width: 0;
    }

    .mw-header-desktop-only {
        display: none !important;
    }

    #mainNav .mw-burger,
    #mainNav .burger-btn {
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        flex-shrink: 0;
        border-radius: 12px !important;
    }

    .footer-bar {
        display: none !important;
    }

    .mw-mobile-wallet-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--mw-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
        height: var(--mw-wallet-bar-h);
        padding: 0;
        z-index: 90;
        background: rgba(12, 15, 22, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(12px);
    }

    .mw-mobile-wallet-bar__inner {
        height: var(--mw-wallet-bar-h);
        padding: 8px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .mw-mobile-wallet-bar__balance {
        display: flex;
        align-items: baseline;
        gap: 8px;
        min-width: 0;
        flex: 1;
        text-decoration: none !important;
        color: inherit !important;
    }

    .mw-mobile-wallet-bar__amount {
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .mw-mobile-wallet-bar__currency {
        font-size: 10px;
        font-weight: 700;
        color: #ffb347;
        text-transform: uppercase;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mw-mobile-wallet-bar__deposit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        height: 36px;
        padding: 0 14px;
        border-radius: 10px;
        background: linear-gradient(135deg, #3d7cff 0%, #6b5cff 100%);
        color: #fff !important;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .mw-bottom-nav {
        display: grid;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 91;
        height: calc(var(--mw-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        grid-template-columns: repeat(5, 1fr);
        background: rgba(10, 13, 20, 0.98);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mw-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-width: 0;
        padding: 0 2px;
        font-size: 9px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.55);
        text-decoration: none;
        text-align: center;
        line-height: 1.15;
    }

    .mw-bottom-nav a span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mw-bottom-nav a i {
        font-size: 16px;
    }

    .mw-bottom-nav a.is-active {
        color: #3d7cff;
    }

    body.mw-mobile-shell {
        padding-bottom: calc(var(--mw-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    }

    body.mw-mobile-shell.is-auth {
        padding-bottom: calc(var(--mw-bottom-nav-h) + var(--mw-wallet-bar-h) + env(safe-area-inset-bottom, 0px));
    }

    .tg-float {
        right: 16px;
        width: 52px;
        height: 52px;
        bottom: calc(var(--mw-bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
    }

    body.mw-mobile-shell.is-auth .tg-float {
        bottom: calc(var(--mw-bottom-nav-h) + var(--mw-wallet-bar-h) + 16px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 430px) {
    .mw-mobile-wallet-bar__deposit {
        padding: 0 12px;
        font-size: 11px;
    }

    .mw-mobile-wallet-bar__amount {
        max-width: 96px;
        font-size: 15px;
    }
}

@media (min-width: 769px) {
    .mw-mobile-wallet-bar,
    .mw-bottom-nav {
        display: none !important;
    }
}
