/* Mobile App Bottom Navigation – sichtbar bei html.has-mobile-nav (App) */

:root {
    --mobile-nav-height: 56px;
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-mobile-nav, 850);
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

html.has-mobile-nav .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
}

/* Offener Chat: Nav ausblenden */
html.has-mobile-nav:has(.chat-area.mobile-active) .mobile-bottom-nav {
    display: none;
}

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

html.has-mobile-nav:has(.chat-area.mobile-active) body {
    padding-bottom: 0;
}

.mobile-bottom-nav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--mobile-touch-target, 44px);
    min-width: 0;
    padding: 6px 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast, 0.2s ease);
}

.mobile-bottom-nav__item:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.mobile-bottom-nav__item.is-active {
    color: var(--primary-color);
    font-weight: 600;
}

.mobile-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    position: relative;
}

.mobile-bottom-nav__icon .notification-badge,
.mobile-bottom-nav .mobile-nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff4757;
    color: #fff;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary, #fff);
    z-index: 1;
}

/* In der App: Nachrichten/Entdecken/Besucher nur Bottom-Nav (nicht Topbar) */
html.has-mobile-nav #messagesIcon,
html.has-mobile-nav #searchIcon,
html.has-mobile-nav #visitorsIcon {
    display: none !important;
}

.mobile-bottom-nav__icon svg,
.mobile-bottom-nav__svg {
    width: 22px;
    height: 22px;
    display: block;
}

.mobile-bottom-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
