/*!
 * SPN Service Portal Design System - CSS Variable Overrides
 * Customizes Pico CSS variables to match SPN brand guidelines
 * Updated: 2025-08-26 - Force SPN Blue color rgb(0, 81, 158)
 */

/* Import Google Fonts - Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ===== BRAND COLORS ===== */
  /* Primary Colors - SPN Blue */
  --pico-primary: rgb(0, 81, 158) !important;
  --pico-primary-background: rgb(0, 81, 158) !important;
  --pico-primary-border: rgb(0, 81, 158) !important;
  --pico-primary-underline: rgba(0, 81, 158, 0.5) !important;
  --pico-primary-hover: rgb(0, 65, 126) !important;
  --pico-primary-hover-background: rgb(0, 65, 126) !important;
  --pico-primary-hover-border: rgb(0, 65, 126) !important;
  --pico-primary-hover-underline: rgba(0, 65, 126, 0.5) !important;
  --pico-primary-focus: rgba(0, 81, 158, 0.5) !important;
  --pico-primary-inverse: #FFFFFF !important;

  /* Secondary Colors - SPN Yellow */
  --pico-secondary: #FFCC00;
  --pico-secondary-background: #FFCC00;
  --pico-secondary-border: #FFCC00;
  --pico-secondary-underline: rgba(255, 204, 0, 0.5);
  --pico-secondary-hover: #e6b800;
  --pico-secondary-hover-background: #e6b800;
  --pico-secondary-hover-border: #e6b800;
  --pico-secondary-hover-underline: rgba(230, 184, 0, 0.5);
  --pico-secondary-focus: rgba(255, 204, 0, 0.25);
  --pico-secondary-inverse: #333333;

  /* UI Colors */
  --pico-background-color: #F5F5F5;
  --pico-card-background-color: #FFFFFF;
  --pico-card-border-color: #D0D0D0;
  --pico-muted-border-color: #D0D0D0;
  --pico-muted-color: #666666;

  /* Text Colors */
  --pico-color: rgb(0, 81, 158) !important;
  --pico-h1-color: rgb(0, 81, 158) !important;
  --pico-h2-color: rgb(0, 81, 158) !important;
  --pico-h3-color: rgb(0, 81, 158) !important;
  --pico-h4-color: rgb(0, 81, 158) !important;
  --pico-h5-color: rgb(0, 81, 158) !important;
  --pico-h6-color: rgb(0, 81, 158) !important;

  /* Semantic Colors */
  --pico-ins-color: #4CAF50;
  --pico-del-color: #E2001A;
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-error: #E2001A;
  --color-info: rgb(0, 81, 158);

  /* ===== TYPOGRAPHY ===== */
  --pico-font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --pico-font-family-monospace: 'Courier New', Courier, monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 2rem;       /* 32px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* ===== SPACING SYSTEM ===== */
  /* 8px grid system */
  --space-1: 0.5rem;      /* 8px */
  --space-2: 1rem;        /* 16px */
  --space-3: 1.5rem;      /* 24px */
  --space-4: 2rem;        /* 32px */
  --space-5: 2.5rem;      /* 40px */
  --space-6: 3rem;        /* 48px */
  --space-8: 4rem;        /* 64px */
  --space-10: 5rem;       /* 80px */

  /* Override Pico spacing to align with 8px grid */
  --pico-spacing: var(--space-2);
  --pico-typography-spacing-vertical: var(--space-2);
  --pico-block-spacing-vertical: var(--space-3);

  /* ===== LAYOUT ===== */
  /* Container Widths */
  --container-sm: 40rem;    /* 640px */
  --container-md: 48rem;    /* 768px */
  --container-lg: 64rem;    /* 1024px */
  --container-xl: 80rem;    /* 1280px */
  --container-2xl: 96rem;   /* 1536px */

  /* Breakpoints */
  --breakpoint-sm: 40rem;   /* 640px */
  --breakpoint-md: 48rem;   /* 768px */
  --breakpoint-lg: 64rem;   /* 1024px */
  --breakpoint-xl: 80rem;   /* 1280px */
  --breakpoint-2xl: 96rem;  /* 1536px */

  /* ===== FORM ELEMENTS ===== */
  --pico-form-element-spacing-vertical: 0.75rem;
  --pico-form-element-spacing-horizontal: 1rem;
  --pico-border-radius: 0.25rem;
  --pico-form-element-background-color: #FFFFFF;
  --pico-form-element-border-color: #D0D0D0;
  --pico-form-element-color: rgb(0, 81, 158) !important;
  --pico-form-element-focus-color: var(--pico-primary);
  --pico-form-element-active-border-color: var(--pico-primary);

  /* Form validation colors */
  --pico-form-element-valid-border-color: #4CAF50;
  --pico-form-element-valid-active-border-color: #4CAF50;
  --pico-form-element-valid-focus-color: rgba(76, 175, 80, 0.5);
  --pico-form-element-invalid-border-color: #E2001A;
  --pico-form-element-invalid-active-border-color: #E2001A;
  --pico-form-element-invalid-focus-color: rgba(226, 0, 26, 0.5);

  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --pico-transition: var(--transition-base);

  /* ===== SHADOWS ===== */
  /* SPN design system uses no shadows on any elements */
  --shadow-sm: none;
  --shadow-base: none;
  --shadow-md: none;
  --shadow-lg: none;
  --pico-card-box-shadow: none;
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] {
  --pico-background-color: #1a1e26;
  --pico-card-background-color: #2a2f3a;
  --pico-color: #c2c7d0;
  --pico-muted-color: #7b8495;
  --pico-muted-border-color: #3a3f4a;
}

/* ===== RESPONSIVE FONT SCALING ===== */
@media (max-width: 640px) {
  :root {
    --text-2xl: 1.375rem;  /* 22px on mobile */
    --text-3xl: 1.75rem;   /* 28px on mobile */
  }
}
