@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap")
  layer(base);

@import "tailwindcss";

@import "tw-animate-css";

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

@utility container {
  margin-inline: auto;
  padding-inline: 2rem;
  @media (width >= --theme(--breakpoint-sm)) {
    max-width: none;
  }
  @media (width >= 1400px) {
    max-width: 1400px;
  }
}

@theme inline {
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));

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

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

  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));

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

  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));

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

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

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

  --animate-accordion-down: accordion-down 0.2s ease-out;
  --animate-accordion-up: accordion-up 0.2s ease-out;

  @keyframes accordion-down {
    from {
      height: 0;
    }
    to {
      height: var(--radix-accordion-content-height);
    }
  }
  @keyframes accordion-up {
    from {
      height: var(--radix-accordion-content-height);
    }
    to {
      height: 0;
    }
  }
}

/*
  The default border color has changed to `currentcolor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentcolor);
  }
}

@layer base {
  :root {
    /* ── Shadcn HSL tokens (dark-first, zinc/emerald palette) ──
     * Mirrored from @seeflow/canvas so the studio chrome (header,
     * project switcher, command palette) reads the same theme as the
     * canvas. Canvas-only tokens (--shadow-*, --seeflow-handle-*,
     * --amber, --danger, --font-mono, --bg-canvas, --emerald-glow,
     * --ring-selected) live under .seeflow-canvas-root in the canvas
     * package — they don't belong at :root because the studio chrome
     * doesn't use them and a consumer importing the canvas CSS shouldn't
     * have their :root mutated. */
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;

    --card: 240 5.9% 10.6%;
    --card-foreground: 0 0% 98%;

    --popover: 240 5.9% 10.6%;
    --popover-foreground: 0 0% 98%;

    --primary: 160 84% 39.4%;
    --primary-foreground: 162 89% 10%;

    --secondary: 240 6% 13%;
    --secondary-foreground: 0 0% 98%;

    --muted: 240 7% 12%;
    --muted-foreground: 240 4.4% 64.9%;

    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 26.1%;
    --ring: 160 84% 39.4%;

    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 32px 32px;
  }
  html,
  body,
  #root {
    height: 100%;
    margin: 0;
  }
}
