/* ============================================================================
   BRANDING VARIABLES
   Company-wide brand colors, typography, spacing, and layout constants
   Reference: Maserfrakt Intranet brand guidelines
   ============================================================================ */

/* Brand Colors */
:root {
  /* Primary brand color - Maserfrakt orange */
  --brand-primary: #f56913;
  --brand-primary-alt: #c24d0a;
  
  /* Text colors */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --text-white: #ffffff;
  
  /* Background colors */
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-dark: #333333;
  --bg-primary: var(--bg-light);
  --surface-editing: #fffbf0;   /* Inline-edit row highlight */
  
  /* Border colors */
  --border-color: #cccccc;
  --border-light: #e0e0e0;
  --border-dark: #cccccc;
  
  /* Status colors (semantic values aligned with the Maserfrakt web-design standard) */
  --success: #1b7f5e;
  --error: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;

  /* Alert component palettes (soft surface + readable text per state) */
  --alert-info-bg: #e8f4fd;
  --alert-info-text: #0c5460;
  --alert-warning-bg: #fff3cd;
  --alert-warning-text: #856404;
  --alert-danger-bg: #f8d7da;
  --alert-danger-text: #721c24;

  /* Progress-bar gradients (contextual states) */
  --progress-gradient-info: linear-gradient(90deg, #17a2b8, #20c997);
  --progress-gradient-warning: linear-gradient(90deg, #ffc107, #fd7e14);
  --progress-gradient-primary: linear-gradient(90deg, #007bff, #6f42c1);
  --progress-gradient-success: linear-gradient(90deg, #28a745, #20c997);

  /* Neutral/Gray colors for secondary components */
  --gray-secondary: #6c757d;
  --gray-dark: #343a40;
  --gray-light: #f8f9fa;
  --text-dark-neutral: #212529;
  
  /* Typography */
  --font-family-base: 'Poppins', Arial, sans-serif;
  --font-family-heading: 'Poppins', Arial, sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Font sizes */
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  
  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing */
  --spacing-xs: 0.25rem;       /* 4px */
  --spacing-sm: 0.5rem;        /* 8px */
  --spacing-md: 1rem;          /* 16px */
  --spacing-lg: 1.5rem;        /* 24px */
  --spacing-xl: 2rem;          /* 32px */
  --spacing-2xl: 3rem;         /* 48px */
  
  /* Layout */
  --max-width-container: 1100px;
  --max-width-content: 1100px;
  --header-height: 3rem;
  --footer-height: auto;
  
  /* Responsive breakpoints */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Focus glow (brand / error) — keeps the brand colour out of component CSS. */
  --focus-glow: 0 0 0 3px rgba(245, 105, 19, 0.15);
  --focus-glow-error: 0 0 0 3px rgba(231, 76, 60, 0.15);
  
  /* Transitions */
  --transition-fast: 100ms ease-in-out;
  --transition-normal: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ------------------------------------------------------------------------
     Legacy alias variables (used by older CSS/JS)
     Keep these mappings here so styles are discoverable in ONE place.
     ------------------------------------------------------------------------ */
  /* Canonical web-design token names (aliases to the brand scale) */
  --color-accent: var(--brand-primary);
  --color-accent-strong: var(--brand-primary-alt);
  --color-success: var(--success);
  --color-error: var(--error);
  --color-warning: var(--warning);
  --color-info: var(--info);

  --primary-color: var(--brand-primary);
  --secondary-color: var(--gray-secondary);
  --success-color: var(--success);
  --danger-color: var(--error);
  --warning-color: var(--warning);
  --info-color: var(--info);
  --light-color: var(--bg-light);
  --dark-color: var(--bg-dark);
  --border-radius: var(--radius-md);
  --transition-duration: var(--transition-normal);

    /* ------------------------------------------------------------------------
      Compatibility aliases (used by branding/components CSS)
      ------------------------------------------------------------------------ */
    /* Legacy brand token names used by the shared component CSS/JS (forms,
       modal, table, tabs, loader, nav, ...). Alias them to the canonical
       brand scale so a single palette drives everything. */
    --brand-color: var(--brand-primary);
    --brand-color-alt: var(--brand-primary-alt);
    --text-dark: var(--text-primary);
    --text-muted: var(--text-secondary);
    --border-radius-sm: var(--radius-sm);
    --border-radius-md: var(--radius-md);
    --border-radius-lg: var(--radius-lg);
    --transition-default: var(--transition-normal);
}

/* Ensure consistent box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}
