/* css/mobile.css - Мобильная адаптация */

/* ========== МОБИЛЬНАЯ КНОПКА МЕНЮ ========== */
/*.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: #0052cc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: #0065ff;
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}


.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}*/

/* ========== МОБИЛЬНЫЕ СТИЛИ ========== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
        width: 220px;
        padding: 14px 10px;
        position: fixed;
        height: 100%;
        z-index: 300;
    }
    
    .message {
        max-width: 85%;
    }
    
    .header h2 {
        font-size: 17px;
    }
    .mobile-menu-toggle {
        display: block;
    }
    
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .file-image-wrapper img {
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
    }
    .sidebar {
        display: none;
        width: 220px;
        padding: 14px 10px;
        position: fixed;
        height: 100%;
        z-index: 300;
    }
    .sidebar.open {
        transform: translateX(0);
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .file-attachment img {
        margin: 2px 5px 0 0;
    }
    .search-results {
        width: 90%;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .file-image-wrapper img {
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
    }
    .sidebar {
        display: none;
        width: 220px;
        padding: 14px 10px;
        position: fixed;
        height: 100%;
        z-index: 300;
    }
    .sidebar.open {
        transform: translateX(0);
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .file-attachment img {
        margin: 2px 5px 0 0;
    }
    .search-results {
        width: 90%;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .file-image-wrapper img {
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
    }
    .sidebar {
        display: none;
        width: 220px;
        padding: 14px 10px;
        position: fixed;
        height: 100%;
        z-index: 300;
    }
    .sidebar.open {
        transform: translateX(0);
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .file-attachment img {
        margin: 2px 5px 0 0;
    }
    .search-results {
        width: 90%;
    }
}

/* Тёмная тема для мобильных (опционально) */
@media (prefers-color-scheme: dark) and (max-width: 768px) {

    .file-image-wrapper img {
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
    }

    .sidebar {
        display: none;
        width: 220px;
        padding: 14px 10px;
        position: fixed;
        height: 100%;
        z-index: 300;
    }
    .sidebar.open {
        transform: translateX(0);
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .file-attachment img {
        margin: 2px 5px 0 0;
    }
    .search-results {
        width: 90%;
    }
}