@import "tailwindcss";
/*
  ---break---
*/
@custom-variant dark (&:is(.dark *));

@config '../../tailwind.config.ts';

/*
  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);
  }
}

@utility html-display {
  & a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color 0.3s ease;
  }

  & a:hover {
    text-decoration: underline;
  }
}

@layer base {
  :root {
    /* Base colors */
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    /* Card */
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    /* Popover */
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    /* Primary */
    --primary: 221.2 83.2% 53.3%; /* Light blue */
    --primary-foreground: 210 40% 98%; /* White */

    /* Secondary */
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    /* Muted */
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    /* Accent */
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    /* Destructive */
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    /* Border and Input */
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;

    /* Radius */
    --radius: 0.5rem;

    /* Chart colors */
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;

    /* Sidebar */
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    /* Base colors */
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    /* Card */
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    /* Popover */
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    /* Primary */
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 210 40% 98%;

    /* Secondary */
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    /* Muted */
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    /* Accent */
    --accent: 217.2 91.2% 59.8%;
    --accent-foreground: 210 40% 98%;

    /* Destructive */
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    /* Border and Input */
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 48%;

    /* Chart colors */
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;

    /* Sidebar */
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }

  *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}

.ProseMirror {
  @apply px-4 pt-2;
  outline: none !important;
}

h1.tiptap-heading {
  @apply mb-6 mt-8 text-4xl font-bold;
}

h2.tiptap-heading {
  @apply mb-4 mt-6 text-3xl font-bold;
}

h3.tiptap-heading {
  @apply mb-3 mt-4 text-xl font-bold;
}

h1.tiptap-heading:first-child,
h2.tiptap-heading:first-child,
h3.tiptap-heading:first-child {
  margin-top: 0;
}

h1.tiptap-heading + h2.tiptap-heading,
h1.tiptap-heading + h3.tiptap-heading,
h2.tiptap-heading + h1.tiptap-heading,
h2.tiptap-heading + h3.tiptap-heading,
h3.tiptap-heading + h1.tiptap-heading,
h3.tiptap-heading + h2.tiptap-heading {
  margin-top: 0;
}

.tiptap p.is-editor-empty:first-child::before {
  @apply pointer-events-none float-left h-0 text-accent-foreground;
  content: attr(data-placeholder);
}

.tiptap ul,
.tiptap ol {
  padding: 0 1rem;
}

.tiptap blockquote {
  border-left: 3px solid gray;
  margin: 1.5rem 0;
  padding-left: 1rem;
}

.mention-dropdown-container {
  position: fixed !important;
  z-index: 9999 !important;
}

.ProseMirror .mention {
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  background-color: #e0f2fe;
  color: #0369a1;
  white-space: nowrap;
}

.dark .ProseMirror .mention {
  background-color: #075985;
  color: #bae6fd;
}

/*
  ---break---
*/

/* Sidebar variables are now defined in the main theme section above */

/*
  ---break---
*/

/*
  ---break---
*/

@theme inline {
  --color-sidebar: var(--sidebar-background);
  --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);
}

/*
  ---break---
*/

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}
