/*
 * ShowRunner Design Tokens
 * Inspired by Linear - sophisticated, layered, purple accents
 */

:root {
  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", "Roboto Mono", Consolas, monospace;

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

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Letter Spacing */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;

  /* Core palette - Linear's deep blue-blacks */
  --gray-1: #0D0D12;   /* Deepest background */
  --gray-2: #13131A;   /* Card/surface background */
  --gray-3: #1C1C26;   /* Elevated surface */
  --gray-4: #252530;   /* Hover states */
  --gray-5: #2E2E3A;   /* Active/pressed */
  --gray-6: #3D3D4A;   /* Strong borders */
  --gray-7: #4D4D5C;   /* Muted text */
  --gray-8: #6B6B7B;   /* Secondary text */
  --gray-9: #8B8B9B;   /* Tertiary text */
  --gray-10: #E8E8ED;  /* Primary text */
  --white: #FFFFFF;

  /* Accent - Linear's signature purple */
  --accent-1: #5E6AD2;  /* Primary purple */
  --accent-2: #6E7ADD;  /* Hover */
  --accent-3: #4E5AC2;  /* Pressed */
  --accent-4: rgba(94, 106, 210, 0.15);  /* Muted background */
  --accent-5: rgba(94, 106, 210, 0.25);  /* Stronger muted */
  --accent-glow: rgba(94, 106, 210, 0.4);

  /* Semantic backgrounds */
  --bg-base: var(--gray-1);
  --bg-surface: var(--gray-2);
  --bg-elevated: var(--gray-3);
  --bg-hover: var(--gray-4);
  --bg-active: var(--gray-5);

  /* Semantic text */
  --text-primary: var(--gray-10);
  --text-secondary: var(--gray-9);
  --text-tertiary: var(--gray-8);
  --text-muted: var(--gray-7);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: var(--accent-1);

  /* Status colors - softer than pure RGB */
  --status-error: #E5484D;
  --status-error-muted: rgba(229, 72, 77, 0.15);
  --status-success: #30A46C;
  --status-success-muted: rgba(48, 164, 108, 0.15);
  --status-warning: #F5A623;
  --status-warning-muted: rgba(245, 166, 35, 0.15);

  /* Recording red - for record button */
  --record: #E5484D;
  --record-glow: rgba(229, 72, 77, 0.4);
  --accent-record: #E5484D;
  --accent-record-hover: #F25D60;
  --accent-record-glow: rgba(229, 72, 77, 0.4);
  --accent-record-muted: rgba(229, 72, 77, 0.15);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius - slightly rounded, not sharp */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Shadows - layered depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --duration-fast: 100ms;
  --duration-normal: 150ms;
  --duration-slow: 250ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index */
  --z-dropdown: 100;
  --z-modal: 400;
  --z-tooltip: 600;

  /* Component tokens */
  --header-height: 52px;
  --sidebar-width: 280px;
}

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection - purple tint */
::selection {
  background: var(--accent-4);
}

/* Scrollbar - subtle */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-6);
}

/* Focus states - purple ring */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

/* Input reset */
input, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 20px 4px var(--accent-glow); }
}
