/* public/assets/ui/framework/17_overflow_guards.css
   KomodUI Overflow Guards v0.1
   Goal: remove horizontal scroll sources (tables, long strings, flex/grid children).
*/

/* Global: never allow layout to exceed viewport width */
html, body {
  max-width: 100%;
  overflow-x: hidden; /* safety net */
}

/* Critical: flex/grid children must be allowed to shrink */
.container,
.header-inner,
.header-center-area,
.header-controls,
.grid,
[class*="grid"],
[class*="row"],
[class*="col"] {
  min-width: 0;
}

/* Long text / urls should wrap instead of pushing layout */
a, p, span, div, li, td, th, .text, .content, .card, .pp-text-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Code/pre often causes overflow */
pre, code, kbd, samp {
  max-width: 100%;
  overflow-x: auto;
}

/* Generic "scroll container" helper */
.scroll-x {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* TABLES: safest default (many old tables are wide) */
table {
  max-width: 100%;
}

.table-wrap,
.table-responsive,
.pp-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent images/videos from overflowing */
img, video, iframe {
  max-width: 100%;
}

/* Inputs can overflow inside flex */
input, select, textarea {
  max-width: 100%;
}

/* Prevent fixed widths from causing overflow in mobile */
@media (max-width: 576px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  /* if any legacy element has huge min-width, this helps */
  .header-search,
  .search-form,
  .search-input-wrapper {
    min-width: 0;
  }
}  