/* Э0 (T-16): эталон «нижнее меню» specialty_v2 по паспорту docs/design/blocks/mobile-bottom-nav.json.
   Мобайл (до 640 px, кадр 320): пункты 40x40, промежуток 16; планшет (640-1279, кадр 640): пункт - иконка 32x16 и подпись 10/10, промежутки по ширине.
   От 1280 px блок скрыт. Активный пункт - --text-black (решение владельца 23.10), остальные - --text-dark-grey. */
.sp-bn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: 48px;
    padding: 4px 28px;
    border-radius: var(--radius-0);
    color: var(--text-black);
    background: var(--bg-white);
}

.sp-bn--fixed {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-bottom-nav);
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--stroke-grey-light);
}

.sp-bn__item {
    box-sizing: border-box;
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-0);
    color: var(--text-dark-grey);
    font: var(--font-tab-sm);
    text-decoration: none;
}

.sp-bn__item.is-active {
    color: var(--text-black);
}

.sp-bn__item:is(:hover, .is-hover) {
    color: var(--color-main-hover);
}

.sp-bn__item:focus-visible {
    outline: 2px solid var(--stroke-focused);
    outline-offset: 0;
    border-radius: var(--radius-sm);
}

.sp-bn__item[aria-disabled="true"] {
    color: var(--stroke-grey-dark);
    pointer-events: none;
}

.sp-bn__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sp-bn__label {
    white-space: nowrap;
}

.sp-bn__counter {
    position: absolute;
    top: -4px;
    right: -10px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    color: var(--text-white);
    background: var(--color-main);
    font: var(--font-btn-xs);
}

@media (min-width: 640px) {
    .sp-bn {
        gap: 0;
        padding: 8px 32px 10px;
    }

    .sp-bn__item {
        gap: 4px;
        width: auto;
        height: 30px;
        font: var(--font-tab-md);
    }

    .sp-bn__icon {
        width: 32px;
        height: 16px;
    }

    .sp-bn__icon .sp-icon {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 1280px) {
    .sp-bn {
        display: none;
    }
}
