﻿@media all and (max-width: 769px) {
    /* ===== Base Nav Bar ===== */
    .bottom-nav {
        position: fixed;
        left: 50%;
        bottom: env(safe-area-inset-bottom, 0);
        transform: translateX(-50%);
        width: 100%;
        max-width: 100%;
        height: 80px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(14px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-around;
        align-items: center;
        transition: all 0.4s ease;
        transform-origin: bottom;
        animation: popUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        z-index: 900;
        padding: 0px 0 calc(env(safe-area-inset-bottom, 0) + 0px);
    }

    /* انیمیشن ورود از پایین */
    @keyframes popUp {
        0% {
            transform: translate(-50%, 100%) scale(0.95);
            opacity: 0;
        }

        60% {
            transform: translate(-50%, -3%) scale(1.02);
            opacity: 1;
        }

        100% {
            transform: translate(-50%, 0) scale(1);
            opacity: 1;
        }
    }

    /* پنهان شدن هنگام اسکرول */
    .bottom-nav.hidden {
        transform: translate(-50%, 120%) scale(0.98);
        opacity: 0;
    }

    .bottom-nav .bottom-btn {
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: #555;
        text-decoration: none;
        transition: all 0.25s ease;
    }

        .bottom-nav .bottom-btn i {
            display: block;
            font-size: 22px;
            margin-bottom: 4px;
            margin: auto;
            padding-bottom: 5px;
        }

    .bottom-nav .fab i {
        padding-bottom: 0;
    }

    .bottom-nav .bottom-btn.active {
        color: var(--color-light-red);
    }

    .bottom-nav .bottom-btn:active {
        transform: scale(0.95);
    }


    .bottom-nav .center-btn {
        position: relative;
        top: -25px;
        flex: 0 0 70px;
        text-align: center;
    }

    .bottom-nav .fab {
        width: 58px;
        height: 58px;
        background: linear-gradient(135deg, #ea5648, #cf0000);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: auto;
        color: white;
        font-size: 26px;
        box-shadow: 0 6px 16px rgba(234, 86, 72, 0.3);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

        .bottom-nav .fab:active {
            transform: scale(0.92);
            box-shadow: 0 2px 8px rgba(234, 86, 72, 0.2);
        }

    .bottom-nav .bottom-btn .icon {
        font-size: 22px;
        margin-bottom: 4px;
        font-style: normal;
    }

    .taktalk {
        background: none;
        width: 37px;
        height: 43px;
        filter: invert(35%) sepia(2%) saturate(0%) hue-rotate(180deg) brightness(95%) contrast(90%);
    }

    #toggle_chat {
        margin-bottom: 5px;
        position: relative;
    }

    #toggle_counter_chat {
        position: absolute;
        top: -4px;
        right: 20px;
        background: #cf0000;
        color: white;
        font-size: 11px;
        font-weight: bolder;
        min-width: 16px;
        height: 16px;
        padding: 0 5px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 16;
        box-shadow: 0 0 0 2px #fff;
    }
}

@media all and (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

/* نسخه تاریک */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(25, 25, 25, 0.7);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

        .bottom-nav .bottom-btn {
            color: #ccc;
        }

            .bottom-nav .bottom-btn.active {
                color: var(--color-light-red);
            }
}
