/* Global CSS fixes for layout issues */

/* Prevent temporary/hidden iframes from causing scrollbars while keeping functional ones intact */
/* Only hide iframes that are explicitly hidden or have zero/minimal dimensions */
iframe[width="0"],
iframe[height="0"] {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

/* Ensure body doesn't get unexpected horizontal scrollbars from temporary elements */
body {
  overflow-x: hidden;
}

/* Remove default margins from validation error messages */
/* Target error messages specifically by color to avoid affecting all p elements */
p[style*="color: rgb(244, 67, 54)"],
p[style*="color:#f44336"] {
  margin-block-start: 0;
  margin-block-end: 0;
}