/* ============================================================
   Merge 2026-11-17: re-checked against Claude's redesign; removed selectors that no longer exist
   (.omnia-simple-grid, .sp-page-hero) and the doubled 88px bottom padding.
   MOBILEFIX 2026-11-17 — CSS-only layout repairs for /webapps/omnia/
   Keep this file separate from Claude's redesign of
   index.html / omnia.css / omnia.js / advanced-tools.js.
   Re-merge by leaving this stylesheet linked after omnia.css.
   ============================================================ */

/* Stop the page shifting off the left edge. */
html,body{max-width:100%;overflow-x:clip}
.omnia-reader-grid,
.omnia-toolbar,
.omnia-search-row,
.omnia-file-row,
.omnia-intro,
.omnia-screen,
.sp-content-wrap,
#main-content{max-width:100%;box-sizing:border-box;min-width:0}
h1,.omnia-screen-heading{
  overflow-wrap:anywhere;
  max-width:100%;
  scroll-margin-top:96px;
}

/* Stack the PDF reader and the text/find column on phones. */
@media (max-width:900px){
  .omnia-reader-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:16px!important;
  }
  .omnia-reader-side{position:static!important;width:100%!important;max-width:100%!important}
}

/* Find text: full-width field, not a sliver; 44px control. */
.omnia-search-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:8px;
  width:100%;
  max-width:100%;
  align-items:stretch;
}
.omnia-search-row input,
#omnia-find{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
  min-height:44px!important;
  box-sizing:border-box;
}
.omnia-search-row button,
#omnia-find-go{
  flex:0 0 auto!important;
  min-height:44px!important;
  min-width:44px;
  padding-inline:14px;
  white-space:nowrap;
}

/* Buttons wrap on an even grid, not a ragged pile. */
.omnia-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.omnia-toolbar button,
.omnia-toolbar select,
.omnia-toolbar input,
.omnia-file-row button,
.omnia-file-button{
  min-height:44px;
  box-sizing:border-box;
}

/* Stray bar under panels + huge empty gap above the footer.
   Often a 100vw element or an oversized bottom spacer for the tab bar. */
.omnia-reader,
.omnia-reader-side,
.omnia-pane{box-shadow:none}
body.sp-v2.sp-tool-page #main-content>.sp-content-wrap{
  padding-bottom:24px!important;
  margin-bottom:0!important;
  min-height:0!important;
}
.omnia-screen{padding-bottom:16px!important;min-height:0}
@media (max-width:700px){
  /* Merge 2026-11-17: Claude's layout already pads body.omnia-ui for the bottom bar, so 88px here doubled the gap above the footer. */
  body.sp-v2.sp-tool-page #main-content>.sp-content-wrap{padding-bottom:16px!important}
  body.sp-v2.sp-tool-page .omnia-tabs{
    width:100%!important;
    max-width:100%!important;
    left:0;right:0;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box;
  }
}

/* Footer links on the tool page were tiny. */
body.sp-tool-page .sp-site-footer a,
body.sp-tool-page .sp-footer-links a{
  font-size:1rem!important;
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
body.sp-tool-page .sp-site-footer{margin-top:24px!important}
