/* --- 1. Стилизация элементов списка и вложенности --- */
#kbSidebarMobile .list-group-item-action:hover,
#kbSidebarMobile .list-group-item-action:active {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--secondary) !important;
    opacity: 1 !important;
}

#kbSidebarMobile .border-start {
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
}

#kbSidebarMobile .bi-folder2-open {
    color: rgba(136, 211, 206, 0.9) !important;
}

/* --- 2. Анимация стрелочек (chevron) --- */
#kbSidebarMobile .chevron-arrow {
    transition: transform 0.2s;
}

#kbSidebarMobile [aria-expanded="true"] .chevron-arrow {
    transform: rotate(180deg);
}

/* --- 3. Общие настройки Offcanvas и интерактивных элементов --- */
#kbSidebarMobile .offcanvas-body {
    padding: 1rem 0.75rem;
}

/* Убираем стандартные контуры и тени Bootstrap при фокусе/нажатии */
button:focus, a:focus,
.list-group-item:focus,
.list-group-item-action:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* --- 4. Кнопка "Развернуть/Свернуть" (Simple Toggle) --- */
.simple-toggle-btn {
    background: transparent !important;
    border: none !important;
    opacity: 0.8;
    color: #dee2e6 !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    padding: 0;
}

.simple-toggle-btn:hover {
    opacity: 1;
    color: #fff !important; /* Чисто белый при наведении */
    transform: scale(1.1); /* Легкое увеличение для интерактивности */
}

.simple-toggle-btn:active {
    transform: scale(0.9);
}

/* Специфичная настройка для мобильной кнопки рядом с заголовком */
#mobileToggleBtn {
    margin-top: 2px;
}

/* --- 5. Вспомогательные классы --- */
.opacity-50 {
    opacity: 0.4 !important;
}


/* --- Фиксированная нижняя навигация --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(26, 26, 26, 0.85); /* Темный фон с прозрачностью */
    backdrop-filter: blur(15px); /* Эффект матового стекла */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: env(safe-area-inset-bottom); /* Поддержка iPhone с челкой */
}

.nav-container {
    height: 64px;
}

/* Стилизация "кнопки-поиска" */
.search-placeholder-btn {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Кнопка каталога в стиле приложения */
.btn-catalog-mobile {
    background: #fff;
    color: #000 !important;
    border: none;
    border-radius: 14px;
    height: 44px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;

    /* Убираем все переходы, которые могут давать эффект мигания */
    transition: transform 0.1s ease-in-out;

    /* Убираем стандартные тени Bootstrap */
    box-shadow: none !important;
    outline: none !important;
}

.btn-catalog-mobile:active {
    transform: scale(0.96);
}

.btn-catalog-mobile i {
    font-size: 1.2rem;
}

/* Чтобы контент страницы не перекрывался панелью */
body {
    padding-bottom: 80px;
}

.btn-catalog-mobile:active,
.btn-catalog-mobile:focus {
    background: #fff !important;
    color: #000 !important;
    transform: scale(0.96);
    box-shadow: none !important;
}

.accordion-item {
    scroll-margin-top: 60px;
}

/* Подсветка выбранного вопроса в мобильном каталоге */
#kbSidebarMobile .list-group-item.active-topic {
    background-color: rgba(136, 211, 206, 0.15) !important; /* Твой фирменный цвет с прозрачностью */
    color: #88d3ce !important;
    border-left: 3px solid #88d3ce !important; /* Акцентная линия слева */
    font-weight: 600;
}

/* Контейнер-копия старой кнопки */
.search-input-wrapper {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.2s ease;
}

/* Иконка */
.search-input-wrapper i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Сам инпут - делаем его невидимым внутри обертки */
.kb-input-field {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #fff !important;
    font-size: 0.9rem;
    width: 100%;
    padding: 0 !important;
    height: 100%;
}

.kb-input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Эффект при клике на всё поле */
.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(136, 211, 206, 0.3);
}
