/* 
  mobile.css - SEMA GRUPO 
  Dedicated styles for screens <= 768px
*/

/* Reset basic layout for mobile */
body {
    overflow-y: auto; /* Allow body scrolling if app-container isn't fixed */
    height: auto;
}

.app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
}

/* Hide Sidebar elements and transform to Bottom Nav */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: 70px;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    z-index: 9999;
    justify-content: space-around;
}

.sidebar-header, .sidebar-groups, .sidebar-footer {
    display: none !important;
}

.sidebar nav {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 0;
    justify-content: space-around;
    align-items: center;
}

.sidebar nav button {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    justify-content: center;
    border-radius: 0;
    font-size: 0.65rem;
    text-align: center;
    color: var(--text-dim);
}

.sidebar nav button i {
    font-size: 1.2rem;
}

.sidebar nav button span {
    display: block;
}

.sidebar nav button.active {
    background: transparent;
    color: var(--primary);
}

/* Main Content Adjustments */
main {
    padding: 15px;
    padding-top: 80px; /* Space for mobile-top-bar */
    padding-bottom: 90px; /* Space for bottom nav */
    height: auto;
    overflow: visible;
}

.tab-content {
    animation: none;
}

.content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.content-header h1 {
    font-size: 1.3rem;
}

/* Mobile Top Bar Styles */
.mobile-top-bar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 9998;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.mobile-top-bar h1 {
    font-size: 1rem;
    font-weight: 700;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon-only {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
}

.btn-icon-only:hover {
    color: var(--danger);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.status-dot.conectado { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.status-dot.desconectado { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.status-dot.aguardando { background: #ffc107; box-shadow: 0 0 10px #ffc107; }

/* Grid Stacking */
.stats-dashboard {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.grid-2 {
    grid-template-columns: 1fr !important;
}

.offers-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
}

/* Modals Optimization */
.modal-content {
    width: 95% !important;
    padding: 20px !important;
    border-radius: 16px !important;
}

.modal-actions {
    flex-direction: column;
}

.modal-actions button {
    width: 100%;
}

/* Category Pills on mobile */
.category-filters-container {
    top: 65px;
    padding: 15px 0;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.category-pills {
    width: 100%;
}

/* Overlays (Login/License) */
.login-box, .license-box {
    width: 90% !important;
    padding: 30px !important;
}

/* Form Helper Classes */
.group-selection-list {
    grid-template-columns: 1fr !important;
}
