/* Syrma Quote — design-system polish layer (U1).
   Utilities live in Tailwind (CDN); this file carries what utilities can't:
   focus rings, HTMX loading states, motion discipline, table/print niceties. */

/* Typography: Inter is linked in the page <head>; tables fall back cleanly. */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Keyboard focus — always visible, brand-tinted, never removed. */
:focus-visible {
  outline: 2px solid #04b3b6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Interactive affordance */
button, [role="button"], a, select, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

/* Smooth micro-interactions (150-200ms), disabled for reduced-motion users. */
a, button, input, select, textarea, tr, .transition-soft {
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* HTMX loading states: anything with .htmx-indicator shows only while a request
   from its element is in flight; requesting elements get a subtle busy dim. */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }
/* BOTH HALVES OF THIS USED TO MATCH NOTHING, so no submit button in the application
   could ever show a busy state -- the protection was written, shipped, and was inert
   everywhere. `grep -rn 'type="submit"' app/templates/` returns ZERO hits tree-wide
   (buttons in a form submit by default and nobody writes the attribute), so the first
   selector had nothing to hit; and htmx puts .htmx-request on the element that MADE the
   request -- for a form that is the <form>, not the button inside it -- so the second one
   missed too. `form.htmx-request button` is the case that was missing. Worst instance:
   "Send for scrubbing" (_eng_scrub.html:121) blocks for up to 60 seconds with no feedback
   at all, so people press it again. Found 2026-09-08. */
form.htmx-request button, button.htmx-request { opacity: .6; pointer-events: none; }

.spin {
  width: 14px; height: 14px; border-radius: 9999px;
  border: 2px solid rgba(4, 179, 182, .3); border-top-color: #04b3b6;
  animation: sq-spin .7s linear infinite; vertical-align: -2px;
}
@keyframes sq-spin { to { transform: rotate(360deg); } }

/* Data tables: calmer default, hover affordance on row-links. */
table { border-collapse: collapse; }
tbody tr:hover { background-color: rgba(4, 179, 182, .045); }
thead th { font-weight: 500; }

/* Monospace for part numbers / money — used via class="mpn" on cells. */
.mpn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; letter-spacing: -0.01em; }

/* Print: the customer quote and any page print without app chrome. */
@media print {
  aside, .no-print, .htmx-indicator { display: none !important; }
  main { padding: 0 !important; }
  body { background: #fff !important; }
}
