/* Concept Lab AI Solver: mobile viewport fix (Batch 3).
   Root cause: KaTeX display equations are `white-space: nowrap` and the page has `overflow-x: hidden`,
   so a wide equation was simply cut off with no way to swipe to the rest.
   Fix: every wide thing scrolls sideways INSIDE its own box; text wraps; the page itself never needs sideways scrolling. */

/* 1. Equations: swipe sideways inside the equation box */
.cl-eq {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.cl-eq .katex-display > .katex { display: block; width: max-content; min-width: 100%; }
.cl-eq::-webkit-scrollbar { height: 6px; }
.cl-eq::-webkit-scrollbar-thumb { background: var(--chip-border, rgba(255, 255, 255, 0.25)); border-radius: 6px; }

/* 2. Code blocks and tables (also covers answers that contain them): scroll inside, never stretch the page */
.cl-glass pre, .cl-glass .cl-code {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}
.cl-glass table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cl-glass img, .cl-glass svg, .cl-glass canvas { max-width: 100%; }

/* 3. Text and pills wrap naturally instead of running off the screen */
.cl-glass, .cl-glass li, .cl-glass p, .cl-glass h3 { min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.cl-tag { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }

/* Netlify automatic badge ko bypass karne ke liye */
iframe[src*="netlify"], 
div[class*="netlify"], 
#netlify-badge-outer, 
.netlify-badge,
#nl-badge-frame,
iframe#nl-badge-frame,
iframe[id*="nl-badge"],
iframe[data-nl-ready],
#nl-badge,
.nl-badge {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}
