/* Torkzt · layout.css — стили каркаса, вынесенные из инлайнового <style> в head.php.
 *
 * Здесь только то, что реально работает. Правила тёмной темы, лежавшие в том же
 * блоке закомментированными, переехали в /assets/css/dark-theme.css — файл не
 * подключён и ждёт возврата темы.
 */

body {
    background: #eff2f7;
}

.svg-icon {
    fill: #0a58ca;
    transition: fill .3s;
}

/* ─────────────────────────── боковое меню ─────────────────────────── */

.nav-item-custom {
    margin: 8px 0;
    padding: 1px;
}

.nav-link-custom {
    cursor: pointer;
}

.active-link {
    color: #000;
}

/* ───────────────────── нижняя навигация (мобильная) ───────────────────── */

.modern-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, .06);
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
    transition: transform .3s ease-in-out;
}

/* прячется при скролле вниз — см. /assets/js/bottom-nav.js */
.modern-bottom-nav.nav-hidden {
    transform: translateY(100%);
}

.modern-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #a0a0a0;
    padding: 8px 16px;
    border-radius: 16px;
    transition: .3s cubic-bezier(.25, .8, .25, 1);
    -webkit-tap-highlight-color: transparent;
}

.modern-nav-item:hover {
    color: #777;
}

.modern-nav-item.active {
    color: #4a90e2;
}

.modern-nav-item svg {
    width: 24px;
    height: 24px;
    transition: transform .3s cubic-bezier(.175, .885, .32, 1.275);
}

.modern-nav-item.active svg {
    transform: scale(1.15);
}

.modern-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 12px;
    border: 2px solid #fff;
    line-height: 1;
    transform: translate(30%, -30%);
    box-shadow: 0 3px 8px rgba(229, 57, 53, .35);
}

/* ─────────────────────────── тост нового ЛС ─────────────────────────── */

#newMsgToast {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 10800;
    max-width: 340px;
}

@media (max-width: 768px) {
    /* поднимаем над нижней навигацией, иначе тост ложится прямо на неё */
    #newMsgToast {
        right: 10px;
        left: 10px;
        max-width: none;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-bottom-nav,
    .modern-nav-item,
    .modern-nav-item svg {
        transition: none;
    }
}
