@import "tailwindcss";
@import "tw-animate-css";

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

@theme inline {
  --font-sans: "Geist", sans-serif;
  --font-regard: "Regarn", sans-serif;
  --font-bebas-neue: "Bebas Neue", sans-serif;
  --font-instrument-serif: "Instrument Serif", serif;
  --color-brand: var(--brand);
  --color-brand-secondary: var(--brand-secondary);
  --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);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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);
  --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(--reka-accordion-content-height);
    }
  }
  @keyframes accordion-up {
  from {
    height: var(--reka-accordion-content-height);
    }
  to {
    height: 0;
    }
  }
}

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.147 0.004 49.25);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.147 0.004 49.25);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.147 0.004 49.25);
  --primary: oklch(0.216 0.006 56.043);
  --primary-foreground: oklch(0.985 0.001 106.423);
  --secondary: oklch(0.97 0.001 106.424);
  --secondary-foreground: oklch(0.216 0.006 56.043);
  --muted: oklch(0.97 0.001 106.424);
  --muted-foreground: oklch(0.553 0.013 58.071);
  --accent: oklch(0.97 0.001 106.424);
  --accent-foreground: oklch(0.216 0.006 56.043);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.577 0.245 27.325);
  --border: oklch(0.923 0.003 48.717);
  --input: oklch(0.923 0.003 48.717);
  --ring: oklch(0.709 0.01 56.259);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0.001 106.423);
  --sidebar-foreground: oklch(0.147 0.004 49.25);
  --sidebar-primary: oklch(0.216 0.006 56.043);
  --sidebar-primary-foreground: oklch(0.985 0.001 106.423);
  --sidebar-accent: oklch(0.97 0.001 106.424);
  --sidebar-accent-foreground: oklch(0.216 0.006 56.043);
  --sidebar-border: oklch(0.923 0.003 48.717);
  --sidebar-ring: oklch(0.709 0.01 56.259);
  --brand: oklch(69.87% 0.216 32.38);
  --brand-secondary: oklch(76.53% 0.192 34.67);
}

.dark {
  --background: oklch(0.147 0.004 49.25);
  --foreground: oklch(0.985 0.001 106.423);
  --card: oklch(0.147 0.004 49.25);
  --card-foreground: oklch(0.985 0.001 106.423);
  --popover: oklch(0.147 0.004 49.25);
  --popover-foreground: oklch(0.985 0.001 106.423);
  --primary: oklch(0.985 0.001 106.423);
  --primary-foreground: oklch(0.216 0.006 56.043);
  --secondary: oklch(0.268 0.007 34.298);
  --secondary-foreground: oklch(0.985 0.001 106.423);
  --muted: oklch(0.268 0.007 34.298);
  --muted-foreground: oklch(0.709 0.01 56.259);
  --accent: oklch(0.268 0.007 34.298);
  --accent-foreground: oklch(0.985 0.001 106.423);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.268 0.007 34.298);
  --input: oklch(0.268 0.007 34.298);
  --ring: oklch(0.553 0.013 58.071);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.216 0.006 56.043);
  --sidebar-foreground: oklch(0.985 0.001 106.423);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0.001 106.423);
  --sidebar-accent: oklch(0.268 0.007 34.298);
  --sidebar-accent-foreground: oklch(0.985 0.001 106.423);
  --sidebar-border: oklch(0.268 0.007 34.298);
  --sidebar-ring: oklch(0.553 0.013 58.071);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
    @apply font-sans;
  }
  body {
    @apply bg-background text-foreground;
  }
}
/* Custom scrollbar hiding */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Ensure proper touch scrolling on mobile */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

.tiptap {
  padding: 4rem 1rem;
  outline: none !important;
}

.tiptap:focus-visible {
  outline: none !important;
}

.tiptap .ProseMirror-selectednode {
  background-color: #dbeafe; /* bg-blue-100 */
}

.tiptap [data-name='title'] {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.tiptap h2[data-name='heading'] {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.tiptap h3[data-name='heading'] {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.tiptap h4[data-name='heading'] {
  font-size: 1.25rem; /* text-xl */
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.tiptap [data-name='paragraph'] {
  margin: 0;
}

.tiptap [data-name='blockquote'] {
  margin: 0;
  padding-left: 0.5rem;
  position: relative;
}

.tiptap [data-name='blockquote']::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.25rem;
  border-radius: 0.25rem;
  background-color: #d1d5db; /* bg-gray-300 */
}

/* Dark mode blockquote */
@media (prefers-color-scheme: dark) {
  .tiptap [data-name='blockquote']::after {
    background-color: #4b5563; /* dark:bg-gray-600 */
  }
}

.tiptap ol ol {
  list-style-type: lower-roman;
}

.tiptap ol ol ol {
  list-style-type: lower-alpha;
}

.tiptap [data-checked] {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tiptap [data-checked][data-checked='true'] {
  text-decoration: line-through;
  color: #a3a3a3; /* text-neutral-400 */
  transition: color 0.15s ease-in-out;
}

.tiptap [data-placeholder]::before {
  content: attr(data-placeholder);
  color: #d4d4d4; /* text-neutral-300 */
  float: left;
  height: 0;
  pointer-events: none;
}

/* Dark mode placeholder */
@media (prefers-color-scheme: dark) {
  .tiptap [data-placeholder]::before {
    color: #525252; /* dark:text-neutral-600 */
  }
}

/* Marks */
.tiptap [data-name='bold'] {
  font-weight: 700;
  color: #000000; /* text-black */
}

/* Dark mode bold */
@media (prefers-color-scheme: dark) {
  .tiptap [data-name='bold'] {
    color: #ffffff; /* dark:text-white */
  }
}

.tiptap [data-name='code'] {
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  margin: 0 0.25rem;
  background-color: #e4e4e7; /* bg-zinc-200 */
}

/* Dark mode code */
@media (prefers-color-scheme: dark) {
  .tiptap [data-name='code'] {
    background-color: #27272a; /* dark:bg-zinc-800 */
  }
}

.tiptap [data-name='italic'] {
  font-style: italic;
  margin: 0 0.25rem;
}

.tiptap [data-name='strike'] {
  color: #a3a3a3; /* text-neutral-400 */
  transition: color 0.15s ease-in-out;
}