/* Нижняя навигационная панель */
.bottom-nav {
    position: fixed;
    bottom: 20.12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90.25%;
    max-width: calc(100% - 24px);
    POST https://a39370027bd2fdf2-95-104-189-251.serveousercontent.com/api/chatter/custom?tgWebAppData=query_id%3DAAFNqfIDAwAAAE2p8gOBZz_5%26user%3D%257B%2522id%2522%253A6508685645%252C%2522first_name%2522%253A%2522hewotion%2522%252C%2522last_name%2522%253A%2522%2522%252C%2522username%2522%253A%2522hewotion%2522%252C%2522language_code%2522%253A%2522ru%2522%252C%2522allows_write_to_pm%2522%253Atrue%252C%2522photo_url%2522%253A%2522https%253A%255C%252F%255C%252Ft.me%255C%252Fi%255C%252Fuserpic%255C%252F320%255C%252FK8xDP5W2lzNmXqKQCnKkgdOKltHJBeZkmhP_gdEgdc-VY8JxEpSLhkOy2TWnHOMi.svg%2522%257D%26auth_date%3D1769241097%26signature%3DlzRgni1rZwAE0QOb4dpJOm-M8NGRQogYQVHT2-3x7t6bp_h21iimCvkMfxlgaR1aAnQ5Cu1mxQPNlNfBAZa8Aw%26hash%3D0f5ae5cf872a2ac5171f0be9728f77f7ae56a097da09d5f04c6e00528f3e5f88 500 (Internal Server Error)
    (anonymous) @ api.js?v=485d645a:833
    components.js?v=bfd7945e:141  Error: Ошибка создания кастома: local variable 'MediaType' referenced before assignment    background: rgba(43, 43, 45, 0.8); /* Полупрозрачный фон */
    backdrop-filter: blur(20px); /* Размытие фона (эффект iOS) */
    -webkit-backdrop-filter: blur(20px); /* Для Safari */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 0;
    z-index: 1000;
    border-radius: 42.75px;
    border: 1px solid rgba(40, 39, 45, 0.5); /* Полупрозрачная граница */
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 5px 3px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border-radius: 42.75px;
    margin: 0 3px;
    outline: none;
    border: 0.7px solid transparent;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    min-height: 56px;
    min-width: 0;
}

.bottom-nav-item:active {
    opacity: 0.8;
}

.bottom-nav-item.active {
    background: var(--bottom-nav-active-bg-color, #393a3f) !important;
    border-width: 0.7px !important;
    border-style: solid !important;
    border-color: var(--bottom-nav-active-border-color, #4e4e50) !important;
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bottom-nav-icon-color, var(--tg-theme-hint-color, #999999));
}

.bottom-nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    vertical-align: middle;
    fill: var(--bottom-nav-icon-color, var(--tg-theme-hint-color, #999999)) !important;
}

.bottom-nav-icon svg * {
    fill: var(--bottom-nav-icon-color, var(--tg-theme-hint-color, #999999)) !important;
}

.bottom-nav-icon:not(:has(svg)) {
    width: auto;
    height: auto;
}

.bottom-nav-item.active .bottom-nav-icon {
    opacity: 1;
    color: var(--bottom-nav-icon-color, var(--tg-theme-text-color, #000000));
}

.bottom-nav-item.active .bottom-nav-icon svg {
    fill: var(--bottom-nav-icon-color, var(--tg-theme-text-color, #000000)) !important;
}

.bottom-nav-item.active .bottom-nav-icon svg * {
    fill: var(--bottom-nav-icon-color, var(--tg-theme-text-color, #000000)) !important;
}

.bottom-nav-label {
    font-size: 12.35px;
    color: var(--bottom-nav-text-color, var(--tg-theme-hint-color, #999999));
    transition: color 0.2s;
    font-weight: 400;
    width: 100%;
    text-align: center;
}

/* Компактная нижняя панель для ПК (не touch устройств) */
@media (hover: hover) and (pointer: fine) {
    .bottom-nav {
        padding: 2.4px 0;
        bottom: 13px;
    }

    .bottom-nav-item {
        min-height: 50px;
        padding: 4px 3px;
    }

    .bottom-nav-icon {
        width: 21px;
        height: 21px;
        margin-bottom: 5px;
    }

    .bottom-nav-icon svg {
        width: 21px;
        height: 21px;
    }

    .bottom-nav-label {
        font-size: 12px;
    }
}

/* Стили для фильтров кастомов */
.customs-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0;
    border-radius: 12px;
    background: var(--customs-filters-bg-color, #2c2c2e);
    border: 1px solid var(--customs-filters-border-color, #28272d);
    align-items: center;
    min-height: calc(100% - 0.4px);
}

.customs-filter-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    margin: 2.77px 4px;
    margin-left: 0;
}

.customs-filter-item:active {
    opacity: 0.8;
}

.customs-filter-item.active {
    background: var(--customs-filter-active-bg-color, #393a3f);
    border-color: var(--customs-filter-active-border-color, #4e4e50);
}

.customs-filter-item:first-child {
    margin-left: 4px;
}

.customs-filter-item:last-child {
    margin-right: 4px;
}

.customs-filter-label {
    font-size: 13px;
    color: var(--customs-filter-text-color, var(--tg-theme-hint-color, #999999));
    transition: color 0.2s;
    font-weight: 400;
    text-align: center;
}

.customs-filter-item.active .customs-filter-label {
    color: var(--customs-filter-text-color, var(--tg-theme-text-color, #000000));
    font-weight: 500;
}

.quick-media-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0;
    border-radius: 12px;
    background: var(--customs-filters-bg-color, #2c2c2e);
    border: 1px solid var(--customs-filters-border-color, #28272d);
    align-items: center;
    min-height: calc(100% - 0.4px);
}

/* Стили для фильтров ТЗ (контент-менеджер) - копируем стили из customs-filters */
.tz-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0;
    border-radius: 12px;
    background: var(--customs-filters-bg-color, #2c2c2e);
    border: 1px solid var(--customs-filters-border-color, #28272d);
}

/* Стили для карточек функций - убираем outline при фокусе на Android */
.feature-card {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.feature-card:focus {
    outline: none !important;
    box-shadow: none !important;
}

.feature-card:active {
    outline: none !important;
}

/* Стили для переключателей (сегментированный контрол) - убираем обводку на Android */
.segmented-control-item {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: none !important;
}

.segmented-control-item:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
}

.segmented-control-item:active {
    outline: none !important;
    box-shadow: none !important;
}

.segmented-control-item:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Убираем обводку для всех кнопок на Android */
button {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

button:focus {
    outline: none !important;
    box-shadow: none !important;
}

button:active {
    outline: none !important;
}

button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
