/* ==============================================================
   Mobile Specific Styles (max-width: 768px)
============================================================== */

/* Prevent horizontal scroll issues */
html, body {
    overflow-x: hidden !important;
    width: 100%;
}

/* Fix top navbar on mobile (prevent horizontal overflow) */
.top-nav-container {
    flex-wrap: wrap;
    justify-content: space-between;
}
.nav-links {
    display: none; /* Hide for now until bottom nav is added */
}
.nav-logo {
    font-size: 1.2rem;
}

/* Fix dashboard grid for mobile */
.dashboard-grid {
    grid-template-columns: 1fr 1fr !important;
    padding: 10px;
    gap: 15px;
}

/* Modal Overrides for Mobile */
#modal-content, .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
}
.modal-overlay {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}
.modal-header { 
    border-radius: 0 !important; 
    padding: 10px 15px !important;
}

/* Chat Mobile Paradigm (Messenger Style) */
.modal-body.chat-modal-body {
    display: flex !important;
    flex-direction: column !important;
}
.mobile-chat-back-btn { 
    display: inline-block !important; 
}
.chat-container { 
    flex: 1 !important;
    height: auto !important;
    min-height: 0 !important; 
}
.chat-sidebar { 
    flex: 1; 
    width: 100%; 
    border: none; 
}
.chat-main { 
    display: none; 
    flex: 1; 
    width: 100%; 
}

/* When user selects a chat on mobile */
.chat-container.mobile-chat-active .chat-sidebar {
    display: none !important;
}
.chat-container.mobile-chat-active .chat-main {
    display: flex !important;
}
