/* THE THEME. This is the only file in the web app that may contain a colour value (hex, rgb or rgba).
 * Source: docs/design/IntesaHR_Ticketing_UI_Design.md section 1. Everything else uses these variables.
 * A test (apps/web/src/app/theme.test.ts) fails if any colour value appears anywhere else in the web app.
 * DM Sans is hosted with the app (the page may only load files from itself). */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  /* 1.1 Brand colours */
  --brand-blue: #0066b3;
  --brand-blue-dark: #004c87;
  --brand-blue-tint: #e3f0fa;
  --brand-blue-tint-2: #eef6fc;
  --brand-blue-hover-row: #f4f9fd;
  --brand-blue-border: #b9d6ee;
  --brand-blue-soft-hover: #d3e8f7;
  --brand-teal: #00a3e0;
  --brand-green: #7ac143;
  --brand-green-text: #2d6a10;
  --brand-green-tint: #e7f5db;
  --brand-ink: #1c2733;
  --logo-magenta: #9f2266; /* sampled from the logo (docs/design/BRAND_COLORS.md) */
  --accent: var(--logo-magenta);
  --accent-tint: #f7e8f0;
  --logo-green: #7eba3e;
  --logo-blue: #0173bc;

  /* 1.2 Neutral scale */
  --gray-900: #1c2733;
  --gray-700: #3b4856;
  --gray-600: #5b6775;
  --gray-500: #8a95a3;
  --gray-400: #cbd3dc;
  --gray-300: #e2e7ed;
  --gray-200: #eef1f5;
  --gray-100: #f3f6f9;
  --gray-50: #fafbfd;
  --white: #ffffff;
  --keycap-fill: #f1f4f7;

  /* 1.3 Feedback colours */
  --warning-bg: #fff4e0;
  --warning-border: #f4ddb2;
  --warning-text: #6b4200;
  --warning-icon: #b26a00;
  --danger: #d32f2f;
  --danger-text: #b3261e;
  --danger-hover: #8f1e18;
  --danger-tint: #fdecec;

  /* 1.4 Status colours (square dot) */
  --status-open: #0066b3;
  --status-pending: #e8a317;
  --status-resolved: #3e9b1f;
  --status-closed: #7a8696;
  --status-in-progress: #00a3e0;
  --status-ai: #6b5bd2;

  /* 1.5 Priority colours (round dot) */
  --priority-low: #7ac143;
  --priority-medium: #0066b3;
  --priority-high: #e8890c;
  --priority-urgent: #d32f2f;

  /* 1.6 Avatar tints: background / text, cycled by index */
  --avatar-1-bg: #e3f0fa; --avatar-1-fg: #004c87;
  --avatar-2-bg: #ddf3fb; --avatar-2-fg: #006e94;
  --avatar-3-bg: #e7f5db; --avatar-3-fg: #2d6a10;
  --avatar-4-bg: #fdf0d8; --avatar-4-fg: #8a5200;
  --avatar-5-bg: #ece8fb; --avatar-5-fg: #4b3fa8;

  /* 1.7 Chart colours */
  --chart-1: #0066b3;
  --chart-2: #e8890c;
  --chart-grid: #e2e7ed;
  --chart-axis: #5b6775;

  /* 1.11 Shadows and scrim */
  --shadow-card: 0 1px 2px rgba(28, 39, 51, 0.04), 0 8px 24px rgba(28, 39, 51, 0.04);
  --shadow-menu: 0 12px 32px rgba(28, 39, 51, 0.16);
  --shadow-reply: 0 4px 16px rgba(0, 102, 179, 0.08);
  --shadow-drawer: -16px 0 40px rgba(28, 39, 51, 0.18);
  --shadow-modal: 0 24px 64px rgba(28, 39, 51, 0.28);
  --scrim: rgba(28, 39, 51, 0.34);
  --on-brand-divider: rgba(255, 255, 255, 0.35);
  --brand-gradient: linear-gradient(155deg, #0066b3 0%, #004c87 58%, #00a3e0 135%);

  /* Typography (1.8) */
  --font: 'DM Sans', system-ui, sans-serif;
  --text-base: 14px;
  --text-secondary: 13px;
  --text-small: 12.5px;
  --text-kicker: 12px;
  --text-chip: 12px;
  --text-card-title: 15px;
  --text-panel-title: 18px;
  --text-page-title: 17px;
  --text-product: 16px;
  --text-subject: 22px;
  --text-kpi: 30px;
  --text-signin: 46px;
  --text-signin-panel: 38px;
  --line: 1.4;

  /* Spacing scale (1.9) */
  --sp-1: 4px; --sp-2: 6px; --sp-3: 8px; --sp-4: 10px; --sp-5: 12px; --sp-6: 14px; --sp-7: 16px;
  --sp-8: 20px; --sp-9: 24px; --sp-10: 28px; --sp-11: 32px; --sp-12: 40px; --sp-13: 56px;

  /* Corner radius (1.10) */
  --r-dot: 3px; --r-chip: 6px; --r-small: 8px; --r-control: 10px; --r-card: 12px; --r-panel: 14px; --r-main: 16px; --r-brand-panel: 28px; --r-pill: 999px;

  /* Layout sizes (section 3) */
  --rail-width: 72px;
  --topbar-height: 64px;
  --views-width: 252px;
  --filters-width: 288px;
  --details-width: 324px;
  --drawer-width: 520px;
  --control-height: 40px;
  --button-height: 38px;
  --button-height-bar: 36px;
  --button-height-compact: 32px;

  /* Borders and focus (1.12) */
  --border: 1px solid var(--gray-300);
  --border-light: 1px solid var(--gray-200);
  --border-control: 1px solid var(--gray-400);
  --focus-ring: 2px solid var(--brand-teal);
}
