/* =============================================================================
   MERIDIAN BASE – Universal design tokens and styles
   Shared by webapp, chatapp, kiosk. Override in app-specific CSS as needed.
   Shared tokens; webapp extends in apps/webapp (Clinical Clarity / design plan).
   ============================================================================= */

/* =============================================================================
   DESIGN TOKENS (CSS custom properties)
   ============================================================================= */

:root {
  /* Typography */
  --font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
  --line-height: 1.6;
  --line-height-tight: 1.4;

  /* Spacing (px-based for web/mobile; kiosk overrides with vh) */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Colors – shared palette */
  --text: #333;
  --text-muted: #666;
  --border: #ddd;
  --border-light: #ccc;
  --bg: #fff;
  --bg-surface: #fafafa;
  --bg-surface-alt: #f5f5f5;

  /* Primary action (green – check-in, send, confirm) */
  --primary: #4CAF50;
  --primary-hover: #45a049;
  --primary-disabled: #ccc;

  /* Medical/teal (events, medications – matches kiosk) */
  --accent: #2E7D9B;
  --accent-dark: #1e5d7a;
  --accent-hover: #3a8fab;

  /* Status */
  --success-bg: #d4edda;
  --success-text: #155724;
  --info-bg: #d1ecf1;
  --info-text: #0c5460;
  --error-bg: #f8d7da;
  --error-text: #721c24;
  --warning: #ff8000;

  /* Semantic actions (web dashboard; optional for other apps) */
  --danger: #c0392b;
  --danger-hover: #a93226;
  --secondary-btn: #7f8c8d;
  --secondary-btn-hover: #6c7a7b;
}

/* =============================================================================
   FONTS
   ============================================================================= */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/shared/fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/shared/fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* =============================================================================
   RESET / BASE
   ============================================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* =============================================================================
   TYPOGRAPHY (base – override in app CSS)
   ============================================================================= */

h1, h2, h3 {
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* =============================================================================
   FORM ELEMENTS (base – override in app CSS)
   ============================================================================= */

input,
button,
select {
  font-family: inherit;
  font-size: 16px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
}

button:disabled {
  cursor: not-allowed;
  background: var(--primary-disabled);
}

/* =============================================================================
   STATUS CLASSES (reusable across apps)
   ============================================================================= */

.success { background: var(--success-bg); color: var(--success-text); }
.info { background: var(--info-bg); color: var(--info-text); }
.error { background: var(--error-bg); color: var(--error-text); }
