@import url('highlight.js/styles/github-dark.css') screen and (prefers-color-scheme: dark);
@import url('highlight.js/styles/github.css') screen and (prefers-color-scheme: light);
@import 'tailwindcss';
@import './base.css';
@import 'tw-animate-css';

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

::view-transition-old(page-content) {
  animation: slide-out 0.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

::view-transition-new(page-content) {
  animation: slide-in 0.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

@keyframes slide-out {
  0% {
    transform: translateX(0%);
  }

  100% {
    opacity: 0;
    transform: translateX(calc(50% * var(--direction, 1)));
  }
}

@keyframes slide-in {
  0% {
    opacity: 0;
    transform: translateX(calc(-50% * var(--direction, 1)));
  }

  100% {
    transform: translateX(0%);
  }
}

@media (max-width: 620px) {
  .versions {
    display: none;
  }
}

@media (max-width: 350px) {
  .tip,
  .actions {
    display: none;
  }
}

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.3 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.3 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.3 0 0);
  --primary: oklch(0.3 0 0);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.96 0 0);
  --secondary-foreground: oklch(0.3 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.5 0 0);
  --accent: oklch(0.94 0 0);
  --accent-foreground: oklch(0.3 0 0);
  --destructive: oklch(0.33 0.19 23.03);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.92 0 0);
  --input: oklch(0.97 0 0);
  --ring: oklch(0.3 0 0);
  --chart-1: oklch(0.81 0.17 75.35);
  --chart-2: oklch(0.55 0.22 264.53);
  --chart-3: oklch(0.72 0 0);
  --chart-4: oklch(0.92 0 0);
  --chart-5: oklch(0.56 0 0);
  --sidebar: oklch(0.98 0 0);
  --sidebar-foreground: oklch(0.3 0 0);
  --sidebar-primary: oklch(0.3 0 0);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.92 0 0);
  --sidebar-accent-foreground: oklch(0.3 0 0);
  --sidebar-border: oklch(0.92 0 0);
  --sidebar-ring: oklch(0.3 0 0);
  --font-sans: Inter, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: Geist Mono, monospace;
  --font-kbd:
    ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial,
    sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
  --radius: 0.75rem;
  --shadow-2xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
  --shadow-xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
  --shadow-sm: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
  --shadow: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
  --shadow-md: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 2px 4px -1px hsl(0 0% 0% / 0.18);
  --shadow-lg: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 4px 6px -1px hsl(0 0% 0% / 0.18);
  --shadow-xl: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 8px 10px -1px hsl(0 0% 0% / 0.18);
  --shadow-2xl: 0px 1px 2px 0px hsl(0 0% 0% / 0.45);
}

.dark {
  --background: oklch(0.18 0.0059 285.89);
  --foreground: oklch(0.94 0 0);
  --card: oklch(0.2103 0.0059 285.89);
  --card-foreground: oklch(0.98 0 0);
  --popover: oklch(0.21 0.0059 285.89);
  --popover-foreground: oklch(0.98 0 0);
  --primary: oklch(0.98 0 0);
  --primary-foreground: oklch(0.3 0.0059 285.89);
  --secondary: oklch(0.25 0.0059 285.89);
  --secondary-foreground: oklch(1 0 0);
  --muted: oklch(0.23 0.0059 285.89);
  --muted-foreground: oklch(0.72 0 0);
  --accent: oklch(0.32 0.0059 285.89);
  --accent-foreground: oklch(1 0 0);
  --destructive: oklch(0.69 0.2 23.91);
  --destructive-foreground: oklch(0.3 0.0059 285.89);
  --border: oklch(0.26 0.0059 285.89);
  --input: oklch(0.32 0.0059 285.89);
  --ring: oklch(0.72 0.0059 285.89);
  --chart-1: oklch(0.81 0.17 75.35);
  --chart-2: oklch(0.58 0.21 260.84);
  --chart-3: oklch(0.56 0.0059 285.89);
  --chart-4: oklch(0.44 0.0059 285.89);
  --chart-5: oklch(0.92 0.0059 285.89);
  --sidebar: oklch(0.17 0.0059 285.89);
  --sidebar-foreground: oklch(0.94 0.0059 285.89);
  --sidebar-primary: oklch(0.94 0.0059 285.89);
  --sidebar-primary-foreground: oklch(0.2103 0.0059 285.89);
  --sidebar-accent: oklch(0.2103 0.0059 285.89);
  --sidebar-accent-foreground: oklch(0.94 0 0);
  --sidebar-border: oklch(0.2103 0.0059 285.89);
  --sidebar-ring: oklch(0.72 0 0);
  --radius: 0.75rem;
  --shadow-2xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
  --shadow-xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.09);
  --shadow-sm: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
  --shadow: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 1px 2px -1px hsl(0 0% 0% / 0.18);
  --shadow-md: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 2px 4px -1px hsl(0 0% 0% / 0.18);
  --shadow-lg: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 4px 6px -1px hsl(0 0% 0% / 0.18);
  --shadow-xl: 0px 1px 2px 0px hsl(0 0% 0% / 0.18), 0px 8px 10px -1px hsl(0 0% 0% / 0.18);
  --shadow-2xl: 0px 1px 2px 0px hsl(0 0% 0% / 0.45);
}

@theme inline {
  --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-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-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);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);

  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
  --font-serif: var(--font-serif);
  --font-kbd: var(--font-kbd);

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

  --shadow-2xs: var(--shadow-2xs);
  --shadow-xs: var(--shadow-xs);
  --shadow-sm: var(--shadow-sm);
  --shadow: var(--shadow);
  --shadow-md: var(--shadow-md);
  --shadow-lg: var(--shadow-lg);
  --shadow-xl: var(--shadow-xl);
  --shadow-2xl: var(--shadow-2xl);
}

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

  kbd {
    @apply font-kbd;
  }

  body {
    @apply bg-background text-foreground text-sm;
  }

  /* Makes the titlebar draggable so user can move the window */
  .titlebar,
  .draggable {
    user-select: none;
    app-region: drag;
  }

  /* Makes elements non-draggable in titlebar */
  .no-drag {
    app-region: no-drag;
  }

  /* Syntax highlighting styles */
  .hljs {
    background: transparent !important;
    padding: 0 !important;
  }

  .onboarding-background {
    background: linear-gradient(180deg, #6068e9 0%, #a5aaf9 100%);
  }
  .dark .onboarding-background {
    background: linear-gradient(180deg, #18181b 0%, #000 100%);
  }

  *::-webkit-scrollbar {
    @apply w-2;
  }

  *::-webkit-scrollbar-track {
    @apply bg-transparent w-2;
  }
  *::-webkit-scrollbar-thumb {
    @apply bg-border rounded-md;
  }
  *::-webkit-scrollbar-thumb:hover {
    @apply bg-muted-foreground;
  }
}

@layer utilities {
  @keyframes subtle-scale {
    0%,
    100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
  }

  .animate-subtle-scale {
    animation: subtle-scale 3s linear infinite;
  }

  @keyframes typingFadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-typingFadeIn {
    animation: typingFadeIn 0.3s ease-in-out;
  }

  @keyframes dotPulse {
    0% {
      opacity: 0.1;
      filter: blur(2px);
      transform: scale(0.9);
    }
    50% {
      opacity: 0.5;
      filter: blur(0px);
      transform: scale(1);
    }
    100% {
      opacity: 0.1;
      filter: blur(2px);
      transform: scale(0.9);
    }
  }

  .animate-dotPulse {
    animation: dotPulse 1s ease-in-out infinite;
  }

  .typing-dots > div:nth-child(1) {
    animation-delay: 0s;
  }

  .typing-dots > div:nth-child(2) {
    animation-delay: 0.15s;
  }

  .typing-dots > div:nth-child(3) {
    animation-delay: 0.3s;
  }
}

button {
  cursor: pointer;
}
