/* ============================
   Нижняя панель навигации (мобильная)
   ============================ */

.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(28, 28, 30, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 8px 4px 10px 4px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 4px 12px;
    color: #8e8e93;
    font-family: inherit;
    font-size: 12px;
    min-width: 64px;
    transition: color 0.15s;
}

.nav-item.active {
    color: #3390ec;
}

.nav-item svg {
    stroke: #8e8e93;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.nav-item.active svg {
    stroke: #3390ec;
}

.nav-icon-wrapper {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    font-size: 11px;
    margin-top: 2px;
}

/* FAB-кнопка "+" */
.fab-btn {
    display: flex;
    position: fixed;
    bottom: 110px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3390ec;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 110;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s, opacity 0.15s;
}

.fab-btn:active {
    transform: scale(0.95);
}

.fab-btn.hidden {
    display: none;
}

/* Выпадающее меню в шапке чата */
.header-dropdown {
    display: none;
    position: absolute;
    top: 56px;
    right: 16px;
    background: #1c1c1e;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 200;
    min-width: 250px;
    overflow: hidden;
}

.header-dropdown.visible {
    display: block;
}

.header-dropdown-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
}

.header-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-dropdown-item.danger {
    color: #e53935;
}

/* Вертикальная панель навигации (ПК) */
.nav-desktop {
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
    padding: 12px 8px;
    flex-shrink: 0;
}

.nav-desktop .nav-item {
    width: 100%;
    border-radius: 12px;
    transition: background 0.15s;
    padding: 8px 4px;
}

.nav-desktop .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-desktop .nav-spacer {
    flex: 1;
}

.nav-desktop .profile-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3390ec, #50c1e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 17px;
    margin: 0 auto 4px auto;
}

/* Выпадающее меню на главном экране (⋮) */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 56px;
    right: 16px;
    background: #1c1c1e;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 200;
    min-width: 180px;
    overflow: hidden;
}

.dropdown-menu.visible {
    display: block;
}

.dropdown-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #ffffff;
}

.dropdown-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Статус-бар (онлайн/оффлайн) */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
}

.status-dot.offline {
    background: #8e8e93;
}

.status-text {
    font-size: 15px;
    color: #8e8e93;
}

/* Строка поиска в мобильной версии */
.search-container {
    padding: 8px 16px 12px 16px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    background: #2c2c2e;
    color: #ffffff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.search-input::placeholder {
    color: #8e8e93;
}

/* Кнопки в шапке чата */
.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--tg-accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Адаптивность */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }

    .fab-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
}
