/* Мобильная версия: стили из sidebar.css (экраны уже десктопа) */

/* ── Mobile: sidebar as slide-in drawer ── */
@media (max-width: 768px) {
    /* Restore natural body padding - sidebar is overlaid, not static */
    body {
        padding-left: 8px !important;
        transition: none;
    }

    /* Sidebar slides in from the left */
    #sidebarDrawer {
        top: 0;
        left: 0;
        width: 288px;
        max-width: 86vw;
        height: 100%;
        border-radius: 0 20px 20px 0;
        border-left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #sidebarDrawer.open {
        transform: translateX(0);
        box-shadow: 6px 0 40px rgba(0, 0, 0, 0.25);
    }

    /* Overlay управляется через JS (openSidebar/closeSidebar),
       а не через постоянный display:block. Это предотвращает ситуацию,
       когда полноэкранный position:fixed элемент висит в DOM всегда
       и может перехватывать touch-события на iOS. */

    /* Show close button, hide collapse button */
    .sidebar-collapse-btn {
        display: none !important;
    }

    .sidebar-close-btn {
        display: flex !important;
    }

    /* Hamburger button visible on mobile */
    .hamburger-btn {
        display: flex !important;
    }

    /* Show sidebar notification section on mobile */
    .sidebar-notify-section {
        display: block;
    }

    /* пункты чуть крупнее - под палец */
    .sidebar-nav-item, .sidebar-notify-btn { min-height: 46px; }
    .sidebar-nav-item.active::before { left: -10px; }
}
