/* App-style fixed bottom tab bar — quiet monochrome, 3D active depth */
:root {
    --app-nav-height: 58px;
}

body.has-app-bottom-nav {
    padding-bottom: calc(var(--app-nav-height) + 12px + env(safe-area-inset-bottom, 0px));
}

.app-bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(430px, calc(100% - 20px));
    z-index: 9990;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    min-height: var(--app-nav-height);
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 12, 12, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    perspective: 600px;
}

@media (min-width: 768px) {
    .app-bottom-nav {
        display: none;
    }
}

.app-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
    text-decoration: none;
    border: none;
    background: none;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.3s ease, transform 0.45s var(--ease-expo);
    position: relative;
    transform-style: preserve-3d;
}

.app-bottom-nav__item i {
    font-size: 1.14rem;
    line-height: 1;
    transition: transform 0.5s var(--ease-expo), color 0.3s ease;
    transform-style: preserve-3d;
}

/* hover — icon leans toward you in 3D */
.app-bottom-nav__item:hover i {
    transform: translateY(-2px) rotateX(12deg);
}

/* press — pushes into the glass */
.app-bottom-nav__item:active {
    transform: scale(0.92) translateZ(-8px);
}

/* ACTIVE — the tab rises out of the bar */
.app-bottom-nav__item.active {
    color: var(--text);
    transform: translateY(-4px);
}

.app-bottom-nav__item.active i {
    transform: rotateX(16deg) translateZ(10px);
    filter: drop-shadow(0 6px 10px rgba(255, 255, 255, 0.12));
}

/* soft light pool under the raised active tab */
.app-bottom-nav__item.active::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1), transparent 70%);
    pointer-events: none;
}

/* active marker — a single quiet dot beneath the icon */
.app-bottom-nav__item.active::after {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text);
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.brand-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .app-bottom-nav__item,
    .app-bottom-nav__item i {
        transition: none !important;
        transform: none !important;
    }
}
