/* SMC Outreach Mobile Responsive Styles v28 */

/* Mobile hamburger button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10001;
  background: #1a1a2e;
  border: 1px solid #00d4aa;
  color: #00d4aa;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

/* Tablet: <= 1024px */
@media (max-width: 1024px) {
  /* Make stat cards wrap */
  div[style*="display: flex"][style*="gap"] {
    flex-wrap: wrap !important;
  }
}

/* Mobile: <= 768px */
@media (max-width: 768px) {
  /* Show hamburger */
  .mobile-menu-btn {
    display: flex !important;
  }

  /* Sidebar: hidden by default, slide-in when open */
  div[style*="width: 180px"],
  div[style*="width:180px"] {
    position: fixed !important;
    left: -260px !important;
    top: 0 !important;
    width: 220px !important;
    height: 100vh !important;
    z-index: 10000 !important;
    transition: left 0.3s ease !important;
    overflow-y: auto !important;
  }
  div[style*="width: 180px"].sidebar-open,
  div[style*="width:180px"].sidebar-open {
    left: 0 !important;
  }

  /* Main content: full width */
  div[style*="margin-left: 180px"],
  div[style*="marginLeft: 180px"],
  div[style*="margin-left:180px"] {
    margin-left: 0 !important;
    padding: 60px 12px 20px 12px !important;
    width: 100% !important;
  }

  /* Stat cards: 2-column grid */
  div[style*="display: flex"][style*="gap"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* Stat card inner text smaller */
  div[style*="background: #1a1a2e"][style*="border-radius"] {
    padding: 10px !important;
    min-width: unset !important;
  }
  div[style*="background: #1a1a2e"] span[style*="font-size: 28px"],
  div[style*="background: #1a1a2e"] span[style*="fontSize: 28px"] {
    font-size: 20px !important;
  }

  /* Tables: horizontal scroll */
  table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  /* Buttons: responsive */
  button {
    font-size: 13px !important;
    padding: 8px 14px !important;
  }

  /* Quick action buttons wrap */
  div[style*="display: flex"][style*="gap: 10px"] {
    flex-wrap: wrap !important;
  }

  /* Modal dialogs: full width on mobile */
  div[style*="position: fixed"][style*="background: #0d1117"] {
    width: 95% !important;
    max-width: 95% !important;
    left: 2.5% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  /* Form inputs full width */
  input, select, textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  /* Charts container */
  div[style*="display: grid"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Throttle bar */
  div[style*="background: #1a1a2e"][style*="border-radius: 12px"][style*="padding: 20px"] {
    padding: 12px !important;
  }

  /* Pro banner */
  div[style*="display: flex"][style*="align-items: center"][style*="background: linear-gradient"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }

  /* Page title */
  h2[style*="font-size: 24px"] {
    font-size: 18px !important;
    padding-top: 10px !important;
  }

  /* Hide the sidebar upgrade card on mobile */
  div[style*="position: absolute"][style*="bottom: 80px"] {
    display: none !important;
  }
}

/* Small mobile: <= 480px */
@media (max-width: 480px) {
  /* Stat cards: single column */
  div[style*="display: flex"][style*="gap"] {
    grid-template-columns: 1fr !important;
  }

  /* Even smaller text */
  div[style*="background: #1a1a2e"] span[style*="font-size: 28px"],
  div[style*="background: #1a1a2e"] span[style*="fontSize: 28px"] {
    font-size: 18px !important;
  }

  /* Campaign cards stack */
  div[style*="display: grid"][style*="repeat(auto"] {
    grid-template-columns: 1fr !important;
  }
}
