/* ── GlixCRM UX baseline 1.0.0 (ui-ux-pro-max priorities 1–2, 7–8 + Web Interface Guidelines) ──
   Touch targets ≥44px on touch screens (desktop layout unchanged), no iOS zoom on focus, busy/invalid
   states, focusable error summary, skip link, contained scrolling in overlays, reduced motion. */
.glx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.glx-skip {
  position: fixed; left: 12px; top: 12px; z-index: 100000; transform: translateY(-160%);
  padding: 10px 16px; border-radius: 999px; background: #111; color: #fff !important; font-weight: 600; text-decoration: none !important;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}
.glx-skip:focus, .glx-skip:focus-visible { transform: none; outline: 2px solid #fff; outline-offset: 2px; }
html.mvx-ui [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
html.mvx-ui :is(a, button, [role="button"], .btn, label, summary, select, input[type="checkbox"], input[type="radio"]) { touch-action: manipulation; }
html.mvx-ui [aria-busy="true"], html.mvx-ui .glx-busy { cursor: progress; }
html.mvx-ui .glx-busy { opacity: .7; pointer-events: none; }
html.mvx-ui [aria-invalid="true"]:not(:focus) { border-color: var(--glx-danger, var(--ui-danger, #d0312d)) !important; }
html.mvx-ui .glx-errsum {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; outline: none;
  background: color-mix(in srgb, var(--glx-danger, #d0312d) 8%, transparent); border: 1px solid color-mix(in srgb, var(--glx-danger, #d0312d) 35%, transparent);
}
html.mvx-ui .glx-errsum:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--glx-danger, #d0312d) 30%, transparent); }
html.mvx-ui .glx-errsum-h { margin: 0 0 6px; font-weight: 600; color: var(--glx-danger, #d0312d); }
html.mvx-ui .glx-errsum ul { margin: 0; padding-left: 18px; }
html.mvx-ui .glx-errsum a { color: inherit; text-decoration: underline; }
html.mvx-ui :is(.modal-body, .dropdown-menu, [class*="drawer-body"], [class*="-drawer"] .panel-body, .table-responsive) { overscroll-behavior: contain; }

@media (pointer: coarse) {
  /* Comfortable targets: real size where the layout allows it… */
  html.mvx-ui :is(.btn:not(.btn-xs):not(.btn-sm), .nav-tabs > li > a, .nav-pills > li > a, .pagination > li > a, .pagination > li > span, .list-group-item) { min-height: 44px; }
  html.mvx-ui .btn:not(.btn-xs):not(.btn-sm):not(.btn-block):not(.dropdown-toggle) { display: inline-flex; align-items: center; justify-content: center; }
  html.mvx-ui :is(.nav-tabs > li > a, .nav-pills > li > a) { display: flex; align-items: center; }
  html.mvx-ui .dropdown-menu > li > a { padding-top: 11px; padding-bottom: 11px; }
  /* …and an invisible 44px hit area around small controls (layout unchanged). */
  html.mvx-ui :is(.glx-hit, .btn-xs, .btn-sm, .btn-icon, input[type="checkbox"], input[type="radio"]) { position: relative; }
  html.mvx-ui :is(.glx-hit, .btn-xs, .btn-sm, .btn-icon)::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
  /* 16px text in fields stops iOS zooming the page on focus. */
  html.mvx-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .form-control) { font-size: max(16px, 1em); }
}
@media (prefers-reduced-motion: reduce) {
  /* Transitions and smooth scrolling off; looping loaders keep spinning so progress stays visible. */
  html.mvx-ui *, html.mvx-ui *::before, html.mvx-ui *::after { transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .glx-skip { transition: none; }
}
