/*
 * global.css — CPC Atlas Dashboard
 * Loaded by every page on atlas.charlestonpc.com.
 * Rule: all pages MUST render perfectly on mobile.
 */

/* ── Universal baseline ───────────────────────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;   /* prevent iOS font-size inflation on rotation */
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;               /* never show a horizontal scrollbar */
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

/* ── Responsive tables ────────────────────────────────────────────── */
/* Any bare <table> not already in a scroll wrapper gets one */
table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Touch targets ────────────────────────────────────────────────── */
/* Buttons and primary interactive elements must be at least 44px tall */
button,
input[type="submit"],
input[type="button"],
.btn,
.btn-primary,
.btn-ghost {
  min-height: 44px;
}

/* ── Common layout utilities ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Prevent any fixed-width element from breaking layout */
@media (max-width: 600px) {
  [style*="width:"] { max-width: 100% !important; }

  /* Ensure grids with large minmax don't overflow */
  [style*="minmax(560"] { grid-template-columns: 1fr !important; }
  [style*="minmax(480"] { grid-template-columns: 1fr !important; }
}
