/**
 * TubeRaker Design System - CSS Custom Properties
 * Theme: Dark mode default with light mode support
 */

:root {
  /* ===== Brand Colors ===== */
  --color-brand-primary: #3b82f6;     /* Blue 500 */
  --color-brand-primary-hover: #2563eb; /* Blue 600 */
  --color-brand-primary-light: #60a5fa; /* Blue 400 */
  --color-brand-secondary: #8b5cf6;   /* Violet 500 */
  --color-brand-secondary-hover: #7c3aed; /* Violet 600 */
  --color-brand-accent: #f59e0b;      /* Amber 500 */
  --color-brand-accent-hover: #d97706; /* Amber 600 */

  /* ===== Background Colors (Dark Mode Default) ===== */
  --bg-primary: #0f172a;              /* Slate 900 */
  --bg-secondary: #1e293b;            /* Slate 800 */
  --bg-tertiary: #334155;             /* Slate 700 */
  --bg-elevated: #1e293b;             /* Slate 800 - for cards */
  --bg-hover: #334155;                /* Slate 700 */
  --bg-active: #475569;               /* Slate 600 */
  --bg-modal-overlay: rgba(15, 23, 42, 0.8);

  /* ===== Text Colors (Dark Mode) ===== */
  --text-primary: #f8fafc;            /* Slate 50 */
  --text-secondary: #94a3b8;          /* Slate 400 */
  --text-tertiary: #64748b;           /* Slate 500 */
  --text-disabled: #475569;           /* Slate 600 */
  --text-inverse: #0f172a;            /* For light backgrounds */

  /* ===== Border Colors ===== */
  --border-primary: #334155;          /* Slate 700 */
  --border-secondary: #475569;        /* Slate 600 */
  --border-focus: var(--color-brand-primary);
  --border-error: #ef4444;            /* Red 500 */

  /* ===== Semantic Colors ===== */
  --color-success: #10b981;           /* Green 500 */
  --color-success-bg: #064e3b;        /* Green 900 */
  --color-warning: #f59e0b;           /* Amber 500 */
  --color-warning-bg: #78350f;        /* Amber 900 */
  --color-error: #ef4444;             /* Red 500 */
  --color-error-bg: #7f1d1d;          /* Red 900 */
  --color-info: #3b82f6;              /* Blue 500 */
  --color-info-bg: #1e3a8a;           /* Blue 900 */

  /* ===== Typography ===== */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'Consolas', 'Monaco', '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;

  /* ===== 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 0.0625rem 0.125rem 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem -0.0625rem rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -0.125rem rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1), 0 0.625rem 0.625rem -0.3125rem rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 1.5625rem 3.125rem -0.75rem rgba(0, 0, 0, 0.25);
  --shadow-focus: 0 0 0 0.1875rem rgba(59, 130, 246, 0.5);

  /* ===== Transitions ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== Z-Index Scale ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ===== Layout ===== */
  --header-height: 4rem;              /* 64px */
  --sidebar-width: 16rem;             /* 256px */
  --sidebar-collapsed-width: 4rem;    /* 64px */
  --content-max-width: 80rem;
  --container-padding: var(--spacing-md);

  /* ===== Form Elements ===== */
  --input-height: 2.5rem;             /* 40px */
  --input-height-sm: 2rem;            /* 32px */
  --input-height-lg: 3rem;            /* 48px */
  --input-padding-x: var(--spacing-md);
  --input-padding-y: var(--spacing-sm);
}

/* ===== Light Mode Theme ===== */
[data-theme="light"] {
  /* Background Colors (Light Mode) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;            /* Slate 50 */
  --bg-tertiary: #f1f5f9;             /* Slate 100 */
  --bg-elevated: #ffffff;
  --bg-hover: #f1f5f9;                /* Slate 100 */
  --bg-active: #e2e8f0;               /* Slate 200 */
  --bg-modal-overlay: rgba(0, 0, 0, 0.5);

  /* Text Colors (Light Mode) */
  --text-primary: #0f172a;            /* Slate 900 */
  --text-secondary: #475569;          /* Slate 600 */
  --text-tertiary: #64748b;           /* Slate 500 */
  --text-disabled: #cbd5e1;           /* Slate 300 */
  --text-inverse: #ffffff;

  /* Border Colors (Light Mode) */
  --border-primary: #e2e8f0;          /* Slate 200 */
  --border-secondary: #cbd5e1;        /* Slate 300 */

  /* Semantic Colors (Light Mode) */
  --color-success-bg: #dcfce7;        /* Green 100 */
  --color-warning-bg: #fef3c7;        /* Amber 100 */
  --color-error-bg: #fee2e2;          /* Red 100 */
  --color-info-bg: #dbeafe;           /* Blue 100 */

  /* Shadows (Light Mode - more pronounced) */
  --shadow-sm: 0 0.0625rem 0.125rem 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem -0.0625rem rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -0.125rem rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1), 0 0.625rem 0.625rem -0.3125rem rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 1.5625rem 3.125rem -0.75rem rgba(0, 0, 0, 0.25);
}

/* ===== Responsive Breakpoints (for JavaScript access) ===== */
:root {
  --breakpoint-sm: 40rem;
  --breakpoint-md: 48rem;
  --breakpoint-lg: 64rem;
  --breakpoint-xl: 80rem;
  --breakpoint-2xl: 96rem;
}
