/* Mobil alt navigasyon — yalnızca ≤1024px */

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

@media (max-width: 1024px) {
    :root {
        --mobile-nav-height: 64px;
    }

    .mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100vw;
        z-index: 1200;
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        background-color: var(--surface-800);
        border-top: 1px solid rgba(var(--primary), 0.12);
        box-sizing: border-box;
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        isolation: isolate;
        pointer-events: auto;
        margin: 0;
        visibility: visible;
        opacity: 1;
        transition:
            transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.28s ease,
            visibility 0s linear 0s;
    }

    button.mobile-nav__item {
        border: none;
        background: none;
        font-family: inherit;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    body.sidebar-open .mobile-bottom-nav,
    body.chat-open .mobile-bottom-nav {
        transform: translate3d(0, calc(100% + env(safe-area-inset-bottom, 0px)), 0);
        -webkit-transform: translate3d(0, calc(100% + env(safe-area-inset-bottom, 0px)), 0);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.28s ease,
            visibility 0s linear 0.32s;
    }

    .mobile-bottom-nav::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: var(--surface-800);
        z-index: -1;
        pointer-events: none;
    }

    .mobile-bottom-nav::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: -12px;
        height: 12px;
        background: linear-gradient(to top, rgba(5, 5, 5, 0.35), transparent);
        pointer-events: none;
    }

    .mobile-nav__item {
        position: relative;
        z-index: 1;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        padding: 4px 2px;
        color: var(--text-gray);
        text-decoration: none;
        font-size: 0.58rem;
        font-weight: 600;
        line-height: 1.15;
        text-align: center;
        border-radius: 10px;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .mobile-nav__item i {
        font-size: 22px;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .mobile-nav__item span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav__item--home i {
        font-size: 24px;
    }

    .mobile-nav__item:hover,
    .mobile-nav__item:focus-visible {
        color: var(--text-secondary);
        outline: none;
    }

    .mobile-nav__item.is-active {
        color: var(--brand-red);
        background: rgba(var(--primary), 0.06);
    }

    .mobile-nav__item.is-active i {
        color: var(--brand-red);
    }
}

@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
