/* ============================================================================
   Select-Arc Portal — Steelworks (Direction B) design tokens.
   Ported verbatim from Planning/Select-Arc Portal (standalone).html.
   Tailwind utilities are loaded via the Play CDN in App.razor; this file holds
   the brand token layer, component classes, fonts, and motion.
   ============================================================================ */

/* ------- shared brand tokens ------- */
:root {
  --brand: #0B5CA8;
  --brand-dark: #084A8A;
}

/* ------- Steelworks (Direction B) tokens ------- */
[data-v="b"] {
  --r-xl: 8px; --r-lg: 6px; --r-md: 5px; --r-sm: 4px;   /* tight, industrial radii */
  --shadow-card: 0 1px 2px rgb(15 23 42 / .06);          /* flat shadow */
  --bg-page: #F2F4F7;
}

html, body { margin: 0; }
.sa-root {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.f-display { font-family: 'Barlow Condensed', sans-serif; }
.f-mono { font-family: 'JetBrains Mono', monospace; }

/* ------- shared component classes ------- */
.card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: var(--r-lg, 12px);
  box-shadow: var(--shadow-card, 0 1px 2px rgb(15 23 42 / .05));
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-md, 10px);
  transition: background-color .15s ease, transform .1s ease;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.input {
  border: 1px solid #CBD5E1;
  border-radius: var(--r-md, 10px);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(11 92 168 / .22);
}
.input-error {
  border-color: #f87171 !important;
  background: #fef2f2 !important;
  color: #b91c1c;
}

/* ------- scrollbars ------- */
.sa-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.sa-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.sa-scroll::-webkit-scrollbar-track { background: transparent; }

/* ------- motion ------- */
@keyframes sa-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes sa-slide-in-left { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes sa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sa-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.sa-sheet { animation: sa-slide-in .28s cubic-bezier(.22,1,.36,1); }
.sa-drawer { animation: sa-slide-in-left .28s cubic-bezier(.22,1,.36,1); }
.sa-back { animation: sa-fade .2s ease; }
.sa-pop { animation: sa-pop .25s ease both; }
@media (prefers-reduced-motion: reduce) {
  .sa-sheet, .sa-drawer, .sa-back, .sa-pop { animation: none !important; }
  * { transition: none !important; }
}

input[type="date"] { min-height: 2.65rem; }

/* Blazor error UI */
.blazor-error-boundary {
  background: #b91c1c; padding: 1rem; color: #fff; border-radius: var(--r-md);
}
#blazor-error-ui {
  color-scheme: light only;
  background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
  display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
