/**
 * @file
 * Design tokens shared by all IMTM components.
 */

:root {
  /* Brand colours. */
  --imtm-color-blue: #83c5d5;
  --imtm-color-blue-light: #daeff4;
  --imtm-color-blue-pale: #e0edf0;
  --imtm-color-blue-accent: #66c6de;
  --imtm-color-teal: #61b4c2;
  --imtm-color-darkblue: #003853;
  --imtm-color-red: #ef3125;
  --imtm-color-darkred: #8b0800;

  /* Neutrals. */
  --imtm-color-white: #fff;
  --imtm-color-black: #000;
  --imtm-color-text: #565658;
  --imtm-color-text-muted: #808080;
  --imtm-color-text-light: #9a999e;
  --imtm-color-gray-100: #8d8d8e;
  --imtm-color-gray-75: #a7a7a9;
  --imtm-color-gray-50: #c2c2c4;
  --imtm-color-gray-25: #ddd;
  --imtm-color-surface: #eee;
  --imtm-color-surface-alt: #f1f1f1;
  --imtm-color-surface-light: #f7f7f7;
  --imtm-color-surface-lighter: #fdfdfd;
  --imtm-color-border: #e5e6e0;
  --imtm-color-border-strong: #ccc;
  --imtm-color-focus: rgba(13, 110, 253, 0.25);

  /* Status colours. */
  --imtm-color-success: #198754;
  --imtm-color-success-bg: #d1e7dd;
  --imtm-color-success-text: #0f5132;
  --imtm-color-success-border: #badbcc;
  --imtm-color-warning-bg: #fff3cd;
  --imtm-color-warning-text: #664d03;
  --imtm-color-warning-border: #ffecb5;
  --imtm-color-danger: #dc3545;
  --imtm-color-danger-bg: #f8d7da;
  --imtm-color-danger-text: #842029;
  --imtm-color-danger-border: #f5c2c7;
  --imtm-color-primary: #0d6efd;
  --imtm-color-secondary: #6c757d;
  --imtm-color-light: #f8f9fa;
  --imtm-color-dark: #212529;

  /* Typography. */
  --imtm-font-family: 'Roboto Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --imtm-font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --imtm-line-height: 1.5;
  --imtm-line-height-heading: 1.2;

  /* Spacing scale (matches the former utility scale). */
  --imtm-space-1: 0.25rem;
  --imtm-space-2: 0.5rem;
  --imtm-space-3: 1rem;
  --imtm-space-4: 1.5rem;
  --imtm-space-5: 3rem;
  --imtm-space-section: 3.35rem;

  /* Layout. */
  --imtm-container-width: 1200px;
  --imtm-gutter: 1.5rem;
  --imtm-header-height: 135px;
  --imtm-header-height-small: 95px;
  --imtm-header-height-mobile: 56px;

  /* Focus indicator (≥3:1 against white and the brand blue). */
  --imtm-focus-color: #1f6e80;

  /* Form controls. */
  --imtm-radius: 0.375rem;
  --imtm-radius-lg: 0.5rem;
  --imtm-control-height: 2.75rem;
  --imtm-control-border: #c9ced4;
  --imtm-control-border-hover: #a3abb3;
  --imtm-focus-ring: 0 0 0 0.2rem rgba(131, 197, 213, 0.55);

  /* Form controls (css/system/form.css, button.css, details.css, webform.css). */
  --imtm-form-control-border: var(--imtm-color-gray-100); /* #8d8d8e, ≥3:1 on white (WCAG 1.4.11). */
  --imtm-form-control-border-hover: var(--imtm-color-text);
  --imtm-form-control-bg-disabled: var(--imtm-color-surface-light);
  --imtm-form-label-color: var(--imtm-color-text); /* Labels, values, legends. */
  --imtm-form-help-color: #6a6a6c; /* All secondary texts; ≥4.5:1 on white and #f7f7f7. */
  --imtm-form-placeholder-color: #737375; /* Slightly lighter than help text, 4.7:1. */
  --imtm-form-error-color: var(--imtm-color-danger-text);
  --imtm-form-error-bg: var(--imtm-color-white);
  --imtm-form-check-size: 1.125rem;
  --imtm-form-gap: 1.25rem; /* Vertical rhythm between form items. */
  --imtm-focus-outline: 2px solid var(--imtm-focus-color, #1f6e80);
  --imtm-focus-outline-offset: 2px;
  --imtm-button-primary-hover: #d42a1f; /* Brand red darkened: white text ≥4.5:1. */
  --imtm-button-height-small: 2.25rem;

  /* Elevation. */
  --imtm-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --imtm-shadow-tile: 0 3px 16px rgba(0, 0, 0, 0.15);
  --imtm-shadow-tile-hover: 0 3px 16px rgba(0, 0, 0, 0.25);
  --imtm-shadow-soft: 0 6px 6px rgba(0, 0, 0, 0.04);
  --imtm-shadow-soft-hover: 0 6px 6px rgba(0, 0, 0, 0.12);

  /* Motion. */
  --imtm-transition: 0.2s ease;
}
