/**
 * Нижняя навигация приложения (по гайду: glass, скругление, индикатор).
 * Стиль: тёмная тема, акценты #77F601 / #C400FB, стекло, шрифт Benzin (из main.css).
 */

/* Единая страница приложения: скрытые вкладки не занимают место */
.app-shell .app-view[hidden] {
    display: none !important;
}

/* Отступ контента над фиксированной навигацией */
body.has-bottom-nav {
    padding-bottom: 80px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* Контейнер нижней навигации */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(10, 20, 40, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    border-radius: 100px;
    max-width: calc(100vw - 24px);
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Ссылка — кнопка навигации */
.bottom-nav .nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease, transform 0.2s ease;
    flex: 1;
    position: relative;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.bottom-nav .nav-btn:active {
    transform: scale(0.96);
}

/* Активная вкладка — акцент приложения */
.bottom-nav .nav-btn.active {
    color: #77F601;
}

.bottom-nav .nav-btn.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(119, 246, 1, 0.5));
}

/* Иконка */
.bottom-nav .nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.bottom-nav .nav-dems-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.bottom-nav .nav-icon--dems {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
}

.bottom-nav .nav-btn.active .nav-icon--dems {
    filter: drop-shadow(0 0 6px rgba(119, 246, 1, 0.45));
}

/* Стикер «new» — капсула, −7°, акцент #C400FB поверх зелёного active */
.bottom-nav .nav-btn--dems {
    gap: 0;
    justify-content: center;
}

.bottom-nav .nav-badge-new {
    position: absolute;
    top: -6px;
    right: -12px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: #C400FB;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    line-height: 1.15;
    transform: rotate(-7deg);
    box-shadow: 0 2px 8px rgba(196, 0, 251, 0.45);
    pointer-events: none;
    white-space: nowrap;
}

.bottom-nav .nav-label {
    white-space: nowrap;
}

/* Анимированный индикатор под активной кнопкой */
.bottom-nav .nav-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: calc(100% - 16px);
    background: rgba(119, 246, 1, 0.12);
    border-radius: 9999px; /* Идеальная капсула при любых размерах */
    z-index: -1;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Скрытие навигации на страницах админки (если случайно подключили) */
body.admin-page .bottom-nav {
    display: none;
}

/* Кнопки-ссылки внутри вкладок (переключение без перезагрузки) */
.knowledge-footer-link-btn,
.works-footer-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #77F601;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.knowledge-footer-link-btn:hover,
.works-footer-link-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}

/* Тестовая ссылка на LAB DEMO — только на главной вкладке */
.app-dev-footer {
    margin: 28px 0 8px;
    padding-bottom: 4px;
    text-align: center;
}

.app-dev-footer-link {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-dev-footer-link:hover {
    color: rgba(255, 255, 255, 0.65);
}

.app-dev-footer-sep {
    display: inline-block;
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
}
