/**
 * CSS Custom Properties (Variables)
 * Design system for the Memory Dashboard
 */

:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-color-alpha: rgba(37, 99, 235, 0.1);
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;

  /* Status Colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --error-color-alpha: rgba(239, 68, 68, 0.1);
  --info-color: #3b82f6;
  --text-secondary-alpha: rgba(100, 116, 139, 0.1);

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #3b82f6;

  /* Importance Colors */
  --importance-useful: #ef4444;
  --importance-meaningful: #f59e0b;
  --importance-important: #3b82f6;
  --importance-essential: #8b5cf6;

  /* Memory State Colors */
  --memory-active: #10b981;
  --memory-flagged: #f59e0b;
  --memory-deleted: #ef4444;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  --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-loose: 1.75;

  /* Borders & Radius */
  --border-radius: 0.5rem;
  --border-radius-sm: 0.25rem;
  --border-radius-lg: 0.75rem;
  --border-radius-full: 9999px;

  --border-width: 1px;
  --border-width-thick: 2px;

  /* Input Padding (em units for font-size scaling) */
  --input-padding-y: 0.7em;
  --input-padding-x: 1em;
  --input-padding-y-sm: 0.35em;
  --input-padding-x-sm: 0.5em;

  /* Select Arrow SVG Background Images */
  --select-arrow-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-modal: 1010;
  --z-popover: 1020;
  --z-tooltip: 1030;

  /* Layout */
  --header-height: 4rem;
  --sidebar-width: 16rem;
  --content-max-width: 1200px;

  /* Loading & Animation */
  --loading-duration: 2s;
  --pulse-duration: 1.5s;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
	--bg-hover: #1c2b44;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-hover: #475569;

    /* Select Arrow SVG Background Image for dark mode */
    --select-arrow-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-width: 2px;
    --border-width-thick: 3px;
  }
}