/*
Theme Name: ISL Modern
Description: Eigenständiges ISL-Theme mit Standortübersicht, Baustellenkamera und Übernahme bestehender ACF-Inhalte.
Version: 1.6.6
Requires at least: 6.0
Requires PHP: 7.4
Author: ISL
Text Domain: isl-modern
License: GPL-2.0-or-later
*/

/*
 * Mobile editorial overflow fix (1.6.5)
 *
 * The mobile TOC uses a single CSS Grid track. A bare `1fr` has an automatic
 * minimum size, so the non-wrapping TOC chips can enlarge that track beyond
 * the viewport. Because the desktop rule also centers the tracks, the whole
 * TOC/content column can then extend to both sides and `.page-shell` clips it.
 *
 * Keep the grid track shrinkable and explicitly constrain the TOC/content
 * wrappers. Only the TOC list itself is allowed to scroll horizontally.
 */
@media (max-width: 1150px) {
  .page-content-grid.has-toc {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .page-content-grid,
  .page-toc,
  .page-toc nav,
  .page-toc ol,
  .page-main,
  .modern-prose {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .page-toc ol {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .page-toc li {
    flex: 0 0 auto;
    min-width: 0;
  }

  .page-main,
  .modern-prose,
  .modern-prose > * {
    max-width: 100%;
  }

  .modern-prose img,
  .modern-prose picture,
  .modern-prose video,
  .modern-prose iframe,
  .modern-prose canvas,
  .modern-prose svg {
    max-width: 100%;
  }

  .modern-prose table,
  .modern-prose pre {
    max-width: 100%;
    overflow-x: auto;
  }
}
