@use "sass:color";

$black: #1f2d3d;
$slate: #3c4858;
$muted: #8492a6;
$smoke: #e0e6ed;
$snow: #f9fafc;
$white: #fff;

$red: #ec3750;
$orange: #ff8c37;
$yellow: #f1c40f;
$green: #33d6a6;
$green-dark: #1f8164;
$cyan: #5bc0de;
$blue: #338eda;
$purple: #a633d6;

$dark: #17171d;
$darker: #121217;
$darkless: #252429;

$palette: (
        primary: $red,
        accent: $cyan,
        info: $blue,
        success: $green,
        error: color.adjust(color.adjust($red, $lightness: -25%, $space: hsl), $saturation: -15%, $space: hsl),
        ai: $purple,
        warning: $orange,
        pending: $yellow,
        purple: $purple,
        black: $black,
        darker: $darker,
        slate: $slate,
        muted: $muted,
        smoke: $smoke,
        snow: $snow,
        white: $white,
        dark: $dark,
);

@mixin gradient($color) {
    background-color: map-get($palette, $color);
    background-image: radial-gradient(
                    ellipse farthest-corner at top left,
                    color.adjust(color.adjust(map-get($palette, $color), $saturation: 15%, $space: hsl), $lightness: 15%, $space: hsl),
                    color.adjust(map-get($palette, $color), $saturation: 15%, $space: hsl)
    );
}

html {
    --error-bg:#fbf2f4;
    --error-border:#eab4bc;
    --error-fg:#b9031f;
    --error-fg-strong:#78202e;
    --warning-bg:#fffcf2;
    --warning-border:#ffe69b;
    --warning-fg:#ffc107;
    --warning-fg-strong:#6a311c;
    --success-bg:#f3f8f5;
    --success-border:#a1caad;
    --success-fg:#147b33;
    --success-fg-strong:#285a37;
    --info-bg:#f2f7fb;
    --info-bg-selected:#cce0f1;
    --info-border:#b2d1ea;
    --info-fg:#0067b9;
    --info-fg-strong:#1f5077;
    --quote-fg-1: #2b497d;
    --quote-bg-1: #e8ecf2;
    --quote-fg-2: #1d3e0f;
    --quote-bg-2: #e4f1df;
    --quote-fg-3: #5c0a0a;
    --quote-bg-3: #f7d4d4;
    --quote-fg-4: #472215;
    --quote-bg-4: #dbbeb3;
    --quote-fg-5: #335f61;
    --quote-bg-5: #e0e6e6;
}


@media (prefers-color-scheme: dark) {

    html {
        --error-bg: #3b1017;
        --error-border: #8b2535;
        --error-fg: #dc818f;
        --error-fg-strong: #e39aa5;
        --warning-bg: #33290b;
        --warning-border: #7f661c;
        --warning-fg: #ffe083;
        --warning-fg-strong: #ffecb4;
        --success-bg: #142c1b;
        --success-border: #285a37;
        --success-fg: #8abd99;
        --success-fg-strong: #b9d8c2;
        --info-bg: #0f273b;
        --info-bg-selected: #436075;
        --info-border: #436075;
        --info-fg: #b4d9f3;
        --info-fg-strong: #d2e8f7;
        --quote-fg-1: #b3cbff;
        --quote-bg-1: #373a3f;
        --quote-fg-2: #bee3aa;
        --quote-bg-2: #313b2d;
        --quote-fg-3: #ffc4b3;
        --quote-bg-3: #55393a;
        --quote-fg-4: #ffd3c0;
        --quote-bg-4: #5e473e;
        --quote-fg-5: #9ac9ca;
        --quote-bg-5: #393d3e;
    }

}
html {
    --checkbox-true: #08e54c;
    --checkbox-false: #ff002a;
}

// Colors
:root {
  --color-primary: #4a9eff;
  --color-primary-rgb: 74, 158, 255;
  --color-primary-hover: #3c7fcc;
  --color-primary-dark: #2563eb;
  --color-secondary: #6c757d;
  --color-secondary-rgb: 108, 117, 125;
  --color-secondary-hover: #5a6268;
  --color-success: #33d6a6;
  --color-success-rgb: 51, 214, 166;
  --color-danger: #dc3545;
  --color-danger-rgb: 220, 53, 69;
  --color-warning: #ffc107;
  --color-warning-rgb: 255, 193, 7;
  --color-info: #17a2b8;
  --color-info-rgb: 23, 162, 184;
  
  // Neutrals
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f9fafc;
  --color-gray-200: #e0e6ed;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-black: #000000;
  
  // Text colors
  --color-text: var(--color-gray-900);
  --color-text-secondary: var(--color-gray-600);
  --color-text-muted: var(--color-gray-500);
  --color-heading: var(--color-gray-900);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-secondary);
  
  // Border colors
  --color-border: var(--color-gray-200);
  --border-color: var(--color-border);
  
  // Background colors
  --color-bg: var(--color-white);
  --color-card-bg: var(--color-white);
  --color-panel-bg: var(--color-gray-50);
  --bg-default: var(--color-bg);
  --bg-subtle: var(--color-gray-100);
  --bg-subtle-hover: var(--color-gray-200);
  --bg-card: var(--color-card-bg);
  
  // Component specific
  --tab-bg: var(--color-gray-100);
  --active-indicator: var(--color-primary);
  
  // Status-specific colors
  --color-danger-light: #fecaca;
  --color-danger-50: #fef2f2;
  
  // 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);
  
  // Spacing
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  
  // Typography
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --font-size-xs: var(--text-xs);
  --font-size-sm: var(--text-sm);
  --font-size-base: var(--text-base);
  --font-size-lg: var(--text-lg);
  --font-size-xl: var(--text-xl);
  --font-size-2xl: var(--text-2xl);
  
  // Font weights
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-weight-normal: var(--font-normal);
  --font-weight-medium: var(--font-medium);
  --font-weight-bold: var(--font-bold);
  
  // Border radius
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  // Transitions
  --transition: 200ms ease;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

// Dark mode overrides
@media (prefers-color-scheme: dark) {
  :root {
    // Base colors (dark mode)
    --color-primary: #4a9eff;
    --color-primary-hover: #6ab0ff;
    
    // Neutrals
    --color-gray-50: #242424;
    --color-gray-100: #1a1a1a;
    --color-gray-200: #3a3a48;
    --color-gray-300: #4d4d5c;
    --color-gray-400: #717181;
    --color-gray-500: #8f8f9e;
    --color-gray-600: #a0a0b0;
    --color-gray-700: #c5c5d1;
    --color-gray-800: #e0e0ea;
    --color-gray-900: #f2f2f8;
    
    // Text colors
    --color-text: var(--color-gray-900);
    --color-text-secondary: var(--color-gray-700);
    --color-text-muted: var(--color-gray-600);
    --color-heading: var(--color-gray-900);
    --text-primary: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    
    // Border colors
    --color-border: var(--color-gray-200);
    --border-color: var(--color-border);
    
    // Background colors
    --color-bg: #121212;
    --color-card-bg: #1f1f1f;
    --color-panel-bg: #2d2d2d;
    --bg-default: var(--color-bg);
    --bg-subtle: #252530;
    --bg-subtle-hover: #2f2f3d;
    --bg-card: var(--color-card-bg);
    
    // Component specific
    --tab-bg: #252530;
    
    // Status-specific colors
    --color-danger-light: #7f1d1d;
    --color-danger-50: #450a0a;
  }
}

// Danger Zone Component
.danger-zone {
  background-color: var(--color-danger-50);
  border: 1px solid var(--color-danger-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-6);
}

.text-danger {
  color: var(--color-danger);
} 

@mixin gradient($color) {
  background-color: map-get($palette, $color);
  background-image: radial-gradient(
    ellipse farthest-corner at top left,
    lighten(saturate(map-get($palette, $color), 15%), 15%),
    saturate(map-get($palette, $color), 15%)
  );
}