/* Global overflow + wrapping utilities to prevent UI overflow */

/* Wrap long words/URLs in bubbles, logs, code blocks */
.text-wrap,
.wrap,
.bubble,
pre,
code,
.log,
.panel,
.card,
.guardian,
.assistant,
.chat-msg {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Make scrollable containers opt-in and consistent */
.scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.no-overflow { overflow: hidden; }

/* Prevent flex children from overflowing due to min-content */
.container, .app-container, .app-main, .responsive-split, .grid, .row {
  min-width: 0;
}

/* Code blocks: wrap and limit height */
pre, code { white-space: pre-wrap; }
.code-scroll { max-height: 50vh; overflow: auto; }

/* Media elements scale to container */
img, canvas, iframe, video { max-width: 100%; height: auto; display: block; }

/* Standard panel container */
.panel { background: var(--card-bg); border:1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* Utility chips and inputs should not grow beyond container */
button, input, select { min-width: 0; max-width: 100%; }

/* Guardian/Assistant bubbles */
.guardian, .assistant { contain: layout paint size; }

