/**
 * AM Site Solutions Portal - Design System Variables
 * Color palette, spacing, typography, and design tokens
 */

:root {
  /* ========================================
     BRAND COLORS
     ======================================== */
  --primary: #455177;
  --primary-hover: #586795;
  --primary-light: #6b7ca3;
  --primary-dark: #323d59;

  --secondary: #f15f22;
  --secondary-hover: #F78250;
  --secondary-light: #f9945d;
  --secondary-dark: #d14a15;

  --accent: #ecc710;
  --accent-hover: #F0D650;
  --accent-light: #f4dc6a;
  --accent-dark: #d4b00e;

  /* ========================================
     NEUTRAL COLORS
     ======================================== */
  --grey-darkest: #1a1a1a;
  --grey-dark: #292929;
  --grey-medium: #666666;
  --grey: #999999;
  --grey-light: #e7e7e7;
  --grey-lighter: #f5f5f5;
  --grey-lightest: #fafafa;
  --white: #ffffff;

  /* ========================================
     SEMANTIC COLORS
     ======================================== */
  --success: #28a745;
  --success-light: #d4edda;
  --success-dark: #155724;
  --success-bg: rgba(40, 167, 69, 0.1);

  --warning: #ffc107;
  --warning-light: #fff3cd;
  --warning-dark: #856404;
  --warning-bg: rgba(255, 193, 7, 0.15);

  --danger: #dc3545;
  --danger-light: #f8d7da;
  --danger-dark: #721c24;
  --danger-bg: rgba(220, 53, 69, 0.1);

  --info: #17a2b8;
  --info-light: #d1ecf1;
  --info-dark: #0c5460;

  /* ========================================
     SPACING SYSTEM (8px base unit)
     ======================================== */
  --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 */
  --spacing-3xl: 4rem;      /* 64px */

  /* ========================================
     TYPOGRAPHY
     ======================================== */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                      "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;

  --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 */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* ========================================
     SHADOWS
     ======================================== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

  /* ========================================
     TRANSITIONS
     ======================================== */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 400ms ease;

  /* ========================================
     BORDER RADIUS
     ======================================== */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ========================================
     BORDERS
     ======================================== */
  --border-width: 1px;
  --border-width-thick: 2px;
  --border-color: var(--grey-light);
  --border-color-dark: var(--grey-medium);

  /* ========================================
     LAYOUT DIMENSIONS
     ======================================== */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 60px;
  --sidebar-header-height: 80px;
  --sidebar-footer-height: 80px;

  --bottom-nav-height: 56px;

  --content-max-width: 1400px;
  --content-padding-desktop: var(--spacing-xl);
  --content-padding-mobile: var(--spacing-md);

  /* ========================================
     Z-INDEX SCALE
     ======================================== */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-sidebar: 1000;
  --z-bottom-nav: 1000;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-notification: 1060;
  --z-loading: 1070;
  --z-mobile-menu: 1055;

  /* Mobile Header */
  --mobile-header-height: 56px;

  /* ========================================
     COMPONENT-SPECIFIC
     ======================================== */
  --input-height: 40px;
  --input-height-lg: 48px;
  --input-height-sm: 32px;

  --button-height: 40px;
  --button-height-lg: 48px;
  --button-height-sm: 32px;

  --table-row-height: 56px;
  --table-header-height: 48px;

  --card-padding: var(--spacing-lg);
  --card-padding-lg: var(--spacing-xl);
  --card-padding-sm: var(--spacing-md);

  /* ========================================
     BREAKPOINTS (for JavaScript)
     ======================================== */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-2xl: 1400px;
}

/* ========================================
   GLOBAL RESETS
   ======================================== */
* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--grey-dark);
  background-color: var(--grey-lighter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}
