/*
 * Mobile overflow hardening for production pages that were built before the
 * latest responsive TSX changes. Keep this file CSS-only so it can be deployed
 * safely while the ICOMMA frontend build pipeline is unavailable on the host.
 */
@media (max-width: 768px) {
  html,
  body,
  #root {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #root,
  #root * {
    box-sizing: border-box;
  }

  #root > *,
  main,
  section,
  article,
  aside,
  header,
  footer,
  form,
  nav {
    min-width: 0;
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  a,
  label,
  span,
  small,
  strong,
  button,
  input,
  select,
  textarea,
  div {
    overflow-wrap: anywhere;
  }

  img,
  video,
  canvas,
  svg,
  iframe {
    max-width: 100%;
  }

  input,
  select,
  textarea,
  button {
    min-width: 0;
  }

  .fixed,
  .absolute,
  [role="dialog"] {
    max-width: 100vw;
  }

  .overflow-x-auto,
  [class*="overflow-x-auto"] {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  table {
    max-width: 100%;
  }

  [class*="min-w-["],
  [class*="w-["] {
    max-width: 100%;
  }

  [class*="grid"],
  [class*="flex"] {
    min-width: 0;
  }

  [class*="space-x-"] {
    max-width: 100%;
  }

  [class*="rounded-3xl"],
  [class*="rounded-["] {
    max-width: calc(100vw - 16px);
  }

  .line-clamp-1,
  .line-clamp-2,
  .line-clamp-3 {
    word-break: break-word;
  }
}
