/**
 * Inommo Design System - Core Variables & Foundation
 * Version: 1.0.0
 * 
 * This file contains all design tokens: colors, typography, spacing, shadows, etc.
 * It provides the foundation for the entire Inommo design system.
 */

/* ============================================
   IMPORT GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   ROOT VARIABLES - LIGHT MODE
   ============================================ */
:root {
  /* === FUNCTIONAL COLORS === */

  /* Groups & Communities - Green */
  --color-groups-primary: #28a745;
  --color-groups-light: #d4edda;
  --color-groups-dark: #1e7e34;
  --color-groups-hover: #218838;

  /* Projects, Activities & Tasks - Blue */
  --color-projects-primary: #0d6efd;
  --color-projects-light: #cfe2ff;
  --color-projects-dark: #084298;
  --color-projects-hover: #0b5ed7;

  /* Messages - Purple */
  --color-messages-primary: #6f42c1;
  --color-messages-light: #e0cffc;
  --color-messages-dark: #59359a;
  --color-messages-hover: #5a32a3;

  /* Finances - Orange */
  --color-finance-primary: #fd7e14;
  --color-finance-light: #ffe5d0;
  --color-finance-dark: #e86b00;
  --color-finance-hover: #e67700;

  /* === TYPOGRAPHY === */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-headings: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Courier New', 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: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-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 */
  --spacing-3xl: 4rem;
  /* 64px */

  /* === BORDER RADIUS === */
  --radius-sm: 0.25rem;
  /* 4px */
  --radius-md: 0.375rem;
  /* 6px */
  --radius-lg: 0.5rem;
  /* 8px */
  --radius-xl: 0.75rem;
  /* 12px */
  --radius-2xl: 1rem;
  /* 16px */
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* === TRANSITIONS === */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* === GLASSMORPHISM === */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: 10px;

  /* === Z-INDEX === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   DARK MODE VARIABLES
   ============================================ */
[data-bs-theme="dark"] {
  /* Adjusted functional colors for dark mode (brighter for contrast) */
  --color-groups-primary: #34d058;
  --color-groups-light: #1e4620;
  --color-groups-dark: #4ae168;

  --color-projects-primary: #4dabf7;
  --color-projects-light: #1e3a5f;
  --color-projects-dark: #74c0fc;

  --color-messages-primary: #9775fa;
  --color-messages-light: #3d2b5f;
  --color-messages-dark: #b197fc;

  --color-finance-primary: #ff922b;
  --color-finance-light: #5f3a1e;
  --color-finance-dark: #ffa94d;

  /* Dark mode surfaces */
  --surface-primary: #161b22;
  --surface-secondary: #21262d;
  --surface-tertiary: #30363d;

  /* Glassmorphism for dark mode */
  --glass-bg: rgba(33, 37, 41, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Shadows for dark mode */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
body {
  font-family: var(--font-family-base);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--font-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-family-headings);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--spacing-md);
}

h1,
.h1 {
  font-size: var(--text-3xl);
}

h2,
.h2 {
  font-size: var(--text-2xl);
}

h3,
.h3 {
  font-size: var(--text-xl);
}

h4,
.h4 {
  font-size: var(--text-lg);
}

h5,
.h5 {
  font-size: var(--text-base);
}

h6,
.h6 {
  font-size: var(--text-sm);
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: var(--transition-base);
  transition-timing-function: ease-in-out;
}

/* Disable transitions on elements that shouldn't animate */
button,
input,
select,
textarea,
[type="button"],
[type="submit"],
[type="reset"] {
  transition: none;
}

/* Re-enable for specific interactive states */
.btn,
.card,
.badge,
.alert {
  transition: all var(--transition-base);
}

/* ============================================
   UTILITY: GLASSMORPHISM
   ============================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ============================================
   RESPONSIVE BREAKPOINTS (Bootstrap 5)
   ============================================ */
/* 
  xs: < 576px
  sm: ≥ 576px
  md: ≥ 768px
  lg: ≥ 992px
  xl: ≥ 1200px
  xxl: ≥ 1400px
*/

/* ============================================
   OVERRIDES
   ============================================ */
.bg-dark {
  --bs-bg-opacity: 1;
  background-color: rgb(3 22 51) !important;
}