/*
 * Shared component primitives — the design-system "component language".
 *
 * CANONICAL SOURCE. Consumed byte-identically by:
 *   - ops/upload/static/_components.css  (Flask static copy; kept in sync and
 *     guarded by config_drift.check_shared_components)
 *   - the ID-gate plugin, which links this file directly via assetBase
 *
 * Only truly shared, value-identical primitives live here. Surface-specific
 * rules (e.g. .ms-shell, .ms-eyebrow, .ms-footer-note, .ms-card responsive
 * padding, .ms-input[aria-invalid]) stay in each surface's own stylesheet.
 *
 * The error/radius custom properties referenced below (--ms-error,
 * --ms-error-surface, --ms-radius-input) are declared in each surface's own
 * :root; CSS resolves var() across the whole cascade, so load order is fine.
 *
 * Edit the theme copy first, then mirror verbatim to the upload copy.
 */

.ms-brand {
  display: flex;
  align-items: center;
  margin-bottom: var(--ms-space-5);
}

.ms-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.ms-alert {
  display: block;
  background: var(--ms-error-surface);
  border: 1px solid var(--ms-error);
  color: var(--ms-error);
  border-radius: var(--ms-radius-input);
  padding: 0.75rem 1rem;
  margin-bottom: var(--ms-space-4);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.ms-field {
  border: 0;
  padding: 0;
  margin: 0 0 var(--ms-space-4);
}

.ms-field-label {
  display: block;
  font-family: "Sora", "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ms-text-main);
  margin-bottom: var(--ms-space-1);
  letter-spacing: 0;
}

.ms-input {
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1rem;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--ms-text-main);
  background: #fff;
  border: 1px solid var(--ms-border-strong);
  border-radius: var(--ms-radius-input);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.ms-input::placeholder { color: var(--ms-text-muted); }

.ms-input:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--ms-primary);
  box-shadow: 0 0 0 4px var(--ms-focus);
}

.ms-btn-row {
  display: flex;
  flex-direction: column;
  gap: var(--ms-space-2);
  margin-top: var(--ms-space-5);
}

.ms-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--ms-radius-pill);
  padding: 0.875rem 1.5rem;
  min-height: 48px;
  font: inherit;
  font-family: "Sora", "Manrope", "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 80ms ease;
}

.ms-btn-primary {
  background: var(--ms-primary);
  color: #fff;
}

.ms-btn-primary:hover { background: var(--ms-primary-hover); }
.ms-btn-primary:active { transform: translateY(1px); }

.ms-btn:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 4px var(--ms-focus);
}

.ms-btn-ghost {
  background: transparent;
  color: var(--ms-text-body);
  border-color: transparent;
}

.ms-btn-ghost:hover { color: var(--ms-text-main); }
.ms-btn-ghost:active { transform: translateY(1px); }
