/* Стили для нижнего меню */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* height: 60px; Явно задаем высоту для меню */
    /* background-color: #0D0D0D; */
    /* box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2); */
    z-index: 1000;
    box-sizing: border-box;
    padding: 6px 15px 0;
    transition: transform 0.24s ease, opacity 0.2s ease, visibility 0s linear 0s;
    will-change: transform;
    transform: translateY(0);
    opacity: 0;
    visibility: visible;
    /* height: 76px; */
}

.bottom-menu.fade{
    opacity: 1;
    /* transition: opacity 0.55s ease !important; */
}

.bottom-menu.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(130%);
    transition: transform 0.24s ease, opacity 0.2s ease, visibility 0s linear 0.24s;
}

.menu-item > svg{
    width: 24px;
    height: 24px;
}

.bottom-menu .menu-item > span{
        padding-top: 5px;
        font-size: 10px;
        font-weight: 600;
}

.menu-item-icon{
    fill: #727272;
    transition: fill 0.15s ease;
}

.active .menu-item-icon{
    fill: #3B82F6;
}

.row.g-0 {
    margin: 0;
    height: 100%;
    width: 100%;
    border-radius: 22px;
    background-color: #16181C;
    padding: 5px;
    /* border: 1px solid #16181C; */
    backdrop-filter: blur(12px);

    /* бекдроп с цветом  совмещенный*/
    background-color: #17191dD9;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    color: #8f8f8f;
    font-size: 11px;
    text-align: center;
    transition: all 0.15s ease;
    cursor: pointer; 
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Анимация для динамических вкладок проектов */
.menu-item.project-tab {
    animation: fadeInScale 0.25s ease-out;
    opacity: 1;
    transform: scale(1);
}

.menu-item.project-tab.removing {
    animation: fadeOutScale 0.25s ease-out;
    opacity: 0;
    transform: scale(0.8);
}

/* Анимация для кнопки "Проекты" администратора */
.menu-item.admin-projects-tab {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-item.admin-projects-tab.menu-item-appear {
    opacity: 1;
    transform: scale(1);
}

/* Стили для иконки проектов администратора */
.menu-item.admin-projects-tab .menu-item-icon {
    stroke: #727272;
    fill: none;
    transition: stroke 0.15s ease;
}

.menu-item.admin-projects-tab.active .menu-item-icon {
    stroke: #3B82F6;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

.menu-item i {
    font-size: 16px;
    margin-bottom: 2px;
}

.menu-item.active {
    color: #fff;
}

/* Анимация при нажатии */
.menu-item:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* Старые классы для background-image удалены, теперь используем inline SVG */

/* Адаптация для маленьких экранов */
@media (max-width: 360px) {
    .menu-item span {
        font-size: 10px;
    }
    
    .menu-item i {
        font-size: 14px;
    }
}

/* Адаптация для больших экранов */
@media (min-width: 600px) {
    .bottom-menu {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        padding-left: 0;
        padding-right: 0;
    }

    .bottom-menu.hidden {
        transform: translateX(-50%) translateY(130%);
    }
}

/* ─── Web mobile: меню парит над низом ─── */
body.has-web-top-bar:not(.web-desktop) .bottom-menu {
    bottom: 10px;
}

body.has-web-top-bar.ios-mobile-web:not(.web-desktop) .bottom-menu {
    bottom: 0;
}

/* Для широких экранов (≥600px) скрытое состояние использует translateX тоже */
@media (min-width: 600px) {
    body.has-web-top-bar:not(.web-desktop) .bottom-menu.hidden {
        transform: translateX(-50%) translateY(calc(100% + 10px));
    }
}

/* ─── Desktop sidebar (≥960px, без Telegram) ─── */
body.web-desktop .bottom-menu,
body.web-desktop .bottom-menu.hidden,
body.web-desktop .bottom-menu.fade {
    position: fixed !important;
    left: 0 !important;
    top: calc(15px + 46px) !important;
    bottom: 0 !important;
    right: auto !important;
    width: 200px !important;
    max-width: 200px !important;
    height: calc(100% - 46px) !important;
    padding: 12px 8px 20px !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 100 !important;
}

body.web-desktop .bottom-menu .row.g-0 {
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-radius: 0;
    background: transparent;
    padding: 4px 0;
    gap: 2px;
    backdrop-filter: none;
    /* Центрировать по вертикали */
    justify-content: center;
    align-content: center;
}

body.web-desktop .bottom-menu .menu-item {
    flex: 0 0 auto;   /* override Bootstrap .col flex:1 */
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    height: auto;
    transition: background 0.16s, color 0.16s;
}

body.web-desktop .bottom-menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.web-desktop .bottom-menu .menu-item > span {
    font-size: 13px;
    font-weight: 500;
    padding-top: 0;
}

body.web-desktop .bottom-menu .menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

body.web-desktop .bottom-menu .menu-item.active svg {
    fill: #fff;
    color: #fff;
}

body.web-desktop .bottom-menu .menu-item i {
    font-size: 18px;
    flex-shrink: 0;
    margin-bottom: 0;
}

body.web-desktop .bottom-menu .menu-item.active {
    background: #3f444c61;
    color: #fff;
}

body.web-desktop .bottom-menu .menu-item.active:hover {
    background: #3f444c85;
}

body.web-desktop .bottom-menu .menu-item:active {
    transform: none;
    opacity: 0.75;
}

/* Временно скрываем таб Pay */
.menu-item[data-page="aidpay"] {
    display: none !important;
}