/* Mobile bottom nav — Avito/OLX-style. Replaces the legacy .mob_header
   which hijacked header elements via CSS order. Visible only on small
   screens. */

.bz-bottombar { display: none; }

@media (max-width: 768px) {
    /* Hide the legacy bottom bar so we don't get duplicates. */
    .mob_header { display: none !important; }

    /* Push body content up so fixed bar doesn't cover it. */
    body { padding-bottom: 68px; }

    .bz-bottombar {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom)) 4px;
        background: #ffffff;
        border-top: 1px solid #ececec;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
        z-index: 1000;
        font-family: inherit;
    }

    .bz-bottombar-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 2px 4px;
        color: #6b7280;
        text-decoration: none;
        font-size: 10.5px;
        line-height: 1.1;
        text-align: center;
        transition: color .15s ease;
    }

    .bz-bottombar-item:hover,
    .bz-bottombar-item:focus {
        color: #111827;
        text-decoration: none;
    }

    .bz-bottombar-item.is-active {
        color: #6f4ef2;
    }

    .bz-bottombar-item svg {
        width: 24px;
        height: 24px;
        min-width: 24px;
        flex: 0 0 24px;
        display: block;
    }

    .bz-bottombar-item span {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Center "+" button — elevated like Avito/OLX. */
    .bz-bottombar-add {
        flex: 1 1 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 0;
        text-decoration: none;
        margin-top: -18px;
    }

    .bz-bottombar-add:hover,
    .bz-bottombar-add:focus { text-decoration: none; }

    .bz-bottombar-add-circle {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #f7c12b;
        color: #1f2937;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 18px rgba(247, 193, 43, 0.45),
                    0 2px 6px rgba(0, 0, 0, 0.08);
        transition: transform .12s ease, box-shadow .12s ease;
    }

    .bz-bottombar-add:active .bz-bottombar-add-circle {
        transform: scale(0.96);
        box-shadow: 0 3px 10px rgba(247, 193, 43, 0.4);
    }

    .bz-bottombar-add-circle svg {
        width: 28px;
        height: 28px;
    }
}

/* Dark mode (system preference) */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .bz-bottombar {
        background: #1f2937;
        border-top-color: #374151;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
    }
    .bz-bottombar-item { color: #9ca3af; }
    .bz-bottombar-item:hover,
    .bz-bottombar-item:focus { color: #f3f4f6; }
    .bz-bottombar-item.is-active { color: #a78bfa; }
}
