/**
 * MAXIMO-SEO — ui-p0-fixes.css
 * P0 fixes:
 *  G1.  Toolbar overflow at ≤900px — force flex-wrap
 *  G8.  Horizontal scroll bleed at 375px — overflow-x:hidden
 */

/* G1: Toolbar overflow fix — wrap toolbars at ≤900px */
@media (max-width: 900px) {
  .tool-header,
  .toolbar,
  .btn-row,
  [class*="toolbar"],
  [class*="tool-header"] {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }

  .tool-header > *,
  .toolbar > *,
  .btn-row > * {
    flex-wrap: wrap !important;
  }

  /* Tab toolbar rows */
  .tab-content .btn-row,
  .tab-content .toolbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* G8: Horizontal scroll bleed fix — comprehensive containment at ≤375px */
@media (max-width: 375px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .main-wrap,
  .tab-content,
  .tab-panel,
  [id$="-tab"],
  .tab-content > * {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Extra safety: any direct child of body that's a tab container */
  body > .main-wrap,
  body > .app-container,
  body > .app-content {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
}

/* Extra safety for all overflow containers */
.tab-content {
  overflow-x: hidden !important;
}
