/* ============================================================
   MATSPELL — MOBILE
   Bottom tab bar + responsive overrides
   ============================================================ */

@media (max-width: 767px) {

  /* Hide desktop sidebar */
  #sidebar {
    display: none !important;
  }

  /* Full width main on mobile */
  .main {
    margin-left: 0 !important;
    padding-bottom: var(--bottom-tab-height);
  }

  /* Today Strip / Dashboard Grid: stack columns vertically */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  /* Pipeline: vertical list instead of kanban */
  .kanban {
    flex-direction: column !important;
    overflow-x: visible !important;
  }
  .kanban-column {
    width: 100% !important;
  }

  /* Drawers: bottom sheet modal on mobile */
  .drawer {
    width: 100% !important;
    height: 90vh !important;
    top: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    animation: mobile-drawer-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes mobile-drawer-slide-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

  /* Modals: bottom align container on mobile */
  .modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal > form, .modal-content {
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    max-height: 90vh !important;
  }

  /* Content: decrease padding */
  .content { padding: var(--space-4) !important; }
  .top-strip { padding: 0 var(--space-4) !important; }

  /* Touch targets: minimum 44px (T03 fix) */
  .nav-item,
  .btn,
  .bottom-tab-item {
    min-height: 44px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   BOTTOM TAB BAR (T01 fix — mobile navigation)
   ══════════════════════════════════════════════════════════ */

.bottom-tab-bar, .bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-tab-height);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  z-index: var(--z-bottom-tab);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}

@media (max-width: 767px) {
  .bottom-tab-bar, .bottom-tabs {
    display: flex !important;
    align-items: stretch;
    justify-content: space-around;
  }
}

.bottom-tab-item, .bottom-tabs a, .bottom-tabs span {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: var(--space-2) var(--space-1) !important;
  color: var(--color-text-muted) !important;
  text-decoration: none !important;
  font-size: 9px !important;
  font-weight: var(--font-weight-medium) !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  min-height: 44px !important;
  transition: color 0.15s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

.bottom-tab-item.active, .bottom-tabs a.active, .bottom-tabs span.active {
  color: var(--color-primary) !important;
}

.bottom-tab-item:hover, .bottom-tabs a:hover {
  color: var(--color-text) !important;
}

.bottom-tab-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.bottom-tab-label {
  font-size: 9px;
  font-weight: var(--font-weight-medium);
  text-align: center;
}
