/* ==============================================
   MOBILE-SIDEBAR.CSS - Стили только для мобильной шторки
   ============================================== */

/* МОБИЛЬНАЯ ВЕРСИЯ (Шторка 210px) */
@media (max-width: 768px) {
    .container {
        position: relative;
    }
    
    /* Сайдбар становится мобильной шторкой */
    .sidebar {
        position: fixed;
        left: -210px !important; /* СКРЫТА по умолчанию, !important для приоритета */
        top: 0;
        height: 100%;
        width: 210px !important; /* Ширина мобильной шторки */
        z-index: 10000;
        transition: left 0.3s ease !important;
        box-shadow: 2px 0 20px var(--shadow-color);
    }

    /* Класс для открытия шторки */
    .sidebar.mobile-open {
        left: 0 !important; /* ПОКАЗЫВАЕТСЯ при открытии */
    }

    /* Показываем кнопку меню в сайдбаре на мобильных */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Показываем кнопку меню в хедере на мобильных */
    .mobile-menu-toggle {
        display: block !important;
    }

    .main-content {
        width: 100%;
    }

    /* Оверлей для закрытия шторки */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Адаптируем контент под мобильную ширину */
    .sidebar-header {
        padding: 0.75rem !important;
    }
    
    .sidebar-header h2 {
        font-size: 1.1rem !important;
    }
    
    .sidebar-tabs-container {
        padding: 0 0.75rem !important;
    }
    
    .sidebar-tab {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.8rem !important;
        min-height: 45px !important;
    }
    
    .tab-create-btn {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem !important;
        margin: 0.75rem auto !important;
        width: calc(100% - 1.5rem) !important;
    }
    
    .zayavki-list {
        padding: 0.75rem !important;
    }
    
    .zayavka-item {
        padding: 0.6rem !important;
        gap: 0.5rem !important;
    }
    
    .zayavka-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
    }
    
    .zayavka-title {
        font-size: 0.9rem !important;
    }
    
    .zayavka-description {
        font-size: 0.75rem !important;
    }

    .zayavka-detail {
        padding: 1rem !important;
    }

    .form-container {
        margin: 1rem !important;
        padding: 1.5rem !important;
    }

    .form-actions {
        flex-direction: column !important;
    }

    .btn {
        width: 100% !important;
        padding: 0.6rem 1rem !important;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-secondary);
        padding: 0.75rem !important;
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (< 480px) */
@media (max-width: 480px) {
    .sidebar {
        width: 85% !important; /* Ширина 85% от экрана */
        left: -85% !important; /* СКРЫТА за экраном на -85% */
    }

    .sidebar.mobile-open {
        left: 0 !important; /* При открытии показывается */
    }

    /* Адаптируем элементы под очень маленький экран */
    .sidebar-tab {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.15rem !important;
        min-height: 40px !important;
    }

    .modal-content {
        width: 95% !important;
        margin: 0.5rem !important;
    }
    
    .tab-create-btn {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
    
    .sidebar-header {
        padding: 0.5rem !important;
    }
    
    .sidebar-header h2 {
        font-size: 1rem !important;
    }
    
    .zayavka-item {
        padding: 0.5rem !important;
        gap: 0.4rem !important;
    }
    
    .zayavka-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
    
    .zayavka-title {
        font-size: 0.85rem !important;
    }
    
    .zayavka-description {
        font-size: 0.7rem !important;
    }
    
    .zayavka-status {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
}