@import "tailwindcss";

@import "@fontsource-variable/ubuntu-sans";
@import "@fontsource-variable/ubuntu-sans/wght-italic";
@import "@fontsource-variable/ubuntu-sans/wdth";
@import "@fontsource-variable/ubuntu-sans/wdth-italic";

@import "@fontsource-variable/ubuntu-sans-mono";
@import "@fontsource-variable/ubuntu-sans-mono/wght-italic";

@import "./overwrites";

@plugin "tailwindcss-animate";
@plugin "@tailwindcss/typography";

@custom-variant dark (&:is(.dark *));

@theme {
  --font-sans: "Ubuntu Sans Variable", "sans-serif";
  --font-mono: "Ubuntu Sans Mono Variable", "monospace";

  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);

  --color-background: var(--background);
  --color-foreground: var(--foreground);

  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);

  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);

  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);

  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);

  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);

  --color-info: var(--info);
  --color-info-foreground: var(--info-foreground);

  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);

  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);

  --color-error: var(--error);
  --color-error-foreground: var(--error-foreground);

  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);

  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
}

@layer base {
  :root {
    --background: oklch(0.98 0 0);
    --foreground: oklch(0.2 0.02 270);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.2 0.02 270);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.2 0.02 270);
    --primary: oklch(0.2 0.02 270);
    --primary-foreground: oklch(0.98 0 0);
    --secondary: oklch(0.95 0.01 270);
    --secondary-foreground: oklch(0.45 0.01 270);
    --muted: oklch(0.95 0.01 270);
    --muted-foreground: oklch(0.45 0.01 270);
    --info: oklch(0.6 0.2 240);
    --info-foreground: oklch(0.98 0 0);
    --success: oklch(0.6 0.2 140);
    --success-foreground: oklch(0.98 0 0);
    --warning: oklch(0.75 0.2 50);
    --warning-foreground: oklch(0.98 0 0);
    --error: oklch(0.64 0.17 24);
    --error-foreground: oklch(0.98 0 0);
    --border: oklch(0.9 0.01 270);
    --input: oklch(0.95 0.01 270);
    --ring: oklch(0.15 0.02 270);
    --chart-1: oklch(0.7 0.2 20);
    --chart-2: oklch(0.55 0.2 160);
    --chart-3: oklch(0.4 0.15 190);
    --chart-4: oklch(0.75 0.15 45);
    --chart-5: oklch(0.75 0.2 30);
    --radius: 0.5rem;
  }

  .dark {
    --background: oklch(0.18 0 0);
    --foreground: oklch(0.98 0 0);
    --card: oklch(0.235 0 0);
    --card-foreground: oklch(0.98 0 0);
    --popover: oklch(0.235 0 0);
    --popover-foreground: oklch(0.98 0 0);
    --primary: oklch(0.98 0 0);
    --primary-foreground: oklch(0.2 0.02 270);
    --secondary: oklch(0.4 0.01 270);
    --secondary-foreground: oklch(0.7 0.01 270);
    --muted: oklch(0.4 0.01 270);
    --muted-foreground: oklch(0.7 0.01 270);
    --info: oklch(0.6 0.15 240);
    --info-foreground: oklch(0.98 0 0);
    --success: oklch(0.55 0.15 140);
    --success-foreground: oklch(0.98 0 0);
    --warning: oklch(0.65 0.15 40);
    --warning-foreground: oklch(0.98 0 0);
    --error: oklch(0.64 0.17 24);
    --error-foreground: oklch(0.98 0 0);
    --border: oklch(0.325 0 0);
    --input: oklch(0.3 0 0);
    --ring: oklch(0.45 0.01 270);
    --chart-1: oklch(0.55 0.2 220);
    --chart-2: oklch(0.6 0.15 160);
    --chart-3: oklch(0.7 0.15 30);
    --chart-4: oklch(0.65 0.2 280);
    --chart-5: oklch(0.65 0.2 340);
  }
}

@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentColor);
  }

  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    /* @apply selection:bg-primary selection:text-primary-foreground; */
  }
}
