/* design-system.css
   Global design tokens and overrides extracted from Variant A prototype.
   Loaded early in root.tsx links() — after Google Fonts, before component CSS.
   These styles complement the Mantine theme in app/theme.ts.
*/

/* ── CSS Custom Properties ── */
:root {
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, monospace;
  --shadow-overlay: 0 24px 80px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.1);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Font Smoothing ── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13.5px;
  line-height: 1.5;
}

/* ── Input & Select Sizing ── */
.mantine-TextInput-input,
.mantine-Select-input,
.mantine-NumberInput-input,
.mantine-DatePickerInput-input,
.mantine-Combobox-input,
.mantine-InputBase-input,
.mantine-PasswordInput-input {
  height: 34px !important;
  min-height: 34px !important;
  font-size: 13px !important;
}

/* ── Textarea ── */
.mantine-Textarea-input {
  font-size: 13px !important;
  min-height: 60px !important;
}

/* ── Form Labels ── */
.mantine-InputWrapper-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--mantine-color-gray-6) !important;
  margin-bottom: 3px !important;
}

/* ── Focus Ring — blue outline from prototype ── */
.mantine-Input-input:focus,
.mantine-TextInput-input:focus,
.mantine-Select-input:focus,
.mantine-NumberInput-input:focus,
.mantine-Textarea-input:focus,
.mantine-DatePickerInput-input:focus,
.mantine-Combobox-input:focus,
.mantine-PasswordInput-input:focus {
  border-color: var(--mantine-color-blue-5) !important;
  box-shadow: 0 0 0 2px rgba(0, 99, 255, 0.12) !important;
}

/* ── Primary Button Shadow ── */
.mantine-Button-root[data-variant="filled"] {
  box-shadow: 0 1px 3px rgba(0, 99, 255, 0.3);
  transition: all var(--transition);
}
.mantine-Button-root[data-variant="filled"]:hover {
  box-shadow: 0 2px 6px rgba(0, 99, 255, 0.35);
}

/* ── Modal Backdrop Blur ── */
.mantine-Modal-overlay {
  backdrop-filter: blur(4px) !important;
}

/* ── Modal Content Shadow ── */
.mantine-Modal-content {
  box-shadow: var(--shadow-overlay) !important;
}

/* ── List View Tabs ──
   Slim 1px gray underline beneath the bar; the active tab keeps its 2px
   primary-color indicator. Mantine 8 renders the underline as a ::before
   pseudo-element with a 1px-on-all-sides border (= 2px tall). We replace
   that border with a flat 1px background to get a true 1px hairline. */
.list-view-tabs > .mantine-Tabs-list::before {
  border: none !important;
  height: 1px !important;
  background-color: light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4)) !important;
}
/* Dark: the same hairline Mantine draws under every other Tabs.List
   (dark-4, brand-tinted) — a fixed gray-2 stayed a bright white line. */
[data-mantine-color-scheme="dark"] .list-view-tabs > .mantine-Tabs-list::before {
  background-color: var(--mantine-color-dark-4) !important;
}
