/* ==========================================================================
   Sticky bottom mobile bar + full-screen menu overlay.
   ========================================================================== */

.bb26-mobile-bar {
    display: none;
}

/* Mobile bar — только на телефонах ≤640px.
   На планшетах 641px+ показывается полноценная десктопная навигация GeneratePress. */
@media (max-width: 640px) {
    .bb26-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--bb-mobile-bar-height);
        background: var(--bb-panel);
        border-top: 1px solid var(--bb-border);
        box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
        z-index: 999;
        align-items: stretch;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .bb26-mobile-bar__btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 2px;
        border: 0;
        background: transparent;
        color: var(--bb-text-secondary);
        text-decoration: none;
        cursor: pointer;
        font-family: inherit;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.15;
        transition: color 0.15s var(--bb-ease), background 0.15s var(--bb-ease);
    }

    .bb26-mobile-bar__btn:hover,
    .bb26-mobile-bar__btn:active,
    .bb26-mobile-bar__btn[aria-expanded="true"] {
        color: var(--bb-text);
        background: var(--bb-bg);
    }

    .bb26-mobile-bar__btn--accent {
        position: relative;
        color: var(--bb-text);
    }

    /* Акцент-кнопка занимает ШИРЕ обычной — визуально «раздвигает» бар */
    .bb26-mobile-bar__btn--accent {
        flex: 1.25;
    }
    .bb26-mobile-bar__btn--accent .bb26-mobile-bar__icon {
        background: linear-gradient(135deg, var(--bb-accent) 0%, var(--bb-accent-dark) 100%);
        color: var(--bb-text);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px !important;
        /* Иконка поднята так, что верхняя её половина торчит над кромкой бара,
           нижняя — погружена в круглую выемку. Получается FAB. */
        margin-top: -32px;
        box-shadow: 0 6px 18px rgba(255,160,0,0.55),
                    0 2px 4px rgba(255,160,0,0.30);
        /* Тонкая белая обводка усиливает «отдельность» кнопки от бара */
        border: 3px solid #fff;
    }
    .bb26-mobile-bar__btn--accent .bb26-mobile-bar__label {
        /* Подпись под акцент-кнопкой — заметная, но не отвлекает от иконки */
        margin-top: 4px;
        font-weight: 700;
        color: var(--bb-accent-dark);
    }

    .bb26-mobile-bar__icon {
        font-size: 20px;
        line-height: 1;
    }

    .bb26-mobile-bar__label {
        font-size: 10px;
        white-space: nowrap;
    }
}

/* Full-screen menu overlay */

.bb26-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(26,32,44,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.bb26-mobile-menu[hidden] {
    display: none;
}

.bb26-mobile-menu__panel {
    position: relative;
    flex: 1;
    background: var(--bb-panel);
    overflow-y: auto;
    padding: 56px 24px calc(var(--bb-mobile-bar-height) + 24px);
    animation: bb26-slide-up 0.25s var(--bb-ease-out);
}

@keyframes bb26-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.bb26-mobile-menu__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--bb-bg);
    color: var(--bb-text);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bb26-mobile-menu__search {
    margin-bottom: 24px;
}

.bb26-mobile-menu__search-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bb-bg);
    border: 1px solid var(--bb-border);
    border-radius: 999px;
    color: var(--bb-text-secondary);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 22px;
    transition: all 0.15s var(--bb-ease);
}

.bb26-mobile-menu__search-trigger:hover {
    background: var(--bb-accent-soft);
    border-color: var(--bb-accent);
    color: var(--bb-text);
}

.bb26-mobile-menu__search-trigger > span[aria-hidden="true"] {
    font-size: 16px;
}

/* Mobile menu — иконная сетка по группам */

.bb26-mobile-menu__groups {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bb26-mobile-menu__group-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-left: 6px;
}

.bb26-mobile-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 col по умолчанию для длинных слов */
    gap: 8px;
}

@media (min-width: 480px) {
    .bb26-mobile-menu__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bb26-mobile-menu__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px;
    background: var(--bb-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-sm);
    color: var(--bb-text);
    text-decoration: none !important;
    background-image: none !important;
    transition: all 0.15s var(--bb-ease);
    text-align: center;
    min-height: 76px;
    justify-content: center;
}

.bb26-mobile-menu__tile:active,
.bb26-mobile-menu__tile:hover {
    background: var(--bb-accent-soft);
    border-color: var(--bb-accent);
    transform: translateY(-1px);
}

.bb26-mobile-menu__tile-icon {
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bb26-mobile-menu__tile-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--bb-text);
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

.bb26-mobile-menu__lang {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--bb-border);
    display: flex;
    gap: 12px;
}

.bb26-mobile-menu__lang ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
}

.bb26-mobile-menu__lang a {
    padding: 6px 14px;
    background: var(--bb-bg);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bb-text);
    text-decoration: none;
}

.bb26-mobile-menu__lang .current-lang a,
.bb26-mobile-menu__lang .lang-item-current a {
    background: var(--bb-accent);
}
